Skip to content

Commit c27c730

Browse files
committed
Update Access Fee model.
1 parent bc346c2 commit c27c730

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/Core/Models/Asset/InPlayerAccessFee.swift

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public struct InPlayerAccessFee : Codable {
2424
/// Item model
2525
public let item: InPlayerItem?
2626

27+
public let itemType: String?
28+
2729
/// Access type model
2830
public let accessType : InPlayerAccessType?
2931

@@ -64,6 +66,7 @@ public struct InPlayerAccessFee : Codable {
6466
case expiresAt = "expires_at"
6567
case externalFees = "external_fees"
6668
case startsAt = "starts_at"
69+
case itemType = "item_type"
6770
}
6871

6972
/// Decoder Method
@@ -84,6 +87,7 @@ public struct InPlayerAccessFee : Codable {
8487
expiresAt = try values.decodeIfPresent(Double.self, forKey: .expiresAt)
8588
externalFees = try values.decodeIfPresent([InPlayerExternalFee].self, forKey: .externalFees)
8689
startsAt = try values.decodeIfPresent(Double.self, forKey: .startsAt)
90+
itemType = try values.decodeIfPresent(String.self, forKey: .itemType)
8791
}
8892

8993
/// Encoder method
@@ -104,6 +108,7 @@ public struct InPlayerAccessFee : Codable {
104108
try values.encodeIfPresent(expiresAt, forKey: .expiresAt)
105109
try values.encodeIfPresent(externalFees, forKey: .externalFees)
106110
try values.encodeIfPresent(startsAt, forKey: .startsAt)
111+
try values.encodeIfPresent(itemType, forKey: .itemType)
107112
}
108113

109114
}

0 commit comments

Comments
 (0)