Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Adyen Checkout API
*
* The version of the OpenAPI document: 71
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.checkout;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.checkout.Amount;
import com.adyen.model.checkout.CheckoutOrderResponse;
import com.adyen.model.checkout.FraudResult;
import com.adyen.model.checkout.PaymentResponseAction;
import com.adyen.model.checkout.ResponsePaymentMethod;
import com.adyen.model.checkout.ThreeDS2ResponseData;
import com.adyen.model.checkout.ThreeDS2Result;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* PaymentResponse
*/
@JsonPropertyOrder({
PaymentResponse.JSON_PROPERTY_ACTION,
PaymentResponse.JSON_PROPERTY_ADDITIONAL_DATA,
PaymentResponse.JSON_PROPERTY_AMOUNT,
PaymentResponse.JSON_PROPERTY_DONATION_TOKEN,
PaymentResponse.JSON_PROPERTY_FRAUD_RESULT,
PaymentResponse.JSON_PROPERTY_MERCHANT_REFERENCE,
PaymentResponse.JSON_PROPERTY_ORDER,
PaymentResponse.JSON_PROPERTY_PAYMENT_METHOD,
PaymentResponse.JSON_PROPERTY_PSP_REFERENCE,
PaymentResponse.JSON_PROPERTY_REFUSAL_REASON,
PaymentResponse.JSON_PROPERTY_REFUSAL_REASON_CODE,
PaymentResponse.JSON_PROPERTY_RESULT_CODE,
PaymentResponse.JSON_PROPERTY_THREE_D_S2_RESPONSE_DATA,
PaymentResponse.JSON_PROPERTY_THREE_D_S2_RESULT,
PaymentResponse.JSON_PROPERTY_THREE_D_S_PAYMENT_DATA
})
public class PaymentResponse {
public static final String JSON_PROPERTY_ACTION = "action";
private PaymentResponseAction action;
public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData";
private Map additionalData = null;
public static final String JSON_PROPERTY_AMOUNT = "amount";
private Amount amount;
public static final String JSON_PROPERTY_DONATION_TOKEN = "donationToken";
private String donationToken;
public static final String JSON_PROPERTY_FRAUD_RESULT = "fraudResult";
private FraudResult fraudResult;
public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference";
private String merchantReference;
public static final String JSON_PROPERTY_ORDER = "order";
private CheckoutOrderResponse order;
public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod";
private ResponsePaymentMethod paymentMethod;
public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
private String pspReference;
public static final String JSON_PROPERTY_REFUSAL_REASON = "refusalReason";
private String refusalReason;
public static final String JSON_PROPERTY_REFUSAL_REASON_CODE = "refusalReasonCode";
private String refusalReasonCode;
/**
* The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.
*/
public enum ResultCodeEnum {
AUTHENTICATIONFINISHED("AuthenticationFinished"),
AUTHENTICATIONNOTREQUIRED("AuthenticationNotRequired"),
AUTHORISED("Authorised"),
CANCELLED("Cancelled"),
CHALLENGESHOPPER("ChallengeShopper"),
ERROR("Error"),
IDENTIFYSHOPPER("IdentifyShopper"),
PARTIALLYAUTHORISED("PartiallyAuthorised"),
PENDING("Pending"),
PRESENTTOSHOPPER("PresentToShopper"),
RECEIVED("Received"),
REDIRECTSHOPPER("RedirectShopper"),
REFUSED("Refused"),
SUCCESS("Success");
private String value;
ResultCodeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ResultCodeEnum fromValue(String value) {
for (ResultCodeEnum b : ResultCodeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
private ResultCodeEnum resultCode;
public static final String JSON_PROPERTY_THREE_D_S2_RESPONSE_DATA = "threeDS2ResponseData";
private ThreeDS2ResponseData threeDS2ResponseData;
public static final String JSON_PROPERTY_THREE_D_S2_RESULT = "threeDS2Result";
private ThreeDS2Result threeDS2Result;
public static final String JSON_PROPERTY_THREE_D_S_PAYMENT_DATA = "threeDSPaymentData";
private String threeDSPaymentData;
public PaymentResponse() {
}
public PaymentResponse action(PaymentResponseAction action) {
this.action = action;
return this;
}
/**
* Get action
* @return action
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public PaymentResponseAction getAction() {
return action;
}
/**
* action
*
* @param action
*/
@JsonProperty(JSON_PROPERTY_ACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAction(PaymentResponseAction action) {
this.action = action;
}
public PaymentResponse additionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
}
public PaymentResponse putAdditionalDataItem(String key, String additionalDataItem) {
if (this.additionalData == null) {
this.additionalData = new HashMap<>();
}
this.additionalData.put(key, additionalDataItem);
return this;
}
/**
* Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.
* @return additionalData
**/
@ApiModelProperty(value = "Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getAdditionalData() {
return additionalData;
}
/**
* Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.
*
* @param additionalData
*/
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAdditionalData(Map additionalData) {
this.additionalData = additionalData;
}
public PaymentResponse amount(Amount amount) {
this.amount = amount;
return this;
}
/**
* Get amount
* @return amount
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Amount getAmount() {
return amount;
}
/**
* amount
*
* @param amount
*/
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAmount(Amount amount) {
this.amount = amount;
}
public PaymentResponse donationToken(String donationToken) {
this.donationToken = donationToken;
return this;
}
/**
* Donation Token containing payment details for Adyen Giving.
* @return donationToken
**/
@ApiModelProperty(value = "Donation Token containing payment details for Adyen Giving.")
@JsonProperty(JSON_PROPERTY_DONATION_TOKEN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDonationToken() {
return donationToken;
}
/**
* Donation Token containing payment details for Adyen Giving.
*
* @param donationToken
*/
@JsonProperty(JSON_PROPERTY_DONATION_TOKEN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDonationToken(String donationToken) {
this.donationToken = donationToken;
}
public PaymentResponse fraudResult(FraudResult fraudResult) {
this.fraudResult = fraudResult;
return this;
}
/**
* Get fraudResult
* @return fraudResult
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FRAUD_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FraudResult getFraudResult() {
return fraudResult;
}
/**
* fraudResult
*
* @param fraudResult
*/
@JsonProperty(JSON_PROPERTY_FRAUD_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFraudResult(FraudResult fraudResult) {
this.fraudResult = fraudResult;
}
public PaymentResponse merchantReference(String merchantReference) {
this.merchantReference = merchantReference;
return this;
}
/**
* 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.
* @return merchantReference
**/
@ApiModelProperty(value = "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.")
@JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMerchantReference() {
return merchantReference;
}
/**
* 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.
*
* @param merchantReference
*/
@JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMerchantReference(String merchantReference) {
this.merchantReference = merchantReference;
}
public PaymentResponse order(CheckoutOrderResponse order) {
this.order = order;
return this;
}
/**
* Get order
* @return order
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ORDER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CheckoutOrderResponse getOrder() {
return order;
}
/**
* order
*
* @param order
*/
@JsonProperty(JSON_PROPERTY_ORDER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOrder(CheckoutOrderResponse order) {
this.order = order;
}
public PaymentResponse paymentMethod(ResponsePaymentMethod paymentMethod) {
this.paymentMethod = paymentMethod;
return this;
}
/**
* Get paymentMethod
* @return paymentMethod
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PAYMENT_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ResponsePaymentMethod getPaymentMethod() {
return paymentMethod;
}
/**
* paymentMethod
*
* @param paymentMethod
*/
@JsonProperty(JSON_PROPERTY_PAYMENT_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentMethod(ResponsePaymentMethod paymentMethod) {
this.paymentMethod = paymentMethod;
}
public PaymentResponse pspReference(String pspReference) {
this.pspReference = pspReference;
return this;
}
/**
* Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response.
* @return pspReference
**/
@ApiModelProperty(value = "Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response.")
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPspReference() {
return pspReference;
}
/**
* Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response.
*
* @param pspReference
*/
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPspReference(String pspReference) {
this.pspReference = pspReference;
}
public PaymentResponse refusalReason(String refusalReason) {
this.refusalReason = refusalReason;
return this;
}
/**
* If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).
* @return refusalReason
**/
@ApiModelProperty(value = "If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).")
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRefusalReason() {
return refusalReason;
}
/**
* If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).
*
* @param refusalReason
*/
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRefusalReason(String refusalReason) {
this.refusalReason = refusalReason;
}
public PaymentResponse refusalReasonCode(String refusalReasonCode) {
this.refusalReasonCode = refusalReasonCode;
return this;
}
/**
* Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).
* @return refusalReasonCode
**/
@ApiModelProperty(value = "Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).")
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRefusalReasonCode() {
return refusalReasonCode;
}
/**
* Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).
*
* @param refusalReasonCode
*/
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRefusalReasonCode(String refusalReasonCode) {
this.refusalReasonCode = refusalReasonCode;
}
public PaymentResponse resultCode(ResultCodeEnum resultCode) {
this.resultCode = resultCode;
return this;
}
/**
* The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.
* @return resultCode
**/
@ApiModelProperty(value = "The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.")
@JsonProperty(JSON_PROPERTY_RESULT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ResultCodeEnum getResultCode() {
return resultCode;
}
/**
* The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.
*
* @param resultCode
*/
@JsonProperty(JSON_PROPERTY_RESULT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResultCode(ResultCodeEnum resultCode) {
this.resultCode = resultCode;
}
public PaymentResponse threeDS2ResponseData(ThreeDS2ResponseData threeDS2ResponseData) {
this.threeDS2ResponseData = threeDS2ResponseData;
return this;
}
/**
* Get threeDS2ResponseData
* @return threeDS2ResponseData
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_THREE_D_S2_RESPONSE_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ThreeDS2ResponseData getThreeDS2ResponseData() {
return threeDS2ResponseData;
}
/**
* threeDS2ResponseData
*
* @param threeDS2ResponseData
*/
@JsonProperty(JSON_PROPERTY_THREE_D_S2_RESPONSE_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setThreeDS2ResponseData(ThreeDS2ResponseData threeDS2ResponseData) {
this.threeDS2ResponseData = threeDS2ResponseData;
}
public PaymentResponse threeDS2Result(ThreeDS2Result threeDS2Result) {
this.threeDS2Result = threeDS2Result;
return this;
}
/**
* Get threeDS2Result
* @return threeDS2Result
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_THREE_D_S2_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ThreeDS2Result getThreeDS2Result() {
return threeDS2Result;
}
/**
* threeDS2Result
*
* @param threeDS2Result
*/
@JsonProperty(JSON_PROPERTY_THREE_D_S2_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setThreeDS2Result(ThreeDS2Result threeDS2Result) {
this.threeDS2Result = threeDS2Result;
}
public PaymentResponse threeDSPaymentData(String threeDSPaymentData) {
this.threeDSPaymentData = threeDSPaymentData;
return this;
}
/**
* When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`.
* @return threeDSPaymentData
**/
@ApiModelProperty(value = "When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`.")
@JsonProperty(JSON_PROPERTY_THREE_D_S_PAYMENT_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getThreeDSPaymentData() {
return threeDSPaymentData;
}
/**
* When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`.
*
* @param threeDSPaymentData
*/
@JsonProperty(JSON_PROPERTY_THREE_D_S_PAYMENT_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setThreeDSPaymentData(String threeDSPaymentData) {
this.threeDSPaymentData = threeDSPaymentData;
}
/**
* Return true if this PaymentResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PaymentResponse paymentResponse = (PaymentResponse) o;
return Objects.equals(this.action, paymentResponse.action) &&
Objects.equals(this.additionalData, paymentResponse.additionalData) &&
Objects.equals(this.amount, paymentResponse.amount) &&
Objects.equals(this.donationToken, paymentResponse.donationToken) &&
Objects.equals(this.fraudResult, paymentResponse.fraudResult) &&
Objects.equals(this.merchantReference, paymentResponse.merchantReference) &&
Objects.equals(this.order, paymentResponse.order) &&
Objects.equals(this.paymentMethod, paymentResponse.paymentMethod) &&
Objects.equals(this.pspReference, paymentResponse.pspReference) &&
Objects.equals(this.refusalReason, paymentResponse.refusalReason) &&
Objects.equals(this.refusalReasonCode, paymentResponse.refusalReasonCode) &&
Objects.equals(this.resultCode, paymentResponse.resultCode) &&
Objects.equals(this.threeDS2ResponseData, paymentResponse.threeDS2ResponseData) &&
Objects.equals(this.threeDS2Result, paymentResponse.threeDS2Result) &&
Objects.equals(this.threeDSPaymentData, paymentResponse.threeDSPaymentData);
}
@Override
public int hashCode() {
return Objects.hash(action, additionalData, amount, donationToken, fraudResult, merchantReference, order, paymentMethod, pspReference, refusalReason, refusalReasonCode, resultCode, threeDS2ResponseData, threeDS2Result, threeDSPaymentData);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PaymentResponse {\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" donationToken: ").append(toIndentedString(donationToken)).append("\n");
sb.append(" fraudResult: ").append(toIndentedString(fraudResult)).append("\n");
sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n");
sb.append(" order: ").append(toIndentedString(order)).append("\n");
sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n");
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
sb.append(" refusalReason: ").append(toIndentedString(refusalReason)).append("\n");
sb.append(" refusalReasonCode: ").append(toIndentedString(refusalReasonCode)).append("\n");
sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n");
sb.append(" threeDS2ResponseData: ").append(toIndentedString(threeDS2ResponseData)).append("\n");
sb.append(" threeDS2Result: ").append(toIndentedString(threeDS2Result)).append("\n");
sb.append(" threeDSPaymentData: ").append(toIndentedString(threeDSPaymentData)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of PaymentResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of PaymentResponse
* @throws JsonProcessingException if the JSON string is invalid with respect to PaymentResponse
*/
public static PaymentResponse fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, PaymentResponse.class);
}
/**
* Convert an instance of PaymentResponse to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}