@Immutable @LevelUpApi(contract=PUBLIC) public final class CreditCard extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static String |
AMEX
Full brand name of American Express.
|
static Parcelable.Creator<CreditCard> |
CREATOR
Implements the
Parcelable interface. |
static String |
DISCOVER
Full brand name of Discover.
|
static String |
MASTERCARD
Full brand name of MasterCard.
|
static String |
SPRINT
Full brand name of Sprint carrier billing.
|
static String |
VISA
Full brand name of Visa.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
CreditCard(Long bin,
boolean debit,
String description,
String expirationMonth,
String expirationYear,
long id,
String last4,
boolean promoted,
String type) |
CreditCard(String description,
String expirationMonth,
String expirationYear,
long id,
String last4,
boolean promoted,
String type,
Long bin)
Deprecated.
Provided for SDK backwards compatibility only. Newer code should use
CreditCard(Long, boolean, String, String, String, long, String, boolean, String)
instead. This constructor omits the debit field and has the BIN field last. |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
Long |
getBin()
The BIN of the card.
|
String |
getDescription()
The description of the card.
|
String |
getExpirationMonth()
The month that this card expires.
|
String |
getExpirationYear()
The year that this card expires.
|
long |
getId()
The web service ID of this credit card.
|
String |
getLast4()
The last 4 digits of the card number.
|
String |
getType()
The type of card that this is.
|
int |
hashCode() |
boolean |
isDebit()
Whether this card is a debit card.
|
boolean |
isPromoted()
If this card is the user's main card or not.
|
String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<CreditCard> CREATOR
Parcelable
interface.public static final String AMEX
public static final String DISCOVER
public static final String MASTERCARD
public static final String SPRINT
public static final String VISA
@Deprecated public CreditCard(String description, String expirationMonth, String expirationYear, long id, String last4, boolean promoted, String type, Long bin)
CreditCard(Long, boolean, String, String, String, long, String, boolean, String)
instead. This constructor omits the debit field and has the BIN field last.public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
public Long getBin()
public boolean isDebit()
public String getDescription()
public String getExpirationMonth()
public String getExpirationYear()
public long getId()
public String getLast4()
public boolean isPromoted()
public String getType()