Package com.adyen.model.checkout
Class CardDetailsRequest
- java.lang.Object
-
- com.adyen.model.checkout.CardDetailsRequest
-
public class CardDetailsRequest extends Object
CardDetailsRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCardDetailsRequest.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CARD_NUMBERstatic StringSERIALIZED_NAME_COUNTRY_CODEstatic StringSERIALIZED_NAME_ENCRYPTED_CARD_NUMBERstatic StringSERIALIZED_NAME_MERCHANT_ACCOUNTstatic StringSERIALIZED_NAME_SUPPORTED_BRANDS
-
Constructor Summary
Constructors Constructor Description CardDetailsRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CardDetailsRequestaddSupportedBrandsItem(String supportedBrandsItem)CardDetailsRequestcardNumber(String cardNumber)CardDetailsRequestcountryCode(String countryCode)CardDetailsRequestencryptedCardNumber(String encryptedCardNumber)booleanequals(Object o)static CardDetailsRequestfromJson(String jsonString)Create an instance of CardDetailsRequest given an JSON stringStringgetCardNumber()A minimum of the first 8 digits of the card number and a maximum of the full card number.StringgetCountryCode()The shopper country.StringgetEncryptedCardNumber()The encrypted card number.StringgetMerchantAccount()The merchant account identifier, with which you want to process the transaction.List<String>getSupportedBrands()The card brands you support.inthashCode()CardDetailsRequestmerchantAccount(String merchantAccount)voidsetCardNumber(String cardNumber)voidsetCountryCode(String countryCode)voidsetEncryptedCardNumber(String encryptedCardNumber)voidsetMerchantAccount(String merchantAccount)voidsetSupportedBrands(List<String> supportedBrands)CardDetailsRequestsupportedBrands(List<String> supportedBrands)StringtoJson()Convert an instance of CardDetailsRequest 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_CARD_NUMBER
public static final String SERIALIZED_NAME_CARD_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_COUNTRY_CODE
public static final String SERIALIZED_NAME_COUNTRY_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENCRYPTED_CARD_NUMBER
public static final String SERIALIZED_NAME_ENCRYPTED_CARD_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MERCHANT_ACCOUNT
public static final String SERIALIZED_NAME_MERCHANT_ACCOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SUPPORTED_BRANDS
public static final String SERIALIZED_NAME_SUPPORTED_BRANDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
cardNumber
public CardDetailsRequest cardNumber(String cardNumber)
-
getCardNumber
public String getCardNumber()
A minimum of the first 8 digits of the card number and a maximum of the full card number. 11 digits gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data.- Returns:
- cardNumber
-
setCardNumber
public void setCardNumber(String cardNumber)
-
countryCode
public CardDetailsRequest countryCode(String countryCode)
-
getCountryCode
public String getCountryCode()
The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE- Returns:
- countryCode
-
setCountryCode
public void setCountryCode(String countryCode)
-
encryptedCardNumber
public CardDetailsRequest encryptedCardNumber(String encryptedCardNumber)
-
getEncryptedCardNumber
public String getEncryptedCardNumber()
The encrypted card number.- Returns:
- encryptedCardNumber
-
setEncryptedCardNumber
public void setEncryptedCardNumber(String encryptedCardNumber)
-
merchantAccount
public CardDetailsRequest merchantAccount(String merchantAccount)
-
getMerchantAccount
public String getMerchantAccount()
The merchant account identifier, with which you want to process the transaction.- Returns:
- merchantAccount
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
-
supportedBrands
public CardDetailsRequest supportedBrands(List<String> supportedBrands)
-
addSupportedBrandsItem
public CardDetailsRequest addSupportedBrandsItem(String supportedBrandsItem)
-
getSupportedBrands
public List<String> getSupportedBrands()
The card brands you support. This is the [`brands`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods__resParam_paymentMethods-brands) array from your [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. If not included, our API uses the ones configured for your merchant account and, if provided, the country code.- Returns:
- supportedBrands
-
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 CardDetailsRequest
-
fromJson
public static CardDetailsRequest fromJson(String jsonString) throws IOException
Create an instance of CardDetailsRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CardDetailsRequest
- Throws:
IOException- if the JSON string is invalid with respect to CardDetailsRequest
-
toJson
public String toJson()
Convert an instance of CardDetailsRequest to an JSON string- Returns:
- JSON string
-
-