Package com.adyen.model.checkout
Class CreateOrderRequest
- java.lang.Object
-
- com.adyen.model.checkout.CreateOrderRequest
-
public class CreateOrderRequest extends Object
CreateOrderRequest
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_EXPIRES_ATstatic StringJSON_PROPERTY_MERCHANT_ACCOUNTstatic StringJSON_PROPERTY_REFERENCE
-
Constructor Summary
Constructors Constructor Description CreateOrderRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateOrderRequestamount(Amount amount)booleanequals(Object o)Return true if this CreateOrderRequest object is equal to o.CreateOrderRequestexpiresAt(String expiresAt)static CreateOrderRequestfromJson(String jsonString)Create an instance of CreateOrderRequest given an JSON stringAmountgetAmount()Get amountStringgetExpiresAt()The date that order expires; e.g.StringgetMerchantAccount()The merchant account identifier, with which you want to process the order.StringgetReference()A custom reference identifying the order.inthashCode()CreateOrderRequestmerchantAccount(String merchantAccount)CreateOrderRequestreference(String reference)voidsetAmount(Amount amount)amountvoidsetExpiresAt(String expiresAt)The date that order expires; e.g.voidsetMerchantAccount(String merchantAccount)The merchant account identifier, with which you want to process the order.voidsetReference(String reference)A custom reference identifying the order.StringtoJson()Convert an instance of CreateOrderRequest to an JSON stringStringtoString()
-
-
-
Field Detail
-
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_MERCHANT_ACCOUNT
public static final String JSON_PROPERTY_MERCHANT_ACCOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public CreateOrderRequest amount(Amount amount)
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
expiresAt
public CreateOrderRequest expiresAt(String expiresAt)
-
getExpiresAt
public String getExpiresAt()
The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day.- Returns:
- expiresAt
-
setExpiresAt
public void setExpiresAt(String expiresAt)
The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day.- Parameters:
expiresAt-
-
merchantAccount
public CreateOrderRequest merchantAccount(String merchantAccount)
-
getMerchantAccount
public String getMerchantAccount()
The merchant account identifier, with which you want to process the order.- Returns:
- merchantAccount
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
The merchant account identifier, with which you want to process the order.- Parameters:
merchantAccount-
-
reference
public CreateOrderRequest reference(String reference)
-
getReference
public String getReference()
A custom reference identifying the order.- Returns:
- reference
-
setReference
public void setReference(String reference)
A custom reference identifying the order.- Parameters:
reference-
-
equals
public boolean equals(Object o)
Return true if this CreateOrderRequest object is equal to o.
-
fromJson
public static CreateOrderRequest fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of CreateOrderRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateOrderRequest
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to CreateOrderRequest
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of CreateOrderRequest to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-