diff --git a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift index c8d0792..2b30dfd 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift @@ -7,16 +7,18 @@ public extension BankAPI.CreditCard { public let token: String public let accountId: String public let amount: Int + public let requestId: String? public let organizationCode: String? public let isCardholderNameSpecified: Bool? public typealias Response = String - public init(userId: String, token: String, accountId: String, amount: Int, organizationCode: String? = nil, isCardholderNameSpecified: Bool? = nil) { + public init(userId: String, token: String, accountId: String, amount: Int, requestId: String? = nil, organizationCode: String? = nil, isCardholderNameSpecified: Bool? = nil) { self.userId = userId self.token = token self.accountId = accountId self.amount = amount + self.requestId = requestId self.organizationCode = organizationCode self.isCardholderNameSpecified = isCardholderNameSpecified } @@ -40,6 +42,10 @@ public extension BankAPI.CreditCard { dict["amount"] = amount + if requestId != nil { + dict["request_id"] = requestId + } + if organizationCode != nil { dict["organization_code"] = organizationCode } diff --git a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift index 5af6545..0996473 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift @@ -7,16 +7,18 @@ public extension BankAPI.CreditCard { public let cardRegisteredAt: String public let accountId: String public let amount: Int + public let requestId: String? public let deleteCardIfAuthFail: Bool? public let organizationCode: String? public typealias Response = String - public init(userId: String, cardRegisteredAt: String, accountId: String, amount: Int, deleteCardIfAuthFail: Bool? = nil, organizationCode: String? = nil) { + public init(userId: String, cardRegisteredAt: String, accountId: String, amount: Int, requestId: String? = nil, deleteCardIfAuthFail: Bool? = nil, organizationCode: String? = nil) { self.userId = userId self.cardRegisteredAt = cardRegisteredAt self.accountId = accountId self.amount = amount + self.requestId = requestId self.deleteCardIfAuthFail = deleteCardIfAuthFail self.organizationCode = organizationCode } @@ -40,6 +42,10 @@ public extension BankAPI.CreditCard { dict["amount"] = amount + if requestId != nil { + dict["request_id"] = requestId + } + if deleteCardIfAuthFail != nil { dict["delete_card_if_auth_fail"] = deleteCardIfAuthFail }