From c7f7c2d4a810295bc68c6bb18345b0cc6a304b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Lamboley?= Date: Sun, 9 Jun 2024 23:46:04 +0200 Subject: [PATCH] Add captureBefore property on card payment method details (#258) --- .../Core Resources/Charges/ChargePaymentMethods.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/StripeKit/Core Resources/Charges/ChargePaymentMethods.swift b/Sources/StripeKit/Core Resources/Charges/ChargePaymentMethods.swift index 263e792..4e68a9c 100644 --- a/Sources/StripeKit/Core Resources/Charges/ChargePaymentMethods.swift +++ b/Sources/StripeKit/Core Resources/Charges/ChargePaymentMethods.swift @@ -235,6 +235,8 @@ public struct ChargePaymentMethodDetailsBoleto: Codable { public struct ChargePaymentMethodDetailsCard: Codable { /// Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. public var brand: PaymentMethodDetailsCardBrand? + /// When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + public var captureBefore: Date? /// Check results by Card networks on Card address and CVC at time of payment. public var checks: PaymentMethodDetailsCardChecks? /// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you’ve collected. @@ -259,6 +261,7 @@ public struct ChargePaymentMethodDetailsCard: Codable { public var wallet: ChargePaymentMethodDetailsCardWallet? public init(brand: PaymentMethodDetailsCardBrand? = nil, + captureBefore: Date? = nil, checks: PaymentMethodDetailsCardChecks? = nil, country: String? = nil, expMonth: Int? = nil, @@ -271,6 +274,7 @@ public struct ChargePaymentMethodDetailsCard: Codable { threeDSecure: ChargePaymentMethodDetailsCardThreeDSecure? = nil, wallet: ChargePaymentMethodDetailsCardWallet? = nil) { self.brand = brand + self.captureBefore = captureBefore self.checks = checks self.country = country self.expMonth = expMonth