Package com.adyen.model.recurring
Class Card
- java.lang.Object
-
- com.adyen.model.recurring.Card
-
public class Card extends Object
Card
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CVCstatic StringJSON_PROPERTY_EXPIRY_MONTHstatic StringJSON_PROPERTY_EXPIRY_YEARstatic StringJSON_PROPERTY_HOLDER_NAMEstatic StringJSON_PROPERTY_ISSUE_NUMBERstatic StringJSON_PROPERTY_NUMBERstatic StringJSON_PROPERTY_START_MONTHstatic StringJSON_PROPERTY_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)The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters).booleanequals(Object o)Return true if this Card object is equal to o.CardexpiryMonth(String expiryMonth)The card expiry month.CardexpiryYear(String expiryYear)The card expiry year.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)The name of the cardholder, as printed on the card.CardissueNumber(String issueNumber)The issue number of the card (for some UK debit cards only).Cardnumber(String number)The card number (4-19 characters).voidsetCvc(String cvc)The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters).voidsetExpiryMonth(String expiryMonth)The card expiry month.voidsetExpiryYear(String expiryYear)The card expiry year.voidsetHolderName(String holderName)The name of the cardholder, as printed on the card.voidsetIssueNumber(String issueNumber)The issue number of the card (for some UK debit cards only).voidsetNumber(String number)The card number (4-19 characters).voidsetStartMonth(String startMonth)The month component of the start date (for some UK debit cards only).voidsetStartYear(String startYear)The year component of the start date (for some UK debit cards only).CardstartMonth(String startMonth)The month component of the start date (for some UK debit cards only).CardstartYear(String startYear)The year component of the start date (for some UK debit cards only).StringtoJson()Convert an instance of Card to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_CVC
public static final String JSON_PROPERTY_CVC
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EXPIRY_MONTH
public static final String JSON_PROPERTY_EXPIRY_MONTH
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EXPIRY_YEAR
public static final String JSON_PROPERTY_EXPIRY_YEAR
- See Also:
- Constant Field Values
-
JSON_PROPERTY_HOLDER_NAME
public static final String JSON_PROPERTY_HOLDER_NAME
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ISSUE_NUMBER
public static final String JSON_PROPERTY_ISSUE_NUMBER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_NUMBER
public static final String JSON_PROPERTY_NUMBER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_START_MONTH
public static final String JSON_PROPERTY_START_MONTH
- See Also:
- Constant Field Values
-
JSON_PROPERTY_START_YEAR
public static final String JSON_PROPERTY_START_YEAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
cvc
public Card cvc(String cvc)
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.- Parameters:
cvc-- Returns:
- the current
Cardinstance, allowing for method chaining
-
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)
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.- Parameters:
cvc-
-
expiryMonth
public Card expiryMonth(String expiryMonth)
The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November- Parameters:
expiryMonth-- Returns:
- the current
Cardinstance, allowing for method chaining
-
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)
The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November- Parameters:
expiryMonth-
-
expiryYear
public Card expiryYear(String expiryYear)
The card expiry year. Format: 4 digits. For example: 2020- Parameters:
expiryYear-- Returns:
- the current
Cardinstance, allowing for method chaining
-
getExpiryYear
public String getExpiryYear()
The card expiry year. Format: 4 digits. For example: 2020- Returns:
- expiryYear
-
setExpiryYear
public void setExpiryYear(String expiryYear)
The card expiry year. Format: 4 digits. For example: 2020- Parameters:
expiryYear-
-
holderName
public Card holderName(String holderName)
The name of the cardholder, as printed on the card.- Parameters:
holderName-- Returns:
- the current
Cardinstance, allowing for method chaining
-
getHolderName
public String getHolderName()
The name of the cardholder, as printed on the card.- Returns:
- holderName
-
setHolderName
public void setHolderName(String holderName)
The name of the cardholder, as printed on the card.- Parameters:
holderName-
-
issueNumber
public Card issueNumber(String issueNumber)
The issue number of the card (for some UK debit cards only).- Parameters:
issueNumber-- Returns:
- the current
Cardinstance, allowing for method chaining
-
getIssueNumber
public String getIssueNumber()
The issue number of the card (for some UK debit cards only).- Returns:
- issueNumber
-
setIssueNumber
public void setIssueNumber(String issueNumber)
The issue number of the card (for some UK debit cards only).- Parameters:
issueNumber-
-
number
public Card number(String number)
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.- Parameters:
number-- Returns:
- the current
Cardinstance, allowing for method chaining
-
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)
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.- Parameters:
number-
-
startMonth
public Card startMonth(String startMonth)
The month component of the start date (for some UK debit cards only).- Parameters:
startMonth-- Returns:
- the current
Cardinstance, allowing for method chaining
-
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)
The month component of the start date (for some UK debit cards only).- Parameters:
startMonth-
-
startYear
public Card startYear(String startYear)
The year component of the start date (for some UK debit cards only).- Parameters:
startYear-- Returns:
- the current
Cardinstance, allowing for method chaining
-
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)
The year component of the start date (for some UK debit cards only).- Parameters:
startYear-
-
equals
public boolean equals(Object o)
Return true if this Card object is equal to o.
-
fromJson
public static Card fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Card given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Card
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Card
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Card to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-