CardToken class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
CardToken({required String id, @Default.new("card") String object, @JsonKey.new(name: "address_city") String? addressCity, @JsonKey.new(name: "address_country") String? addressCountry, @JsonKey.new(name: "address_line1") String? addressLine1, @JsonKey.new(name: "address_line1_check") VerificationCheck? addressLine1Check, @JsonKey.new(name: "address_line2") String? addressLine2, @JsonKey.new(name: "address_state") String? addressState, @JsonKey.new(name: "address_zip") String? addressZip, @JsonKey.new(name: "address_zip_check") VerificationCheck? addressZipCheck, @Default.new(CardTokenBrand.unknown) CardTokenBrand? brand, String? country, String? currency, @JsonKey.new(name: "cvc_check") VerificationCheck? cvcCheck, @JsonKey.new(name: "dynamic_last4") String? dynamicLast4, @JsonKey.new(name: "exp_month") int? expMonth, @JsonKey.new(name: "exp_year") int? expYear, String? fingerprint, CardFundingType? funding, String? last4, @Default.new({}) Map<
String, dynamic> metadata, String? name, @JsonKey.new(name: "tokenization_method") CardTokenizationMethod? tokenizationMethod}) -
constfactory
-
CardToken.fromJson(Map<
String, dynamic> json) -
factory
Properties
- addressCity → String?
-
City/District/Suburb/Town/Village.
no setterinherited
- addressCountry → String?
-
Billing address country, if provided when creating card.
no setterinherited
- addressLine1 → String?
-
Address line 1 (Street address/PO Box/Company name).
no setterinherited
- addressLine1Check → VerificationCheck?
-
If address_line1 was provided, results of the check:
pass, fail, unavailable, or unchecked.
no setterinherited
- addressLine2 → String?
-
Address line 2 (Apartment/Suite/Unit/Building).
no setterinherited
- addressState → String?
-
State/County/Province/Region.
no setterinherited
- addressZip → String?
-
ZIP or postal code.
no setterinherited
- addressZipCheck → VerificationCheck?
-
If address_zip was provided, results of the check:
pass, fail, unavailable, or unchecked.
no setterinherited
- brand → CardTokenBrand?
-
If address_zip was provided, results of the check:
pass, fail, unavailable, or unchecked.
no setterinherited
-
copyWith
→ $CardTokenCopyWith<
CardToken> -
Create a copy of CardToken
with the given fields replaced by the non-null parameter values.
no setterinherited
- country → String?
-
Two-letter ISO code representing the country of the card.
You could use this attribute to get a sense of the
international breakdown of cards you’ve collected.
no setterinherited
- currency → String?
-
Three-letter ISO currency code, in lowercase.
Must be a supported currency.
no setterinherited
- cvcCheck → VerificationCheck?
-
If a CVC was provided, results of the check:
pass, fail, unavailable, or unchecked.
A result of unchecked indicates that CVC was provided but hasn’t
been checked yet.
Checks are typically performed when attaching a card to a Customer
object, or when creating a charge. For more details, see
Check if a card is valid without a charge.
https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge
no setterinherited
- dynamicLast4 → String?
-
(For tokenized numbers only.)
The last four digits of the device account number.
no setterinherited
- expMonth → int?
-
Two-digit number representing the card’s expiration month.
no setterinherited
- expYear → int?
-
Four-digit number representing the card’s expiration year.
no setterinherited
- fingerprint → String?
-
Uniquely identifies this particular card number.
You can use this attribute to check whether two customers who’ve
signed up with you are using the same card number, for example.
For payment methods that tokenize card information
(Apple Pay, Google Pay), the tokenized number might be provided
instead of the underlying card number.
Starting May 1, 2021, card fingerprint in India for Connect will
change to allow two fingerprints for the same card — one for India and
one for the rest of the world.
no setterinherited
- funding → CardFundingType?
-
Card funding type. Can be credit, debit, prepaid, or unknown.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the object.
no setterinherited
- last4 → String?
-
The last four digits of the card.
no setterinherited
-
metadata
→ Map<
String, dynamic> -
Set of key-value pairs that you can attach to an object.
This can be useful for storing additional information about the object
in a structured forma
no setterinherited
- name → String?
-
Cardholder name.
no setterinherited
- object → String
-
String representing the object’s type.
Objects of the same type share the same value.
Value is "card".
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokenizationMethod → CardTokenizationMethod?
-
If the card number is tokenized, this is the method that was used.
Can be android_pay (includes Google Pay), apple_pay, masterpass,
visa_checkout, or null.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_CardToken value)) → TResult -
Available on CardToken, provided by the CardTokenPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_CardToken value)?) → TResult? -
Available on CardToken, provided by the CardTokenPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_CardToken value)?, {required TResult orElse()}) → TResult -
Available on CardToken, provided by the CardTokenPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String object, String? addressCity, String? addressCountry, String? addressLine1, VerificationCheck? addressLine1Check, String? addressLine2, String? addressState, String? addressZip, VerificationCheck? addressZipCheck, CardTokenBrand? brand, String? country, String? currency, VerificationCheck? cvcCheck, String? dynamicLast4, int? expMonth, int? expYear, String? fingerprint, CardFundingType? funding, String? last4, Map< String, dynamic> metadata, String? name, CardTokenizationMethod? tokenizationMethod)?, {required TResult orElse()}) → TResult -
Available on CardToken, provided by the CardTokenPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this CardToken to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String id, String object, String? addressCity, String? addressCountry, String? addressLine1, VerificationCheck? addressLine1Check, String? addressLine2, String? addressState, String? addressZip, VerificationCheck? addressZipCheck, CardTokenBrand? brand, String? country, String? currency, VerificationCheck? cvcCheck, String? dynamicLast4, int? expMonth, int? expYear, String? fingerprint, CardFundingType? funding, String? last4, Map< String, dynamic> metadata, String? name, CardTokenizationMethod? tokenizationMethod)) → TResult -
Available on CardToken, provided by the CardTokenPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String object, String? addressCity, String? addressCountry, String? addressLine1, VerificationCheck? addressLine1Check, String? addressLine2, String? addressState, String? addressZip, VerificationCheck? addressZipCheck, CardTokenBrand? brand, String? country, String? currency, VerificationCheck? cvcCheck, String? dynamicLast4, int? expMonth, int? expYear, String? fingerprint, CardFundingType? funding, String? last4, Map< String, dynamic> metadata, String? name, CardTokenizationMethod? tokenizationMethod)?) → TResult? -
Available on CardToken, provided by the CardTokenPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited