Class Card


  • public class Card
    extends Object
    Card
    • Constructor Detail

      • Card

        public Card()
    • Method Detail

      • cvc

        public Card cvc​(String cvc)
        The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.
        Parameters:
        cvc -
        Returns:
        the current Card instance, allowing for method chaining
      • getCvc

        public String getCvc()
        The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.
        Returns:
        cvc
      • setCvc

        public void setCvc​(String cvc)
        The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.
        Parameters:
        cvc -
      • expiryMonth

        public Card expiryMonth​(String expiryMonth)
        The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November
        Parameters:
        expiryMonth -
        Returns:
        the current Card instance, allowing for method chaining
      • getExpiryMonth

        public String getExpiryMonth()
        The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November
        Returns:
        expiryMonth
      • setExpiryMonth

        public void setExpiryMonth​(String expiryMonth)
        The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November
        Parameters:
        expiryMonth -
      • expiryYear

        public Card expiryYear​(String expiryYear)
        The card expiry year. Format: 4 digits. For example: 2020
        Parameters:
        expiryYear -
        Returns:
        the current Card instance, allowing for method chaining
      • getExpiryYear

        public String getExpiryYear()
        The card expiry year. Format: 4 digits. For example: 2020
        Returns:
        expiryYear
      • setExpiryYear

        public void setExpiryYear​(String expiryYear)
        The card expiry year. Format: 4 digits. For example: 2020
        Parameters:
        expiryYear -
      • holderName

        public Card holderName​(String holderName)
        The name of the cardholder, as printed on the card.
        Parameters:
        holderName -
        Returns:
        the current Card instance, allowing for method chaining
      • getHolderName

        public String getHolderName()
        The name of the cardholder, as printed on the card.
        Returns:
        holderName
      • setHolderName

        public void setHolderName​(String holderName)
        The name of the cardholder, as printed on the card.
        Parameters:
        holderName -
      • issueNumber

        public Card issueNumber​(String issueNumber)
        The issue number of the card (for some UK debit cards only).
        Parameters:
        issueNumber -
        Returns:
        the current Card instance, allowing for method chaining
      • getIssueNumber

        public String getIssueNumber()
        The issue number of the card (for some UK debit cards only).
        Returns:
        issueNumber
      • setIssueNumber

        public void setIssueNumber​(String issueNumber)
        The issue number of the card (for some UK debit cards only).
        Parameters:
        issueNumber -
      • number

        public Card number​(String number)
        The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.
        Parameters:
        number -
        Returns:
        the current Card instance, allowing for method chaining
      • getNumber

        public String getNumber()
        The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.
        Returns:
        number
      • setNumber

        public void setNumber​(String number)
        The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.
        Parameters:
        number -
      • startMonth

        public Card startMonth​(String startMonth)
        The month component of the start date (for some UK debit cards only).
        Parameters:
        startMonth -
        Returns:
        the current Card instance, allowing for method chaining
      • getStartMonth

        public String getStartMonth()
        The month component of the start date (for some UK debit cards only).
        Returns:
        startMonth
      • setStartMonth

        public void setStartMonth​(String startMonth)
        The month component of the start date (for some UK debit cards only).
        Parameters:
        startMonth -
      • startYear

        public Card startYear​(String startYear)
        The year component of the start date (for some UK debit cards only).
        Parameters:
        startYear -
        Returns:
        the current Card instance, allowing for method chaining
      • getStartYear

        public String getStartYear()
        The year component of the start date (for some UK debit cards only).
        Returns:
        startYear
      • setStartYear

        public void setStartYear​(String startYear)
        The year component of the start date (for some UK debit cards only).
        Parameters:
        startYear -
      • equals

        public boolean equals​(Object o)
        Return true if this Card object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static Card fromJson​(String jsonString)
                             throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Card given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Card
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Card
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Card to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException