Package com.adyen.model.tapi
Class StoredValueData
- java.lang.Object
-
- com.adyen.model.tapi.StoredValueData
-
public class StoredValueData extends Object
It contains: - the identification of the stored value accounts or the stored value cards, if provided by the Sale System, and - the associated products sold by the Sale System. Data related to the stored value card.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CURRENCYstatic StringJSON_PROPERTY_EAN_UPCstatic StringJSON_PROPERTY_ITEM_AMOUNTstatic StringJSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTIONstatic StringJSON_PROPERTY_PRODUCT_CODEstatic StringJSON_PROPERTY_STORED_VALUE_ACCOUNT_I_Dstatic StringJSON_PROPERTY_STORED_VALUE_PROVIDERstatic StringJSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE
-
Constructor Summary
Constructors Constructor Description StoredValueData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StoredValueDatacurrency(String currency)Currency of a monetary amount.StoredValueDataeanUpc(Integer eanUpc)Standard product code of item purchased with the transaction.booleanequals(Object o)Return true if this StoredValueData object is equal to o.static StoredValueDatafromJson(String jsonString)Create an instance of StoredValueData given an JSON stringStringgetCurrency()Currency of a monetary amount.IntegergetEanUpc()Standard product code of item purchased with the transaction.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.BigDecimalgetItemAmount()Total amount of the item line. minimum: 0.0 maximum: 99999999.999999OriginalPOITransactiongetOriginalPOITransaction()Get originalPOITransactionIntegergetProductCode()Product code of item purchased with the transaction. minimum: 1 maximum: 20StoredValueAccountIDgetStoredValueAccountID()Get storedValueAccountIDStringgetStoredValueProvider()Identification of the provider of the stored value account load/reload.StoredValueTransactionTypegetStoredValueTransactionType()Get storedValueTransactionTypeinthashCode()StoredValueDataincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.StoredValueDataitemAmount(BigDecimal itemAmount)Total amount of the item line.StoredValueDataoriginalPOITransaction(OriginalPOITransaction originalPOITransaction)originalPOITransactionStoredValueDataproductCode(Integer productCode)Product code of item purchased with the transaction.voidsetCurrency(String currency)Currency of a monetary amount.voidsetEanUpc(Integer eanUpc)Standard product code of item purchased with the transaction.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetItemAmount(BigDecimal itemAmount)Total amount of the item line.voidsetOriginalPOITransaction(OriginalPOITransaction originalPOITransaction)originalPOITransactionvoidsetProductCode(Integer productCode)Product code of item purchased with the transaction.voidsetStoredValueAccountID(StoredValueAccountID storedValueAccountID)storedValueAccountIDvoidsetStoredValueProvider(String storedValueProvider)Identification of the provider of the stored value account load/reload.voidsetStoredValueTransactionType(StoredValueTransactionType storedValueTransactionType)storedValueTransactionTypeStoredValueDatastoredValueAccountID(StoredValueAccountID storedValueAccountID)storedValueAccountIDStoredValueDatastoredValueProvider(String storedValueProvider)Identification of the provider of the stored value account load/reload.StoredValueDatastoredValueTransactionType(StoredValueTransactionType storedValueTransactionType)storedValueTransactionTypeStringtoJson()Convert an instance of StoredValueData to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_STORED_VALUE_PROVIDER
public static final String JSON_PROPERTY_STORED_VALUE_PROVIDER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE
public static final String JSON_PROPERTY_STORED_VALUE_TRANSACTION_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D
public static final String JSON_PROPERTY_STORED_VALUE_ACCOUNT_I_D
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION
public static final String JSON_PROPERTY_ORIGINAL_P_O_I_TRANSACTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PRODUCT_CODE
public static final String JSON_PROPERTY_PRODUCT_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EAN_UPC
public static final String JSON_PROPERTY_EAN_UPC
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ITEM_AMOUNT
public static final String JSON_PROPERTY_ITEM_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CURRENCY
public static final String JSON_PROPERTY_CURRENCY
- See Also:
- Constant Field Values
-
-
Method Detail
-
storedValueProvider
public StoredValueData storedValueProvider(String storedValueProvider)
Identification of the provider of the stored value account load/reload. If more than one provider to manage on the POI, and StoredValueAccountID absent.- Parameters:
storedValueProvider- Identification of the provider of the stored value account load/reload. If more than one provider to manage on the POI, and StoredValueAccountID absent.- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getStoredValueProvider
public String getStoredValueProvider()
Identification of the provider of the stored value account load/reload. If more than one provider to manage on the POI, and StoredValueAccountID absent.- Returns:
- storedValueProvider Identification of the provider of the stored value account load/reload. If more than one provider to manage on the POI, and StoredValueAccountID absent.
-
setStoredValueProvider
public void setStoredValueProvider(String storedValueProvider)
Identification of the provider of the stored value account load/reload. If more than one provider to manage on the POI, and StoredValueAccountID absent.- Parameters:
storedValueProvider- Identification of the provider of the stored value account load/reload. If more than one provider to manage on the POI, and StoredValueAccountID absent.
-
storedValueTransactionType
public StoredValueData storedValueTransactionType(StoredValueTransactionType storedValueTransactionType)
storedValueTransactionType- Parameters:
storedValueTransactionType-- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getStoredValueTransactionType
public StoredValueTransactionType getStoredValueTransactionType()
Get storedValueTransactionType- Returns:
- storedValueTransactionType
-
setStoredValueTransactionType
public void setStoredValueTransactionType(StoredValueTransactionType storedValueTransactionType)
storedValueTransactionType- Parameters:
storedValueTransactionType-
-
storedValueAccountID
public StoredValueData storedValueAccountID(StoredValueAccountID storedValueAccountID)
storedValueAccountID- Parameters:
storedValueAccountID-- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getStoredValueAccountID
public StoredValueAccountID getStoredValueAccountID()
Get storedValueAccountID- Returns:
- storedValueAccountID
-
setStoredValueAccountID
public void setStoredValueAccountID(StoredValueAccountID storedValueAccountID)
storedValueAccountID- Parameters:
storedValueAccountID-
-
originalPOITransaction
public StoredValueData originalPOITransaction(OriginalPOITransaction originalPOITransaction)
originalPOITransaction- Parameters:
originalPOITransaction-- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getOriginalPOITransaction
public OriginalPOITransaction getOriginalPOITransaction()
Get originalPOITransaction- Returns:
- originalPOITransaction
-
setOriginalPOITransaction
public void setOriginalPOITransaction(OriginalPOITransaction originalPOITransaction)
originalPOITransaction- Parameters:
originalPOITransaction-
-
productCode
public StoredValueData productCode(Integer productCode)
Product code of item purchased with the transaction.- Parameters:
productCode- Product code of item purchased with the transaction.- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getProductCode
public Integer getProductCode()
Product code of item purchased with the transaction. minimum: 1 maximum: 20- Returns:
- productCode Product code of item purchased with the transaction.
-
setProductCode
public void setProductCode(Integer productCode)
Product code of item purchased with the transaction.- Parameters:
productCode- Product code of item purchased with the transaction.
-
eanUpc
public StoredValueData eanUpc(Integer eanUpc)
Standard product code of item purchased with the transaction.- Parameters:
eanUpc- Standard product code of item purchased with the transaction.- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getEanUpc
public Integer getEanUpc()
Standard product code of item purchased with the transaction.- Returns:
- eanUpc Standard product code of item purchased with the transaction.
-
setEanUpc
public void setEanUpc(Integer eanUpc)
Standard product code of item purchased with the transaction.- Parameters:
eanUpc- Standard product code of item purchased with the transaction.
-
itemAmount
public StoredValueData itemAmount(BigDecimal itemAmount)
Total amount of the item line.- Parameters:
itemAmount- Total amount of the item line.- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getItemAmount
public BigDecimal getItemAmount()
Total amount of the item line. minimum: 0.0 maximum: 99999999.999999- Returns:
- itemAmount Total amount of the item line.
-
setItemAmount
public void setItemAmount(BigDecimal itemAmount)
Total amount of the item line.- Parameters:
itemAmount- Total amount of the item line.
-
currency
public StoredValueData currency(String currency)
Currency of a monetary amount.- Parameters:
currency- Currency of a monetary amount.- Returns:
- the current
StoredValueDatainstance, allowing for method chaining
-
getCurrency
public String getCurrency()
Currency of a monetary amount.- Returns:
- currency Currency of a monetary amount.
-
setCurrency
public void setCurrency(String currency)
Currency of a monetary amount.- Parameters:
currency- Currency of a monetary amount.
-
includeNullValues
public StoredValueData includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this StoredValueData object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static StoredValueData fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of StoredValueData given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of StoredValueData
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to StoredValueData
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of StoredValueData to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-