Package com.adyen.model.payment
Class Card
- java.lang.Object
-
- com.adyen.model.payment.Card
-
public class Card extends Object
Card
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCard.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CVCstatic StringSERIALIZED_NAME_EXPIRY_MONTHstatic StringSERIALIZED_NAME_EXPIRY_YEARstatic StringSERIALIZED_NAME_HOLDER_NAMEstatic StringSERIALIZED_NAME_ISSUE_NUMBERstatic StringSERIALIZED_NAME_NUMBERstatic StringSERIALIZED_NAME_START_MONTHstatic StringSERIALIZED_NAME_START_YEAR
-
Constructor Summary
Constructors Constructor Description Card()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Cardcvc(String cvc)booleanequals(Object o)CardexpiryMonth(String expiryMonth)CardexpiryYear(String expiryYear)static CardfromJson(String jsonString)Create an instance of Card given an JSON stringStringgetCvc()The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters).StringgetExpiryMonth()The card expiry month.StringgetExpiryYear()The card expiry year.StringgetHolderName()The name of the cardholder, as printed on the card.StringgetIssueNumber()The issue number of the card (for some UK debit cards only).StringgetNumber()The card number (4-19 characters).StringgetStartMonth()The month component of the start date (for some UK debit cards only).StringgetStartYear()The year component of the start date (for some UK debit cards only).inthashCode()CardholderName(String holderName)CardissueNumber(String issueNumber)Cardnumber(String number)voidsetCvc(String cvc)voidsetExpiryMonth(String expiryMonth)voidsetExpiryYear(String expiryYear)voidsetHolderName(String holderName)voidsetIssueNumber(String issueNumber)voidsetNumber(String number)voidsetStartMonth(String startMonth)voidsetStartYear(String startYear)CardstartMonth(String startMonth)CardstartYear(String startYear)StringtoJson()Convert an instance of Card to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_CVC
public static final String SERIALIZED_NAME_CVC
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXPIRY_MONTH
public static final String SERIALIZED_NAME_EXPIRY_MONTH
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXPIRY_YEAR
public static final String SERIALIZED_NAME_EXPIRY_YEAR
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HOLDER_NAME
public static final String SERIALIZED_NAME_HOLDER_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ISSUE_NUMBER
public static final String SERIALIZED_NAME_ISSUE_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NUMBER
public static final String SERIALIZED_NAME_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_START_MONTH
public static final String SERIALIZED_NAME_START_MONTH
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_START_YEAR
public static final String SERIALIZED_NAME_START_YEAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCvc
public String getCvc()
The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.- Returns:
- cvc
-
setCvc
public void setCvc(String cvc)
-
getExpiryMonth
public String getExpiryMonth()
The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November- Returns:
- expiryMonth
-
setExpiryMonth
public void setExpiryMonth(String expiryMonth)
-
getExpiryYear
public String getExpiryYear()
The card expiry year. Format: 4 digits. For example: 2020- Returns:
- expiryYear
-
setExpiryYear
public void setExpiryYear(String expiryYear)
-
getHolderName
public String getHolderName()
The name of the cardholder, as printed on the card.- Returns:
- holderName
-
setHolderName
public void setHolderName(String holderName)
-
getIssueNumber
public String getIssueNumber()
The issue number of the card (for some UK debit cards only).- Returns:
- issueNumber
-
setIssueNumber
public void setIssueNumber(String issueNumber)
-
getNumber
public String getNumber()
The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.- Returns:
- number
-
setNumber
public void setNumber(String number)
-
getStartMonth
public String getStartMonth()
The month component of the start date (for some UK debit cards only).- Returns:
- startMonth
-
setStartMonth
public void setStartMonth(String startMonth)
-
getStartYear
public String getStartYear()
The year component of the start date (for some UK debit cards only).- Returns:
- startYear
-
setStartYear
public void setStartYear(String startYear)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to Card
-
fromJson
public static Card fromJson(String jsonString) throws IOException
Create an instance of Card given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Card
- Throws:
IOException- if the JSON string is invalid with respect to Card
-
toJson
public String toJson()
Convert an instance of Card to an JSON string- Returns:
- JSON string
-
-