Skip to content

Commit 174aa84

Browse files
Subsrciption model status removed, amount mapping fixes
1 parent 10304a7 commit 174aa84

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Source/Core/Models/Subscription/InPlayerSubscription.swift

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

66
public let cancelToken: String?
7-
public let status: String?
87
public let description: String?
98
public let assetTitle: String?
109
public let assetId: Int?
@@ -19,12 +18,11 @@ public struct InPlayerSubscription: Codable {
1918

2019
enum CodingKeys: String, CodingKey {
2120
case cancelToken = "cancel_token"
22-
case status = "status"
2321
case description = "description"
2422
case assetTitle = "item_title"
2523
case assetId = "item_id"
2624
case formattedAmount = "formatted_amount"
27-
case amount = "amount"
25+
case amount = "charged_amount"
2826
case currency = "currency"
2927
case merchantId = "merchant_id"
3028
case createdAt = "created_at"
@@ -37,7 +35,6 @@ public struct InPlayerSubscription: Codable {
3735
public init(from decoder: Decoder) throws {
3836
let values = try decoder.container(keyedBy: CodingKeys.self)
3937
cancelToken = try values.decodeIfPresent(String.self, forKey: .cancelToken)
40-
status = try values.decodeIfPresent(String.self, forKey: .status)
4138
description = try values.decodeIfPresent(String.self, forKey: .description)
4239
assetTitle = try values.decodeIfPresent(String.self, forKey: .assetTitle)
4340
assetId = try values.decodeIfPresent(Int.self, forKey: .assetId)

0 commit comments

Comments
 (0)