Package com.adyen.model.tapi
Class PaymentToken
- java.lang.Object
-
- com.adyen.model.tapi.PaymentToken
-
public class PaymentToken extends Object
Surrogate of the PAN (Primary Account Number) of the payment card to identify the payment mean of the customer. It allows, for a merchant, to identify the customer.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_EXPIRY_DATE_TIMEstatic StringJSON_PROPERTY_TOKEN_REQUESTED_TYPEstatic StringJSON_PROPERTY_TOKEN_VALUE
-
Constructor Summary
Constructors Constructor Description PaymentToken()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Return true if this PaymentToken object is equal to o.PaymentTokenexpiryDateTime(OffsetDateTime expiryDateTime)Expiry date and time.static PaymentTokenfromJson(String jsonString)Create an instance of PaymentToken given an JSON stringOffsetDateTimegetExpiryDateTime()Expiry date and time.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.TokenRequestedTypegetTokenRequestedType()Get tokenRequestedTypeStringgetTokenValue()Payment token replacing the PAN of the payment card to identify the payment mean of the customer.inthashCode()PaymentTokenincludeNullValues(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.voidsetExpiryDateTime(OffsetDateTime expiryDateTime)Expiry date and time.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetTokenRequestedType(TokenRequestedType tokenRequestedType)tokenRequestedTypevoidsetTokenValue(String tokenValue)Payment token replacing the PAN of the payment card to identify the payment mean of the customer.StringtoJson()Convert an instance of PaymentToken to an JSON stringPaymentTokentokenRequestedType(TokenRequestedType tokenRequestedType)tokenRequestedTypePaymentTokentokenValue(String tokenValue)Payment token replacing the PAN of the payment card to identify the payment mean of the customer.StringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_TOKEN_REQUESTED_TYPE
public static final String JSON_PROPERTY_TOKEN_REQUESTED_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TOKEN_VALUE
public static final String JSON_PROPERTY_TOKEN_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EXPIRY_DATE_TIME
public static final String JSON_PROPERTY_EXPIRY_DATE_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
tokenRequestedType
public PaymentToken tokenRequestedType(TokenRequestedType tokenRequestedType)
tokenRequestedType- Parameters:
tokenRequestedType-- Returns:
- the current
PaymentTokeninstance, allowing for method chaining
-
getTokenRequestedType
public TokenRequestedType getTokenRequestedType()
Get tokenRequestedType- Returns:
- tokenRequestedType
-
setTokenRequestedType
public void setTokenRequestedType(TokenRequestedType tokenRequestedType)
tokenRequestedType- Parameters:
tokenRequestedType-
-
tokenValue
public PaymentToken tokenValue(String tokenValue)
Payment token replacing the PAN of the payment card to identify the payment mean of the customer.- Parameters:
tokenValue- Payment token replacing the PAN of the payment card to identify the payment mean of the customer.- Returns:
- the current
PaymentTokeninstance, allowing for method chaining
-
getTokenValue
public String getTokenValue()
Payment token replacing the PAN of the payment card to identify the payment mean of the customer.- Returns:
- tokenValue Payment token replacing the PAN of the payment card to identify the payment mean of the customer.
-
setTokenValue
public void setTokenValue(String tokenValue)
Payment token replacing the PAN of the payment card to identify the payment mean of the customer.- Parameters:
tokenValue- Payment token replacing the PAN of the payment card to identify the payment mean of the customer.
-
expiryDateTime
public PaymentToken expiryDateTime(OffsetDateTime expiryDateTime)
Expiry date and time. Limits the validity of a payment token.- Parameters:
expiryDateTime- Expiry date and time. Limits the validity of a payment token.- Returns:
- the current
PaymentTokeninstance, allowing for method chaining
-
getExpiryDateTime
public OffsetDateTime getExpiryDateTime()
Expiry date and time. Limits the validity of a payment token.- Returns:
- expiryDateTime Expiry date and time. Limits the validity of a payment token.
-
setExpiryDateTime
public void setExpiryDateTime(OffsetDateTime expiryDateTime)
Expiry date and time. Limits the validity of a payment token.- Parameters:
expiryDateTime- Expiry date and time. Limits the validity of a payment token.
-
includeNullValues
public PaymentToken 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 PaymentToken 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 PaymentToken fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PaymentToken given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentToken
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PaymentToken
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PaymentToken to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-