public final class PaymentMethodCreditCard extends PaymentMethod
Constructor and Description |
---|
PaymentMethodCreditCard(PaymentMethodType type,
java.lang.String cardNumber,
int expiryDateYear,
int expiryDateMonth,
java.lang.Integer cvv,
java.lang.String cardHolder)
Creates a new object of type PaymentMethodCreditCard.
|
Modifier and Type | Method and Description |
---|---|
PaymentMethodCreditCard |
clone()
Returns a deep copy of this object.
|
java.lang.String |
getCardHolder()
Returns the card holder's name.
|
java.lang.String |
getCardNumber()
Returns the card number.
|
java.lang.Integer |
getCVV()
Returns the CVV.
|
int |
getExpiryDateMonth()
Returns the expiration month, e.g.
|
int |
getExpiryDateYear()
Returns the expiration year, e.g.
|
java.lang.String |
getStringCVV()
Returns the CVV as a string with leading zeros.
|
createMethod, createMethods, getType
public PaymentMethodCreditCard(PaymentMethodType type, java.lang.String cardNumber, int expiryDateYear, int expiryDateMonth, java.lang.Integer cvv, java.lang.String cardHolder) throws java.lang.IllegalArgumentException
type
- Payment method type (required)cardNumber
- Credit card number (required)expiryDateYear
- Expiration year, e.g. 2012 for 2012expiryDateMonth
- Expiration month, e.g. 10 for Octobercvv
- Credit card verification code, null
if the credit
card does not have a CVV, i.e. Diner Club cards (optional)cardHolder
- Card holder's name or null
if there is no name
(optional)java.lang.IllegalArgumentException
- if one of the required arguments is missingpublic PaymentMethodCreditCard clone()
clone
in class PaymentMethod
public java.lang.String getCardHolder()
public java.lang.String getCardNumber()
public java.lang.Integer getCVV()
null
if there is no CVV.public java.lang.String getStringCVV()
null
if there is no CVV.public int getExpiryDateMonth()
10
for October.public int getExpiryDateYear()
2012
for 2012.