Credit Card
A data class representing a credit card.
Constructors
Link copied to clipboard
constructor(nameOnCard: String?, cardNumber: String?, lastFourDigits: String?, cardType: String?, expiration: ExpirationDate?, cvv: String?, requireCvv: Boolean?, billingAddress: Address?, isDefault: Boolean?)
Constructor for creating a CreditCard with primary details and billing address.
constructor(nameOnCard: String?, lastFourDigits: String?, cardType: String?, expiration: ExpirationDate?, cvv: String? = null, requireCvv: Boolean? = null, token: String?, gatewayToken: String? = null)
Constructor for creating a CreditCard using tokens.
Properties
Link copied to clipboard
The billing address associated with the card.
Link copied to clipboard
The expiration date of the card.
Link copied to clipboard
A token from the payment gateway representing the credit card.
Link copied to clipboard
The last four digits of the card number.
Link copied to clipboard
The name on the card.
Link copied to clipboard
Functions
Link copied to clipboard
Converts the CreditCard object to a JsonObject representation. By default, sensitive information like cardNumber and cvv are excluded.