CardData class

Represents the details of a payment card.

This class stores essential card information such as brand, last four digits, expiration date, cardholder's name, contact information, and billing address.

Constructors

CardData({required String id, String? merchantId, required String brand, required String last4, required String expMonth, required String expYear, required String name, String? email, String? phoneNumber, String? addressZip, bool? surchargeAllowed, bool? networkTokenize, String? addressLine1, String? addressLine2, String? addressCountry, String? addressCity, String? addressState, bool? storePaymentMethod, String? expiresAt, String? country, String? type, bool? prepaidBenefits})
Creates a new instance of CardData.
CardData.fromJson(Map<String, dynamic> json)
Parses a CardData object from a JSON map.
factory

Properties

addressCity → String?
The city of the billing address.
final
addressCountry → String?
The country of the billing address.
final
addressLine1 → String?
The first line of the billing address.
final
addressLine2 → String?
The second line of the billing address.
final
addressState → String?
The state or region of the billing address.
final
addressZip → String?
The ZIP code associated with the card's billing address.
final
brand → String
The brand of the card (e.g., Visa, MasterCard).
final
country → String?
The country of origin for the card.
final
email → String?
The email address associated with the cardholder.
final
expiresAt → String?
The expiration date of the card token, if applicable.
final
expMonth → String
The expiration month of the card.
final
expYear → String
The expiration year of the card.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
The unique identifier for the card.
final
last4 → String
The last four digits of the card number.
final
merchantId → String?
The merchant identifier associated with the card.
final
name → String
The name of the cardholder.
final
networkTokenize → bool?
Indicates whether network tokenization is enabled for this card.
final
phoneNumber → String?
The phone number associated with the cardholder.
final
prepaidBenefits → bool?
Indicates whether the card has prepaid benefits (e.g. HSA/FSA).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storePaymentMethod → bool?
Indicates whether this card should be stored as a payment method.
final
surchargeAllowed → bool?
Indicates whether surcharges are allowed on this card.
final
type → String?
The type of the card (e.g., Credit, Debit).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the CardData object to a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited