Class 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.
    • Constructor Detail

      • PaymentToken

        public PaymentToken()
    • Method Detail

      • tokenRequestedType

        public PaymentToken tokenRequestedType​(TokenRequestedType tokenRequestedType)
        tokenRequestedType
        Parameters:
        tokenRequestedType -
        Returns:
        the current PaymentToken instance, 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 PaymentToken instance, 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 PaymentToken instance, 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.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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