Class Payment


  • public class Payment
    extends Object
    Payment
    • Constructor Detail

      • Payment

        public Payment()
    • Method Detail

      • amount

        public Payment amount​(Amount amount)
        amount
        Parameters:
        amount -
        Returns:
        the current Payment instance, allowing for method chaining
      • getAmount

        public Amount getAmount()
        Get amount
        Returns:
        amount
      • setAmount

        public void setAmount​(Amount amount)
        amount
        Parameters:
        amount -
      • paymentMethod

        public Payment paymentMethod​(ResponsePaymentMethod paymentMethod)
        paymentMethod
        Parameters:
        paymentMethod -
        Returns:
        the current Payment instance, allowing for method chaining
      • getPaymentMethod

        public ResponsePaymentMethod getPaymentMethod()
        Get paymentMethod
        Returns:
        paymentMethod
      • setPaymentMethod

        public void setPaymentMethod​(ResponsePaymentMethod paymentMethod)
        paymentMethod
        Parameters:
        paymentMethod -
      • pspReference

        public Payment pspReference​(String pspReference)
        Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
        Parameters:
        pspReference - Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
        Returns:
        the current Payment instance, allowing for method chaining
      • getPspReference

        public String getPspReference()
        Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
        Returns:
        pspReference Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
      • setPspReference

        public void setPspReference​(String pspReference)
        Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
        Parameters:
        pspReference - Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
      • resultCode

        public Payment resultCode​(Payment.ResultCodeEnum resultCode)
        The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Received** – Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments. * **Pending** – The payment order was successfully received but the final status of the payment is not available yet. This is common for payment methods with an asynchronous flow.
        Parameters:
        resultCode - The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Received** – Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments. * **Pending** – The payment order was successfully received but the final status of the payment is not available yet. This is common for payment methods with an asynchronous flow.
        Returns:
        the current Payment instance, allowing for method chaining
      • getResultCode

        public Payment.ResultCodeEnum getResultCode()
        The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Received** – Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments. * **Pending** – The payment order was successfully received but the final status of the payment is not available yet. This is common for payment methods with an asynchronous flow.
        Returns:
        resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Received** – Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments. * **Pending** – The payment order was successfully received but the final status of the payment is not available yet. This is common for payment methods with an asynchronous flow.
      • setResultCode

        public void setResultCode​(Payment.ResultCodeEnum resultCode)
        The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Received** – Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments. * **Pending** – The payment order was successfully received but the final status of the payment is not available yet. This is common for payment methods with an asynchronous flow.
        Parameters:
        resultCode - The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Received** – Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments. * **Pending** – The payment order was successfully received but the final status of the payment is not available yet. This is common for payment methods with an asynchronous flow.
      • includeNullValues

        public Payment 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 Payment 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 Payment fromJson​(String jsonString)
                                throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Payment given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Payment
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Payment
      • toJson

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