Card class

Reflects the current status of a card payment.

Annotations
  • @JsonSerializable()

Constructors

Card({String? id, Address? billingAddress, String? bin, CardBrand? cardBrand, CardType? cardType, String? cardholderName, String? customerId, bool? enabled, int? expMonth, int? expYear, String? fingerprint, String? last_4, CardPrepaidType? prepaidType, String? referenceId, int? version})
@macro Reflects the current status of a card payment.
const
Card.fromJson(Map<String, dynamic> json)
Converts a Map to an Card
factory

Properties

billingAddress Address?
The billing address for this card.
final
bin String?
Read only The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API returns this field.
final
cardBrand CardBrand?
Read only The card's brand.
final
cardholderName String?
The name of the cardholder.
final
cardType CardType?
Read only The card's brand.
final
customerId String?
The ID of a customer created using the Customers API to be associated with the card.
final
enabled bool?
Read only Indicates whether or not a card can be used for payments.
final
expMonth int?
The expiration month of the associated card as an integer between 1 and 12.
final
expYear int?
The four-digit year of the card's expiration date.
final
fingerprint String?
Read only Not currently set. Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Read only Unique ID for this card. Generated by Square.
final
last_4 String?
Read only The last 4 digits of the card number.
final
prepaidType CardPrepaidType?
Read only Indicates whether the Card is prepaid or not. The Card object includes this field only in response to Payments API calls.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
referenceId String?
An optional user-defined reference ID that associates this card with another entity in an external system. For example, a customer ID from an external customer management system.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
version int?
Current version number of the card. Increments with each card update. Requests to update an existing Card object will be rejected unless the version in the request matches the current version for the Card.
final

Methods

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

Operators

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