Skip to content

Commit a37dd62

Browse files
status re-added to the code, mapped with action_type
1 parent 174aa84 commit a37dd62

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Source/Core/Models/Subscription/InPlayerSubscription.swift

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Foundation
44
public struct InPlayerSubscription: Codable {
55

66
public let cancelToken: String?
7+
public let status: String?
78
public let description: String?
89
public let assetTitle: String?
910
public let assetId: Int?
@@ -18,6 +19,7 @@ public struct InPlayerSubscription: Codable {
1819

1920
enum CodingKeys: String, CodingKey {
2021
case cancelToken = "cancel_token"
22+
case status = "action_type"
2123
case description = "description"
2224
case assetTitle = "item_title"
2325
case assetId = "item_id"
@@ -35,6 +37,7 @@ public struct InPlayerSubscription: Codable {
3537
public init(from decoder: Decoder) throws {
3638
let values = try decoder.container(keyedBy: CodingKeys.self)
3739
cancelToken = try values.decodeIfPresent(String.self, forKey: .cancelToken)
40+
status = try values.decodeIfPresent(String.self, forKey: .status)
3841
description = try values.decodeIfPresent(String.self, forKey: .description)
3942
assetTitle = try values.decodeIfPresent(String.self, forKey: .assetTitle)
4043
assetId = try values.decodeIfPresent(Int.self, forKey: .assetId)

0 commit comments

Comments
 (0)