Package com.adyen.model.checkout
Class CreateOrderResponse
- java.lang.Object
-
- com.adyen.model.checkout.CreateOrderResponse
-
public class CreateOrderResponse extends Object
CreateOrderResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateOrderResponse.ResultCodeEnumThe result of the order creation request.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ADDITIONAL_DATAstatic StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_EXPIRES_ATstatic StringJSON_PROPERTY_FRAUD_RESULTstatic StringJSON_PROPERTY_ORDER_DATAstatic StringJSON_PROPERTY_PSP_REFERENCEstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_REFUSAL_REASONstatic StringJSON_PROPERTY_REMAINING_AMOUNTstatic StringJSON_PROPERTY_RESULT_CODE
-
Constructor Summary
Constructors Constructor Description CreateOrderResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateOrderResponseadditionalData(Map<String,String> additionalData)Contains additional information about the payment.CreateOrderResponseamount(Amount amount)amountbooleanequals(Object o)Return true if this CreateOrderResponse object is equal to o.CreateOrderResponseexpiresAt(String expiresAt)The date that the order will expire.CreateOrderResponsefraudResult(FraudResult fraudResult)fraudResultstatic CreateOrderResponsefromJson(String jsonString)Create an instance of CreateOrderResponse given an JSON stringMap<String,String>getAdditionalData()Contains additional information about the payment.AmountgetAmount()amountStringgetExpiresAt()The date that the order will expire.FraudResultgetFraudResult()fraudResultStringgetOrderData()The encrypted data that will be used by merchant for adding payments to the order.StringgetPspReference()Adyen's 16-character reference associated with the transaction/request.StringgetReference()The reference provided by merchant for creating the order.StringgetRefusalReason()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.AmountgetRemainingAmount()remainingAmountCreateOrderResponse.ResultCodeEnumgetResultCode()The result of the order creation request.inthashCode()CreateOrderResponseorderData(String orderData)The encrypted data that will be used by merchant for adding payments to the order.CreateOrderResponsepspReference(String pspReference)Adyen's 16-character reference associated with the transaction/request.CreateOrderResponseputAdditionalDataItem(String key, String additionalDataItem)CreateOrderResponsereference(String reference)The reference provided by merchant for creating the order.CreateOrderResponserefusalReason(String 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.CreateOrderResponseremainingAmount(Amount remainingAmount)remainingAmountCreateOrderResponseresultCode(CreateOrderResponse.ResultCodeEnum resultCode)The result of the order creation request.voidsetAdditionalData(Map<String,String> additionalData)Contains additional information about the payment.voidsetAmount(Amount amount)amountvoidsetExpiresAt(String expiresAt)The date that the order will expire.voidsetFraudResult(FraudResult fraudResult)fraudResultvoidsetOrderData(String orderData)The encrypted data that will be used by merchant for adding payments to the order.voidsetPspReference(String pspReference)Adyen's 16-character reference associated with the transaction/request.voidsetReference(String reference)The reference provided by merchant for creating the order.voidsetRefusalReason(String 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.voidsetRemainingAmount(Amount remainingAmount)remainingAmountvoidsetResultCode(CreateOrderResponse.ResultCodeEnum resultCode)The result of the order creation request.StringtoJson()Convert an instance of CreateOrderResponse to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_ADDITIONAL_DATA
public static final String JSON_PROPERTY_ADDITIONAL_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EXPIRES_AT
public static final String JSON_PROPERTY_EXPIRES_AT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FRAUD_RESULT
public static final String JSON_PROPERTY_FRAUD_RESULT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ORDER_DATA
public static final String JSON_PROPERTY_ORDER_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PSP_REFERENCE
public static final String JSON_PROPERTY_PSP_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFUSAL_REASON
public static final String JSON_PROPERTY_REFUSAL_REASON
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REMAINING_AMOUNT
public static final String JSON_PROPERTY_REMAINING_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RESULT_CODE
public static final String JSON_PROPERTY_RESULT_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
additionalData
public CreateOrderResponse additionalData(Map<String,String> 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**.- Parameters:
additionalData-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
putAdditionalDataItem
public CreateOrderResponse putAdditionalDataItem(String key, String additionalDataItem)
-
getAdditionalData
public Map<String,String> getAdditionalData()
Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.- Returns:
- additionalData
-
setAdditionalData
public void setAdditionalData(Map<String,String> 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**.- Parameters:
additionalData-
-
amount
public CreateOrderResponse amount(Amount amount)
amount- Parameters:
amount-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getAmount
public Amount getAmount()
amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
expiresAt
public CreateOrderResponse expiresAt(String expiresAt)
The date that the order will expire.- Parameters:
expiresAt-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getExpiresAt
public String getExpiresAt()
The date that the order will expire.- Returns:
- expiresAt
-
setExpiresAt
public void setExpiresAt(String expiresAt)
The date that the order will expire.- Parameters:
expiresAt-
-
fraudResult
public CreateOrderResponse fraudResult(FraudResult fraudResult)
fraudResult- Parameters:
fraudResult-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getFraudResult
public FraudResult getFraudResult()
fraudResult- Returns:
- fraudResult
-
setFraudResult
public void setFraudResult(FraudResult fraudResult)
fraudResult- Parameters:
fraudResult-
-
orderData
public CreateOrderResponse orderData(String orderData)
The encrypted data that will be used by merchant for adding payments to the order.- Parameters:
orderData-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getOrderData
public String getOrderData()
The encrypted data that will be used by merchant for adding payments to the order.- Returns:
- orderData
-
setOrderData
public void setOrderData(String orderData)
The encrypted data that will be used by merchant for adding payments to the order.- Parameters:
orderData-
-
pspReference
public CreateOrderResponse pspReference(String pspReference)
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Parameters:
pspReference-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getPspReference
public String getPspReference()
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Returns:
- pspReference
-
setPspReference
public void setPspReference(String pspReference)
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Parameters:
pspReference-
-
reference
public CreateOrderResponse reference(String reference)
The reference provided by merchant for creating the order.- Parameters:
reference-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getReference
public String getReference()
The reference provided by merchant for creating the order.- Returns:
- reference
-
setReference
public void setReference(String reference)
The reference provided by merchant for creating the order.- Parameters:
reference-
-
refusalReason
public CreateOrderResponse refusalReason(String 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).- Parameters:
refusalReason-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getRefusalReason
public String getRefusalReason()
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).- Returns:
- refusalReason
-
setRefusalReason
public void setRefusalReason(String 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).- Parameters:
refusalReason-
-
remainingAmount
public CreateOrderResponse remainingAmount(Amount remainingAmount)
remainingAmount- Parameters:
remainingAmount-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getRemainingAmount
public Amount getRemainingAmount()
remainingAmount- Returns:
- remainingAmount
-
setRemainingAmount
public void setRemainingAmount(Amount remainingAmount)
remainingAmount- Parameters:
remainingAmount-
-
resultCode
public CreateOrderResponse resultCode(CreateOrderResponse.ResultCodeEnum resultCode)
The result of the order creation request. The value is always **Success**.- Parameters:
resultCode-- Returns:
- the current
CreateOrderResponseinstance, allowing for method chaining
-
getResultCode
public CreateOrderResponse.ResultCodeEnum getResultCode()
The result of the order creation request. The value is always **Success**.- Returns:
- resultCode
-
setResultCode
public void setResultCode(CreateOrderResponse.ResultCodeEnum resultCode)
The result of the order creation request. The value is always **Success**.- Parameters:
resultCode-
-
equals
public boolean equals(Object o)
Return true if this CreateOrderResponse object is equal to o.
-
fromJson
public static CreateOrderResponse fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of CreateOrderResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateOrderResponse
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to CreateOrderResponse
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of CreateOrderResponse to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-