Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add captureBefore property on card payment method details #258

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand All @@ -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
Expand Down