Package com.adyen.model.checkout
Class LineItem
- java.lang.Object
-
- com.adyen.model.checkout.LineItem
-
public class LineItem extends Object
LineItem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLineItem.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_AMOUNT_EXCLUDING_TAXstatic StringSERIALIZED_NAME_AMOUNT_INCLUDING_TAXstatic StringSERIALIZED_NAME_DESCRIPTIONstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_IMAGE_URLstatic StringSERIALIZED_NAME_ITEM_CATEGORYstatic StringSERIALIZED_NAME_PRODUCT_URLstatic StringSERIALIZED_NAME_QUANTITYstatic StringSERIALIZED_NAME_TAX_AMOUNTstatic StringSERIALIZED_NAME_TAX_PERCENTAGE
-
Constructor Summary
Constructors Constructor Description LineItem()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LineItemamountExcludingTax(Long amountExcludingTax)LineItemamountIncludingTax(Long amountIncludingTax)LineItemdescription(String description)booleanequals(Object o)static LineItemfromJson(String jsonString)Create an instance of LineItem given an JSON stringLonggetAmountExcludingTax()Item amount excluding the tax, in minor units.LonggetAmountIncludingTax()Item amount including the tax, in minor units.StringgetDescription()Description of the line item.StringgetId()ID of the line item.StringgetImageUrl()Link to the picture of the purchased item.StringgetItemCategory()Item category, used by the RatePay payment method.StringgetProductUrl()Link to the purchased item.LonggetQuantity()Number of items.LonggetTaxAmount()Tax amount, in minor units.LonggetTaxPercentage()Tax percentage, in minor units.inthashCode()LineItemid(String id)LineItemimageUrl(String imageUrl)LineItemitemCategory(String itemCategory)LineItemproductUrl(String productUrl)LineItemquantity(Long quantity)voidsetAmountExcludingTax(Long amountExcludingTax)voidsetAmountIncludingTax(Long amountIncludingTax)voidsetDescription(String description)voidsetId(String id)voidsetImageUrl(String imageUrl)voidsetItemCategory(String itemCategory)voidsetProductUrl(String productUrl)voidsetQuantity(Long quantity)voidsetTaxAmount(Long taxAmount)voidsetTaxPercentage(Long taxPercentage)LineItemtaxAmount(Long taxAmount)LineItemtaxPercentage(Long taxPercentage)StringtoJson()Convert an instance of LineItem to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_AMOUNT_EXCLUDING_TAX
public static final String SERIALIZED_NAME_AMOUNT_EXCLUDING_TAX
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AMOUNT_INCLUDING_TAX
public static final String SERIALIZED_NAME_AMOUNT_INCLUDING_TAX
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESCRIPTION
public static final String SERIALIZED_NAME_DESCRIPTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IMAGE_URL
public static final String SERIALIZED_NAME_IMAGE_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ITEM_CATEGORY
public static final String SERIALIZED_NAME_ITEM_CATEGORY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PRODUCT_URL
public static final String SERIALIZED_NAME_PRODUCT_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_QUANTITY
public static final String SERIALIZED_NAME_QUANTITY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAX_AMOUNT
public static final String SERIALIZED_NAME_TAX_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAX_PERCENTAGE
public static final String SERIALIZED_NAME_TAX_PERCENTAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAmountExcludingTax
public Long getAmountExcludingTax()
Item amount excluding the tax, in minor units.- Returns:
- amountExcludingTax
-
setAmountExcludingTax
public void setAmountExcludingTax(Long amountExcludingTax)
-
getAmountIncludingTax
public Long getAmountIncludingTax()
Item amount including the tax, in minor units.- Returns:
- amountIncludingTax
-
setAmountIncludingTax
public void setAmountIncludingTax(Long amountIncludingTax)
-
getDescription
public String getDescription()
Description of the line item.- Returns:
- description
-
setDescription
public void setDescription(String description)
-
getId
public String getId()
ID of the line item.- Returns:
- id
-
setId
public void setId(String id)
-
getImageUrl
public String getImageUrl()
Link to the picture of the purchased item.- Returns:
- imageUrl
-
setImageUrl
public void setImageUrl(String imageUrl)
-
getItemCategory
public String getItemCategory()
Item category, used by the RatePay payment method.- Returns:
- itemCategory
-
setItemCategory
public void setItemCategory(String itemCategory)
-
getProductUrl
public String getProductUrl()
Link to the purchased item.- Returns:
- productUrl
-
setProductUrl
public void setProductUrl(String productUrl)
-
getQuantity
public Long getQuantity()
Number of items.- Returns:
- quantity
-
setQuantity
public void setQuantity(Long quantity)
-
getTaxAmount
public Long getTaxAmount()
Tax amount, in minor units.- Returns:
- taxAmount
-
setTaxAmount
public void setTaxAmount(Long taxAmount)
-
getTaxPercentage
public Long getTaxPercentage()
Tax percentage, in minor units.- Returns:
- taxPercentage
-
setTaxPercentage
public void setTaxPercentage(Long taxPercentage)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to LineItem
-
fromJson
public static LineItem fromJson(String jsonString) throws IOException
Create an instance of LineItem given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of LineItem
- Throws:
IOException- if the JSON string is invalid with respect to LineItem
-
toJson
public String toJson()
Convert an instance of LineItem to an JSON string- Returns:
- JSON string
-
-