CreditCard

constructor(nameOnCard: String?, cardNumber: String?, lastFourDigits: String?, cardType: String?, expiration: ExpirationDate?, cvv: String?, requireCvv: Boolean?, billingAddress: Address?, isDefault: Boolean?)(source)

Constructor for creating a CreditCard with primary details and billing address.

Parameters

nameOnCard

The name on the card.

cardNumber

The full card number.

lastFourDigits

The last four digits of the card number.

cardType

The type of card.

expiration

The expiration date.

cvv

The CVV.

requireCvv

Whether CVV is required.

billingAddress

The billing address.

isDefault

Whether it's the default card.


constructor(nameOnCard: String?, lastFourDigits: String?, cardType: String?, expiration: ExpirationDate?, cvv: String? = null, requireCvv: Boolean? = null, token: String?, gatewayToken: String? = null)(source)

Constructor for creating a CreditCard using tokens.

Parameters

nameOnCard

The name on the card.

lastFourDigits

The last four digits of the card number.

cardType

The type of card.

expiration

The expiration date.

cvv

The CVV (optional).

requireCvv

Whether CVV is required (optional).

token

The payment token.

gatewayToken

The gateway token (optional).