Package com.adyen.model.checkout
Class CardDetails
- java.lang.Object
-
- com.adyen.model.checkout.CardDetails
-
public class CardDetails extends Object
CardDetails
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCardDetails.CustomTypeAdapterFactorystatic classCardDetails.FundingSourceEnumThe funding source that should be used when multiple sources are available.static classCardDetails.TypeEnumDefault payment method details.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CardDetails()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CardDetailsbrand(String brand)CardDetailscheckoutAttemptId(String checkoutAttemptId)CardDetailscupsecureplusSmscode(String cupsecureplusSmscode)CardDetailscvc(String cvc)CardDetailsencryptedCardNumber(String encryptedCardNumber)CardDetailsencryptedExpiryMonth(String encryptedExpiryMonth)CardDetailsencryptedExpiryYear(String encryptedExpiryYear)CardDetailsencryptedSecurityCode(String encryptedSecurityCode)booleanequals(Object o)CardDetailsexpiryMonth(String expiryMonth)CardDetailsexpiryYear(String expiryYear)static CardDetailsfromJson(String jsonString)Create an instance of CardDetails given an JSON stringCardDetailsfundingSource(CardDetails.FundingSourceEnum fundingSource)StringgetBrand()Secondary brand of the card.StringgetCheckoutAttemptId()The checkout attempt identifier.StringgetCupsecureplusSmscode()Deprecated.StringgetCvc()The card verification code.StringgetEncryptedCardNumber()The encrypted card number.StringgetEncryptedExpiryMonth()The encrypted card expiry month.StringgetEncryptedExpiryYear()The encrypted card expiry year.StringgetEncryptedSecurityCode()The encrypted card verification code.StringgetExpiryMonth()The card expiry month.StringgetExpiryYear()The card expiry year.CardDetails.FundingSourceEnumgetFundingSource()The funding source that should be used when multiple sources are available.StringgetHolderName()The name of the card holder.StringgetNetworkPaymentReference()The network token reference.StringgetNumber()The card number.StringgetRecurringDetailReference()Deprecated.StringgetShopperNotificationReference()The `shopperNotificationReference` returned in the response when you requested to notify the shopper.StringgetStoredPaymentMethodId()This is the `recurringDetailReference` returned in the response when you created the token.StringgetThreeDS2SdkVersion()Version of the 3D Secure 2 mobile SDK.CardDetails.TypeEnumgetType()Default payment method details.inthashCode()CardDetailsholderName(String holderName)CardDetailsnetworkPaymentReference(String networkPaymentReference)CardDetailsnumber(String number)CardDetailsrecurringDetailReference(String recurringDetailReference)voidsetBrand(String brand)voidsetCheckoutAttemptId(String checkoutAttemptId)voidsetCupsecureplusSmscode(String cupsecureplusSmscode)voidsetCvc(String cvc)voidsetEncryptedCardNumber(String encryptedCardNumber)voidsetEncryptedExpiryMonth(String encryptedExpiryMonth)voidsetEncryptedExpiryYear(String encryptedExpiryYear)voidsetEncryptedSecurityCode(String encryptedSecurityCode)voidsetExpiryMonth(String expiryMonth)voidsetExpiryYear(String expiryYear)voidsetFundingSource(CardDetails.FundingSourceEnum fundingSource)voidsetHolderName(String holderName)voidsetNetworkPaymentReference(String networkPaymentReference)voidsetNumber(String number)voidsetRecurringDetailReference(String recurringDetailReference)voidsetShopperNotificationReference(String shopperNotificationReference)voidsetStoredPaymentMethodId(String storedPaymentMethodId)voidsetThreeDS2SdkVersion(String threeDS2SdkVersion)voidsetType(CardDetails.TypeEnum type)CardDetailsshopperNotificationReference(String shopperNotificationReference)CardDetailsstoredPaymentMethodId(String storedPaymentMethodId)CardDetailsthreeDS2SdkVersion(String threeDS2SdkVersion)StringtoJson()Convert an instance of CardDetails to an JSON stringStringtoString()CardDetailstype(CardDetails.TypeEnum type)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_BRAND
public static final String SERIALIZED_NAME_BRAND
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CHECKOUT_ATTEMPT_ID
public static final String SERIALIZED_NAME_CHECKOUT_ATTEMPT_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CUPSECUREPLUS_SMSCODE
public static final String SERIALIZED_NAME_CUPSECUREPLUS_SMSCODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CVC
public static final String SERIALIZED_NAME_CVC
- 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_ENCRYPTED_EXPIRY_MONTH
public static final String SERIALIZED_NAME_ENCRYPTED_EXPIRY_MONTH
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENCRYPTED_EXPIRY_YEAR
public static final String SERIALIZED_NAME_ENCRYPTED_EXPIRY_YEAR
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENCRYPTED_SECURITY_CODE
public static final String SERIALIZED_NAME_ENCRYPTED_SECURITY_CODE
- 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_FUNDING_SOURCE
public static final String SERIALIZED_NAME_FUNDING_SOURCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HOLDER_NAME
public static final String SERIALIZED_NAME_HOLDER_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NETWORK_PAYMENT_REFERENCE
public static final String SERIALIZED_NAME_NETWORK_PAYMENT_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NUMBER
public static final String SERIALIZED_NAME_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RECURRING_DETAIL_REFERENCE
public static final String SERIALIZED_NAME_RECURRING_DETAIL_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SHOPPER_NOTIFICATION_REFERENCE
public static final String SERIALIZED_NAME_SHOPPER_NOTIFICATION_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STORED_PAYMENT_METHOD_ID
public static final String SERIALIZED_NAME_STORED_PAYMENT_METHOD_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_THREE_D_S2_SDK_VERSION
public static final String SERIALIZED_NAME_THREE_D_S2_SDK_VERSION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
brand
public CardDetails brand(String brand)
-
getBrand
public String getBrand()
Secondary brand of the card. For example: **plastix**, **hmclub**.- Returns:
- brand
-
setBrand
public void setBrand(String brand)
-
checkoutAttemptId
public CardDetails checkoutAttemptId(String checkoutAttemptId)
-
getCheckoutAttemptId
public String getCheckoutAttemptId()
The checkout attempt identifier.- Returns:
- checkoutAttemptId
-
setCheckoutAttemptId
public void setCheckoutAttemptId(String checkoutAttemptId)
-
cupsecureplusSmscode
public CardDetails cupsecureplusSmscode(String cupsecureplusSmscode)
-
getCupsecureplusSmscode
@Deprecated public String getCupsecureplusSmscode()
Deprecated.Get cupsecureplusSmscode- Returns:
- cupsecureplusSmscode
-
setCupsecureplusSmscode
public void setCupsecureplusSmscode(String cupsecureplusSmscode)
-
cvc
public CardDetails cvc(String cvc)
-
getCvc
public String getCvc()
The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).- Returns:
- cvc
-
setCvc
public void setCvc(String cvc)
-
encryptedCardNumber
public CardDetails encryptedCardNumber(String encryptedCardNumber)
-
getEncryptedCardNumber
public String getEncryptedCardNumber()
The encrypted card number.- Returns:
- encryptedCardNumber
-
setEncryptedCardNumber
public void setEncryptedCardNumber(String encryptedCardNumber)
-
encryptedExpiryMonth
public CardDetails encryptedExpiryMonth(String encryptedExpiryMonth)
-
getEncryptedExpiryMonth
public String getEncryptedExpiryMonth()
The encrypted card expiry month.- Returns:
- encryptedExpiryMonth
-
setEncryptedExpiryMonth
public void setEncryptedExpiryMonth(String encryptedExpiryMonth)
-
encryptedExpiryYear
public CardDetails encryptedExpiryYear(String encryptedExpiryYear)
-
getEncryptedExpiryYear
public String getEncryptedExpiryYear()
The encrypted card expiry year.- Returns:
- encryptedExpiryYear
-
setEncryptedExpiryYear
public void setEncryptedExpiryYear(String encryptedExpiryYear)
-
encryptedSecurityCode
public CardDetails encryptedSecurityCode(String encryptedSecurityCode)
-
getEncryptedSecurityCode
public String getEncryptedSecurityCode()
The encrypted card verification code.- Returns:
- encryptedSecurityCode
-
setEncryptedSecurityCode
public void setEncryptedSecurityCode(String encryptedSecurityCode)
-
expiryMonth
public CardDetails expiryMonth(String expiryMonth)
-
getExpiryMonth
public String getExpiryMonth()
The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).- Returns:
- expiryMonth
-
setExpiryMonth
public void setExpiryMonth(String expiryMonth)
-
expiryYear
public CardDetails expiryYear(String expiryYear)
-
getExpiryYear
public String getExpiryYear()
The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).- Returns:
- expiryYear
-
setExpiryYear
public void setExpiryYear(String expiryYear)
-
fundingSource
public CardDetails fundingSource(CardDetails.FundingSourceEnum fundingSource)
-
getFundingSource
public CardDetails.FundingSourceEnum getFundingSource()
The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.- Returns:
- fundingSource
-
setFundingSource
public void setFundingSource(CardDetails.FundingSourceEnum fundingSource)
-
holderName
public CardDetails holderName(String holderName)
-
getHolderName
public String getHolderName()
The name of the card holder.- Returns:
- holderName
-
setHolderName
public void setHolderName(String holderName)
-
networkPaymentReference
public CardDetails networkPaymentReference(String networkPaymentReference)
-
getNetworkPaymentReference
public String getNetworkPaymentReference()
The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.- Returns:
- networkPaymentReference
-
setNetworkPaymentReference
public void setNetworkPaymentReference(String networkPaymentReference)
-
number
public CardDetails number(String number)
-
getNumber
public String getNumber()
The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).- Returns:
- number
-
setNumber
public void setNumber(String number)
-
recurringDetailReference
public CardDetails recurringDetailReference(String recurringDetailReference)
-
getRecurringDetailReference
@Deprecated public String getRecurringDetailReference()
Deprecated.This is the `recurringDetailReference` returned in the response when you created the token.- Returns:
- recurringDetailReference
-
setRecurringDetailReference
public void setRecurringDetailReference(String recurringDetailReference)
-
shopperNotificationReference
public CardDetails shopperNotificationReference(String shopperNotificationReference)
-
getShopperNotificationReference
public String getShopperNotificationReference()
The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India.- Returns:
- shopperNotificationReference
-
setShopperNotificationReference
public void setShopperNotificationReference(String shopperNotificationReference)
-
storedPaymentMethodId
public CardDetails storedPaymentMethodId(String storedPaymentMethodId)
-
getStoredPaymentMethodId
public String getStoredPaymentMethodId()
This is the `recurringDetailReference` returned in the response when you created the token.- Returns:
- storedPaymentMethodId
-
setStoredPaymentMethodId
public void setStoredPaymentMethodId(String storedPaymentMethodId)
-
threeDS2SdkVersion
public CardDetails threeDS2SdkVersion(String threeDS2SdkVersion)
-
getThreeDS2SdkVersion
public String getThreeDS2SdkVersion()
Version of the 3D Secure 2 mobile SDK.- Returns:
- threeDS2SdkVersion
-
setThreeDS2SdkVersion
public void setThreeDS2SdkVersion(String threeDS2SdkVersion)
-
type
public CardDetails type(CardDetails.TypeEnum type)
-
getType
public CardDetails.TypeEnum getType()
Default payment method details. Common for scheme payment methods, and for simple payment method details.- Returns:
- type
-
setType
public void setType(CardDetails.TypeEnum type)
-
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 CardDetails
-
fromJson
public static CardDetails fromJson(String jsonString) throws IOException
Create an instance of CardDetails given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CardDetails
- Throws:
IOException- if the JSON string is invalid with respect to CardDetails
-
toJson
public String toJson()
Convert an instance of CardDetails to an JSON string- Returns:
- JSON string
-
-