diff --git a/charge.go b/charge.go index 325c028238..2d81f050f5 100644 --- a/charge.go +++ b/charge.go @@ -311,6 +311,7 @@ type ChargePaymentMethodDetailsCard struct { Funding CardFunding `json:"funding"` Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"` Last4 string `json:"last4"` + Network PaymentMethodCardNetwork `json:"network"` MOTO bool `json:"moto"` ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` Wallet *ChargePaymentMethodDetailsCardWallet `json:"wallet"` @@ -346,6 +347,7 @@ type ChargePaymentMethodDetailsCardPresent struct { Funding CardFunding `json:"funding"` GeneratedCard string `json:"generated_card"` Last4 string `json:"last4"` + Network PaymentMethodCardNetwork `json:"network"` ReadMethod string `json:"read_method"` Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"` } diff --git a/paymentmethod.go b/paymentmethod.go index b13849bec1..d61e808bd7 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -39,6 +39,23 @@ const ( PaymentMethodCardBrandVisa PaymentMethodCardBrand = "visa" ) +// PaymentMethodCardNetwork is the list of allowed values to represent the network +// used for a card-like transaction. +type PaymentMethodCardNetwork string + +// List of values that PaymentMethodCardNetwork can take. +const ( + PaymentMethodCardNetworkAmex PaymentMethodCardNetwork = "amex" + PaymentMethodCardNetworkDiners PaymentMethodCardNetwork = "diners" + PaymentMethodCardNetworkDiscover PaymentMethodCardNetwork = "discover" + PaymentMethodCardNetworkInterac PaymentMethodCardNetwork = "interac" + PaymentMethodCardNetworkJCB PaymentMethodCardNetwork = "jcb" + PaymentMethodCardNetworkMastercard PaymentMethodCardNetwork = "mastercard" + PaymentMethodCardNetworkUnionpay PaymentMethodCardNetwork = "unionpay" + PaymentMethodCardNetworkUnknown PaymentMethodCardNetwork = "unknown" + PaymentMethodCardNetworkVisa PaymentMethodCardNetwork = "visa" +) + // PaymentMethodCardWalletType is the list of allowed values for the type a wallet can take on // a Card PaymentMethod. type PaymentMethodCardWalletType string