public final class Card
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Card.Brand
The brand (for example, VISA) of a
Card . |
static class |
Card.Builder
Lets developers create and configure card data for automated testing.
|
Constructor and Description |
---|
Card(Card.Brand brand,
java.lang.String lastFourDigits)
Creates a new Card object for testing purposes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Card.Brand |
getBrand()
The brand (for example, VISA) of this card.
|
java.lang.String |
getCardholderName()
The cardholder's full name.
|
java.lang.Integer |
getExpirationMonth()
The year of the expiration month.
|
java.lang.Integer |
getExpirationYear()
The year of the expiration date.
|
java.lang.String |
getId()
The card identifier, if this card instance came from storing a card on file.
|
java.lang.String |
getLastFourDigits()
The last 4 digits of this card's number.
|
int |
hashCode() |
static Card.Builder |
newCardBuilder(Card.Brand brand,
java.lang.String lastFourDigits) |
java.lang.String |
toString() |
public Card(@NonNull Card.Brand brand, @NonNull java.lang.String lastFourDigits)
Creates a new Card object for testing purposes.
@NonNull public static Card.Builder newCardBuilder(@NonNull Card.Brand brand, @NonNull java.lang.String lastFourDigits)
@NonNull public Card.Brand getBrand()
@Nullable public java.lang.String getCardholderName()
@Nullable public java.lang.Integer getExpirationYear()
Card
instance created when saving a card on file.@Nullable public java.lang.Integer getExpirationMonth()
Card
instance created when saving a card on file.@Nullable public java.lang.String getId()
The identifier is not exposed in checkout results, and will only be available in a
Card
instance created when saving a card on file.
@NonNull public java.lang.String getLastFourDigits()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object