Package com.adyen.model.tapi
Class CardData
- java.lang.Object
-
- com.adyen.model.tapi.CardData
-
public class CardData extends Object
Information related to the payment card used for the transaction. Allows acquisition of the card data by the Sale System before the Payment, CardAcquisition, or BalanceInquiry request to the POI. It can also be sent in the CardAcquisition response, to be processed by the Sale System.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCardData.EntryModeEnumGets or Sets entryMode
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CARD_COUNTRY_CODEstatic StringJSON_PROPERTY_ENTRY_MODEstatic StringJSON_PROPERTY_MASKED_PANstatic StringJSON_PROPERTY_PAYMENT_ACCOUNT_REFstatic StringJSON_PROPERTY_PAYMENT_BRANDstatic StringJSON_PROPERTY_PAYMENT_TOKENstatic StringJSON_PROPERTY_PROTECTED_CARD_DATAstatic StringJSON_PROPERTY_SENSITIVE_CARD_DATA
-
Constructor Summary
Constructors Constructor Description CardData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CardDataaddEntryModeItem(CardData.EntryModeEnum entryModeItem)CardDatacardCountryCode(Integer cardCountryCode)Country Code attached to the card (3 numerics).CardDataentryMode(List<CardData.EntryModeEnum> entryMode)entryModebooleanequals(Object o)Return true if this CardData object is equal to o.static CardDatafromJson(String jsonString)Create an instance of CardData given an JSON stringIntegergetCardCountryCode()Country Code attached to the card (3 numerics).List<CardData.EntryModeEnum>getEntryMode()Get entryModeMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetMaskedPan()Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship.StringgetPaymentAccountRef()Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference).StringgetPaymentBrand()Type of payment card.PaymentTokengetPaymentToken()Get paymentTokenStringgetProtectedCardData()Sensitive information related to the payment card, protected by CMS.SensitiveCardDatagetSensitiveCardData()Get sensitiveCardDatainthashCode()CardDataincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.CardDatamaskedPan(String maskedPan)Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship.CardDatapaymentAccountRef(String paymentAccountRef)Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference).CardDatapaymentBrand(String paymentBrand)Type of payment card.CardDatapaymentToken(PaymentToken paymentToken)paymentTokenCardDataprotectedCardData(String protectedCardData)Sensitive information related to the payment card, protected by CMS.CardDatasensitiveCardData(SensitiveCardData sensitiveCardData)sensitiveCardDatavoidsetCardCountryCode(Integer cardCountryCode)Country Code attached to the card (3 numerics).voidsetEntryMode(List<CardData.EntryModeEnum> entryMode)entryModevoidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetMaskedPan(String maskedPan)Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship.voidsetPaymentAccountRef(String paymentAccountRef)Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference).voidsetPaymentBrand(String paymentBrand)Type of payment card.voidsetPaymentToken(PaymentToken paymentToken)paymentTokenvoidsetProtectedCardData(String protectedCardData)Sensitive information related to the payment card, protected by CMS.voidsetSensitiveCardData(SensitiveCardData sensitiveCardData)sensitiveCardDataStringtoJson()Convert an instance of CardData to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_PAYMENT_BRAND
public static final String JSON_PROPERTY_PAYMENT_BRAND
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MASKED_PAN
public static final String JSON_PROPERTY_MASKED_PAN
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT_ACCOUNT_REF
public static final String JSON_PROPERTY_PAYMENT_ACCOUNT_REF
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ENTRY_MODE
public static final String JSON_PROPERTY_ENTRY_MODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CARD_COUNTRY_CODE
public static final String JSON_PROPERTY_CARD_COUNTRY_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PROTECTED_CARD_DATA
public static final String JSON_PROPERTY_PROTECTED_CARD_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SENSITIVE_CARD_DATA
public static final String JSON_PROPERTY_SENSITIVE_CARD_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT_TOKEN
public static final String JSON_PROPERTY_PAYMENT_TOKEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
paymentBrand
public CardData paymentBrand(String paymentBrand)
Type of payment card. If card PAN is readable. Indicates the card used to pay in the PaymentResponse. Sent in the CardAcquisitionResponse, to leave the Cashier to choose between several applications in a smartcard, or several brand in a co-branded card. In this case, the CardAcquisitionRequest.ForceCustomerSelectionFlag must contain the value False. Brands are part of the POI and Sale Systems configurations.- Parameters:
paymentBrand- Type of payment card. If card PAN is readable. Indicates the card used to pay in the PaymentResponse. Sent in the CardAcquisitionResponse, to leave the Cashier to choose between several applications in a smartcard, or several brand in a co-branded card. In this case, the CardAcquisitionRequest.ForceCustomerSelectionFlag must contain the value False. Brands are part of the POI and Sale Systems configurations.- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getPaymentBrand
public String getPaymentBrand()
Type of payment card. If card PAN is readable. Indicates the card used to pay in the PaymentResponse. Sent in the CardAcquisitionResponse, to leave the Cashier to choose between several applications in a smartcard, or several brand in a co-branded card. In this case, the CardAcquisitionRequest.ForceCustomerSelectionFlag must contain the value False. Brands are part of the POI and Sale Systems configurations.- Returns:
- paymentBrand Type of payment card. If card PAN is readable. Indicates the card used to pay in the PaymentResponse. Sent in the CardAcquisitionResponse, to leave the Cashier to choose between several applications in a smartcard, or several brand in a co-branded card. In this case, the CardAcquisitionRequest.ForceCustomerSelectionFlag must contain the value False. Brands are part of the POI and Sale Systems configurations.
-
setPaymentBrand
public void setPaymentBrand(String paymentBrand)
Type of payment card. If card PAN is readable. Indicates the card used to pay in the PaymentResponse. Sent in the CardAcquisitionResponse, to leave the Cashier to choose between several applications in a smartcard, or several brand in a co-branded card. In this case, the CardAcquisitionRequest.ForceCustomerSelectionFlag must contain the value False. Brands are part of the POI and Sale Systems configurations.- Parameters:
paymentBrand- Type of payment card. If card PAN is readable. Indicates the card used to pay in the PaymentResponse. Sent in the CardAcquisitionResponse, to leave the Cashier to choose between several applications in a smartcard, or several brand in a co-branded card. In this case, the CardAcquisitionRequest.ForceCustomerSelectionFlag must contain the value False. Brands are part of the POI and Sale Systems configurations.
-
maskedPan
public CardData maskedPan(String maskedPan)
Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship. Presence of this data element, which replace the PAN when SensitiveCardData is protected and replaced by ProtectedCardData. Alternatively the MaskedPAN can be used as a token to identify a customer.- Parameters:
maskedPan- Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship. Presence of this data element, which replace the PAN when SensitiveCardData is protected and replaced by ProtectedCardData. Alternatively the MaskedPAN can be used as a token to identify a customer.- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getMaskedPan
public String getMaskedPan()
Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship. Presence of this data element, which replace the PAN when SensitiveCardData is protected and replaced by ProtectedCardData. Alternatively the MaskedPAN can be used as a token to identify a customer.- Returns:
- maskedPan Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship. Presence of this data element, which replace the PAN when SensitiveCardData is protected and replaced by ProtectedCardData. Alternatively the MaskedPAN can be used as a token to identify a customer.
-
setMaskedPan
public void setMaskedPan(String maskedPan)
Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship. Presence of this data element, which replace the PAN when SensitiveCardData is protected and replaced by ProtectedCardData. Alternatively the MaskedPAN can be used as a token to identify a customer.- Parameters:
maskedPan- Masked Primary Account Number Part of the PAN is replaced by a string of * characters, to identify a customer account or relationship. Presence of this data element, which replace the PAN when SensitiveCardData is protected and replaced by ProtectedCardData. Alternatively the MaskedPAN can be used as a token to identify a customer.
-
paymentAccountRef
public CardData paymentAccountRef(String paymentAccountRef)
Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.- Parameters:
paymentAccountRef- Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getPaymentAccountRef
public String getPaymentAccountRef()
Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.- Returns:
- paymentAccountRef Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.
-
setPaymentAccountRef
public void setPaymentAccountRef(String paymentAccountRef)
Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.- Parameters:
paymentAccountRef- Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.
-
entryMode
public CardData entryMode(List<CardData.EntryModeEnum> entryMode)
entryMode- Parameters:
entryMode-- Returns:
- the current
CardDatainstance, allowing for method chaining
-
addEntryModeItem
public CardData addEntryModeItem(CardData.EntryModeEnum entryModeItem)
-
getEntryMode
public List<CardData.EntryModeEnum> getEntryMode()
Get entryMode- Returns:
- entryMode
-
setEntryMode
public void setEntryMode(List<CardData.EntryModeEnum> entryMode)
entryMode- Parameters:
entryMode-
-
cardCountryCode
public CardData cardCountryCode(Integer cardCountryCode)
Country Code attached to the card (3 numerics). If available in the card.- Parameters:
cardCountryCode- Country Code attached to the card (3 numerics). If available in the card.- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getCardCountryCode
public Integer getCardCountryCode()
Country Code attached to the card (3 numerics). If available in the card. minimum: 3 maximum: 3- Returns:
- cardCountryCode Country Code attached to the card (3 numerics). If available in the card.
-
setCardCountryCode
public void setCardCountryCode(Integer cardCountryCode)
Country Code attached to the card (3 numerics). If available in the card.- Parameters:
cardCountryCode- Country Code attached to the card (3 numerics). If available in the card.
-
protectedCardData
public CardData protectedCardData(String protectedCardData)
Sensitive information related to the payment card, protected by CMS. SensitiveCardData protected by CMS EnvelopedData.- Parameters:
protectedCardData- Sensitive information related to the payment card, protected by CMS. SensitiveCardData protected by CMS EnvelopedData.- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getProtectedCardData
public String getProtectedCardData()
Sensitive information related to the payment card, protected by CMS. SensitiveCardData protected by CMS EnvelopedData.- Returns:
- protectedCardData Sensitive information related to the payment card, protected by CMS. SensitiveCardData protected by CMS EnvelopedData.
-
setProtectedCardData
public void setProtectedCardData(String protectedCardData)
Sensitive information related to the payment card, protected by CMS. SensitiveCardData protected by CMS EnvelopedData.- Parameters:
protectedCardData- Sensitive information related to the payment card, protected by CMS. SensitiveCardData protected by CMS EnvelopedData.
-
sensitiveCardData
public CardData sensitiveCardData(SensitiveCardData sensitiveCardData)
sensitiveCardData- Parameters:
sensitiveCardData-- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getSensitiveCardData
public SensitiveCardData getSensitiveCardData()
Get sensitiveCardData- Returns:
- sensitiveCardData
-
setSensitiveCardData
public void setSensitiveCardData(SensitiveCardData sensitiveCardData)
sensitiveCardData- Parameters:
sensitiveCardData-
-
paymentToken
public CardData paymentToken(PaymentToken paymentToken)
paymentToken- Parameters:
paymentToken-- Returns:
- the current
CardDatainstance, allowing for method chaining
-
getPaymentToken
public PaymentToken getPaymentToken()
Get paymentToken- Returns:
- paymentToken
-
setPaymentToken
public void setPaymentToken(PaymentToken paymentToken)
paymentToken- Parameters:
paymentToken-
-
includeNullValues
public CardData includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this CardData object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static CardData fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of CardData given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CardData
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to CardData
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of CardData to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-