Class DonationResponse


  • public class DonationResponse
    extends Object
    DonationResponse
    • Constructor Detail

      • DonationResponse

        public DonationResponse()
    • Method Detail

      • getAmount

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

        public void setAmount​(Amount amount)
      • getDonationAccount

        public String getDonationAccount()
        The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding).
        Returns:
        donationAccount
      • setDonationAccount

        public void setDonationAccount​(String donationAccount)
      • getId

        public String getId()
        Your unique resource identifier.
        Returns:
        id
      • setId

        public void setId​(String id)
      • getMerchantAccount

        public String getMerchantAccount()
        The merchant account identifier, with which you want to process the transaction.
        Returns:
        merchantAccount
      • setMerchantAccount

        public void setMerchantAccount​(String merchantAccount)
      • getPayment

        public PaymentResponse getPayment()
        Get payment
        Returns:
        payment
      • getReference

        public String getReference()
        The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.
        Returns:
        reference
      • setReference

        public void setReference​(String reference)
      • getStatus

        public DonationResponse.StatusEnum getStatus()
        The status of the donation transaction. Possible values: * **completed** * **pending** * **refused**
        Returns:
        status
      • hashCode

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

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to DonationResponse
      • fromJson

        public static DonationResponse fromJson​(String jsonString)
                                         throws IOException
        Create an instance of DonationResponse given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of DonationResponse
        Throws:
        IOException - if the JSON string is invalid with respect to DonationResponse
      • toJson

        public String toJson()
        Convert an instance of DonationResponse to an JSON string
        Returns:
        JSON string