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)amountbooleanequals(Object o)Return true if this CreateOrderRequest object is equal to o.CreateOrderRequestexpiresAt(String expiresAt)The date when the order should expire.static CreateOrderRequestfromJson(String jsonString)Create an instance of CreateOrderRequest given an JSON stringAmountgetAmount()amountStringgetExpiresAt()The date when the order should expire.StringgetMerchantAccount()The merchant account identifier, with which you want to process the order.StringgetReference()A custom reference identifying the order.inthashCode()CreateOrderRequestmerchantAccount(String merchantAccount)The merchant account identifier, with which you want to process the order.CreateOrderRequestreference(String reference)A custom reference identifying the order.voidsetAmount(Amount amount)amountvoidsetExpiresAt(String expiresAt)The date when the order should expire.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)
amount- Parameters:
amount-- Returns:
- the current
CreateOrderRequestinstance, allowing for method chaining
-
getAmount
public Amount getAmount()
amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
expiresAt
public CreateOrderRequest expiresAt(String expiresAt)
The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.- Parameters:
expiresAt-- Returns:
- the current
CreateOrderRequestinstance, allowing for method chaining
-
getExpiresAt
public String getExpiresAt()
The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.- Returns:
- expiresAt
-
setExpiresAt
public void setExpiresAt(String expiresAt)
The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.- Parameters:
expiresAt-
-
merchantAccount
public CreateOrderRequest merchantAccount(String merchantAccount)
The merchant account identifier, with which you want to process the order.- Parameters:
merchantAccount-- Returns:
- the current
CreateOrderRequestinstance, allowing for method chaining
-
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)
A custom reference identifying the order.- Parameters:
reference-- Returns:
- the current
CreateOrderRequestinstance, allowing for method chaining
-
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
-
-