PaymentCard class
The class for the Payment Card model. Has utility methods for validating the card.
Constructors
- PaymentCard({required String? number, required String? cvc, required int? expiryMonth, required int? expiryYear, String? name, String? addressLine1, String? addressLine2, String? addressLine3, String? addressLine4, String? addressPostCode, String? addressCountry, String? country})
- PaymentCard.empty()
Properties
- addressCountry ↔ String?
-
Country of the bank
getter/setter pair
- addressLine1 ↔ String?
-
Bank Address line 1
getter/setter pair
- addressLine2 ↔ String?
-
Bank Address line 2
getter/setter pair
- addressLine3 ↔ String?
-
Bank Address line 3
getter/setter pair
- addressLine4 ↔ String?
-
Bank Address line 4
getter/setter pair
- addressPostalCode ↔ String?
-
Postal code of the bank address
getter/setter pair
-
cardTypes
→ List<
CardType> -
final
- country ↔ String?
-
getter/setter pair
- cvc ↔ String?
-
getter/setter pair
- expiryMonth ↔ int?
-
Expiry month
getter/setter pair
- expiryYear ↔ int?
-
Expiry year
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- last4Digits → String?
-
no setter
- name ↔ String?
-
Name on card
getter/setter pair
- number ↔ String?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ String?
-
getter/setter pair
Methods
-
getTypeForIIN(
String? cardNumber) → String -
isValid(
) → bool - Validates the CVC or CVV of the card Returns true if the cvc is valid
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullifyNumber(
) → dynamic -
toString(
) → String -
A string representation of this object.
override
-
validCVC(
String? cardCvc) → bool - Validates the CVC or CVV of a card. Returns true if CVC is valid and false otherwise
-
validNumber(
String? cardNumber) → bool - Validates the number of the card Returns true if the number is valid. Returns false otherwise
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited