Skip to content

Commit bc346c2

Browse files
committed
Map missing property.
1 parent 38634e1 commit bc346c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/Core/Models/Asset/InPlayerItem.swift

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public struct InPlayerItem : Codable {
7474
/// Age Restriction object
7575
public let ageRestriction: InPlayerAgeRestriction?
7676

77+
/// List of access fees
78+
public let accessFees: [InPlayerAccessFee]?
79+
7780
/// Object containing additional information about the item
7881
public let metadata : [InPlayerItemMetadata]?
7982

@@ -107,6 +110,7 @@ public struct InPlayerItem : Codable {
107110
case content = "content"
108111
case templateId = "template_id"
109112
case ageRestriction = "age_restriction"
113+
case accessFees = "access_fees"
110114
}
111115

112116
/// Decoder method
@@ -127,6 +131,7 @@ public struct InPlayerItem : Codable {
127131
templateId = try values.decodeIfPresent(Int.self, forKey: .templateId)
128132
ageRestriction = try values.decodeIfPresent(InPlayerAgeRestriction.self, forKey: .ageRestriction)
129133
active = try values.decodeIfPresent(Bool.self, forKey: .active)
134+
accessFees = try values.decodeIfPresent([InPlayerAccessFee].self, forKey: .accessFees)
130135
}
131136

132137
/// Encoder method
@@ -147,6 +152,7 @@ public struct InPlayerItem : Codable {
147152
try values.encodeIfPresent(templateId, forKey: .templateId)
148153
try values.encodeIfPresent(ageRestriction, forKey: .ageRestriction)
149154
try values.encodeIfPresent(active, forKey: .active)
155+
try values.encodeIfPresent(accessFees, forKey: .accessFees)
150156
}
151157

152158
/// Method that return parsed content as enum with associated values

0 commit comments

Comments
 (0)