Token constructor
const
Token({})
Implementation
const factory Token({
/// Unique identifier for the object.
required String id,
/// String representing the object’s type.
/// Objects of the same type share the same value.
/// Value is "token".
@Default("token") String object,
/// Hash describing the bank account.
@JsonKey(name: "bank_account") BankAccountToken? bankAccount,
/// Hash describing the card used to make the charge.
CardToken? card,
/// IP address of the client that generated the token.
@JsonKey(name: "client_ip") String? clientIP,
/// Time at which the object was created. Measured in seconds since the Unix epoch.
int? created,
/// Type of the token: account, bank_account, card, or pii.
@Default(true) bool livemode,
/// Has the value true if the object exists in live mode or the
/// value false if the object exists in test mode.
required TokenType type,
/// Whether this token has already been used
/// (tokens can be used only once).
@Default(false) bool used,
}) = _Token;