Package com.adyen.model.acswebhooks
Class Purchase
- java.lang.Object
-
- com.adyen.model.acswebhooks.Purchase
-
public class Purchase extends Object
Purchase
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_DATEstatic StringJSON_PROPERTY_MERCHANT_NAMEstatic StringJSON_PROPERTY_ORIGINAL_AMOUNT
-
Constructor Summary
Constructors Constructor Description Purchase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Purchasedate(OffsetDateTime date)The time of the purchase.booleanequals(Object o)Return true if this Purchase object is equal to o.static PurchasefromJson(String jsonString)Create an instance of Purchase given an JSON stringOffsetDateTimegetDate()The time of the purchase.StringgetMerchantName()The name of the merchant.AmountgetOriginalAmount()Get originalAmountinthashCode()PurchasemerchantName(String merchantName)The name of the merchant.PurchaseoriginalAmount(Amount originalAmount)originalAmountvoidsetDate(OffsetDateTime date)The time of the purchase.voidsetMerchantName(String merchantName)The name of the merchant.voidsetOriginalAmount(Amount originalAmount)originalAmountStringtoJson()Convert an instance of Purchase to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_DATE
public static final String JSON_PROPERTY_DATE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MERCHANT_NAME
public static final String JSON_PROPERTY_MERCHANT_NAME
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ORIGINAL_AMOUNT
public static final String JSON_PROPERTY_ORIGINAL_AMOUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
date
public Purchase date(OffsetDateTime date)
The time of the purchase.- Parameters:
date-- Returns:
- the current
Purchaseinstance, allowing for method chaining
-
getDate
public OffsetDateTime getDate()
The time of the purchase.- Returns:
- date
-
setDate
public void setDate(OffsetDateTime date)
The time of the purchase.- Parameters:
date-
-
merchantName
public Purchase merchantName(String merchantName)
The name of the merchant.- Parameters:
merchantName-- Returns:
- the current
Purchaseinstance, allowing for method chaining
-
getMerchantName
public String getMerchantName()
The name of the merchant.- Returns:
- merchantName
-
setMerchantName
public void setMerchantName(String merchantName)
The name of the merchant.- Parameters:
merchantName-
-
originalAmount
public Purchase originalAmount(Amount originalAmount)
originalAmount- Parameters:
originalAmount-- Returns:
- the current
Purchaseinstance, allowing for method chaining
-
getOriginalAmount
public Amount getOriginalAmount()
Get originalAmount- Returns:
- originalAmount
-
setOriginalAmount
public void setOriginalAmount(Amount originalAmount)
originalAmount- Parameters:
originalAmount-
-
equals
public boolean equals(Object o)
Return true if this Purchase object is equal to o.
-
fromJson
public static Purchase fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Purchase given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Purchase
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Purchase
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Purchase to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-