Package com.adyen.model.checkout
Class LineItem
- java.lang.Object
-
- com.adyen.model.checkout.LineItem
-
public class LineItem extends Object
LineItem
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNT_EXCLUDING_TAXstatic StringJSON_PROPERTY_AMOUNT_INCLUDING_TAXstatic StringJSON_PROPERTY_BRANDstatic StringJSON_PROPERTY_COLORstatic StringJSON_PROPERTY_DESCRIPTIONstatic StringJSON_PROPERTY_IDstatic StringJSON_PROPERTY_IMAGE_URLstatic StringJSON_PROPERTY_ITEM_CATEGORYstatic StringJSON_PROPERTY_MANUFACTURERstatic StringJSON_PROPERTY_PRODUCT_URLstatic StringJSON_PROPERTY_QUANTITYstatic StringJSON_PROPERTY_RECEIVER_EMAILstatic StringJSON_PROPERTY_SIZEstatic StringJSON_PROPERTY_SKUstatic StringJSON_PROPERTY_TAX_AMOUNTstatic StringJSON_PROPERTY_TAX_PERCENTAGEstatic StringJSON_PROPERTY_UPC
-
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)LineItembrand(String brand)LineItemcolor(String color)LineItemdescription(String description)booleanequals(Object o)Return true if this LineItem object is equal to 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.StringgetBrand()Brand of the item.StringgetColor()Color of the item.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 payment methods PayPal and Ratepay.StringgetManufacturer()Manufacturer of the item.StringgetProductUrl()Link to the purchased item.LonggetQuantity()Number of items.StringgetReceiverEmail()Email associated with the given product in the basket (usually in electronic gift cards).StringgetSize()Size of the item.StringgetSku()Stock keeping unit.LonggetTaxAmount()Tax amount, in minor units.LonggetTaxPercentage()Tax percentage, in minor units.StringgetUpc()Universal Product Code.inthashCode()LineItemid(String id)LineItemimageUrl(String imageUrl)LineItemitemCategory(String itemCategory)LineItemmanufacturer(String manufacturer)LineItemproductUrl(String productUrl)LineItemquantity(Long quantity)LineItemreceiverEmail(String receiverEmail)voidsetAmountExcludingTax(Long amountExcludingTax)voidsetAmountIncludingTax(Long amountIncludingTax)voidsetBrand(String brand)voidsetColor(String color)voidsetDescription(String description)voidsetId(String id)voidsetImageUrl(String imageUrl)voidsetItemCategory(String itemCategory)voidsetManufacturer(String manufacturer)voidsetProductUrl(String productUrl)voidsetQuantity(Long quantity)voidsetReceiverEmail(String receiverEmail)voidsetSize(String size)voidsetSku(String sku)voidsetTaxAmount(Long taxAmount)voidsetTaxPercentage(Long taxPercentage)voidsetUpc(String upc)LineItemsize(String size)LineItemsku(String sku)LineItemtaxAmount(Long taxAmount)LineItemtaxPercentage(Long taxPercentage)StringtoJson()Convert an instance of LineItem to an JSON stringStringtoString()LineItemupc(String upc)
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT_EXCLUDING_TAX
public static final String JSON_PROPERTY_AMOUNT_EXCLUDING_TAX
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AMOUNT_INCLUDING_TAX
public static final String JSON_PROPERTY_AMOUNT_INCLUDING_TAX
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BRAND
public static final String JSON_PROPERTY_BRAND
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COLOR
public static final String JSON_PROPERTY_COLOR
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESCRIPTION
public static final String JSON_PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ID
public static final String JSON_PROPERTY_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_IMAGE_URL
public static final String JSON_PROPERTY_IMAGE_URL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ITEM_CATEGORY
public static final String JSON_PROPERTY_ITEM_CATEGORY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MANUFACTURER
public static final String JSON_PROPERTY_MANUFACTURER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PRODUCT_URL
public static final String JSON_PROPERTY_PRODUCT_URL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_QUANTITY
public static final String JSON_PROPERTY_QUANTITY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RECEIVER_EMAIL
public static final String JSON_PROPERTY_RECEIVER_EMAIL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SIZE
public static final String JSON_PROPERTY_SIZE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SKU
public static final String JSON_PROPERTY_SKU
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TAX_AMOUNT
public static final String JSON_PROPERTY_TAX_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TAX_PERCENTAGE
public static final String JSON_PROPERTY_TAX_PERCENTAGE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_UPC
public static final String JSON_PROPERTY_UPC
- 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)
-
getBrand
public String getBrand()
Brand of the item.- Returns:
- brand
-
setBrand
public void setBrand(String brand)
-
getColor
public String getColor()
Color of the item.- Returns:
- color
-
setColor
public void setColor(String color)
-
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 payment methods PayPal and Ratepay.- Returns:
- itemCategory
-
setItemCategory
public void setItemCategory(String itemCategory)
-
getManufacturer
public String getManufacturer()
Manufacturer of the item.- Returns:
- manufacturer
-
setManufacturer
public void setManufacturer(String manufacturer)
-
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)
-
getReceiverEmail
public String getReceiverEmail()
Email associated with the given product in the basket (usually in electronic gift cards).- Returns:
- receiverEmail
-
setReceiverEmail
public void setReceiverEmail(String receiverEmail)
-
getSize
public String getSize()
Size of the item.- Returns:
- size
-
setSize
public void setSize(String size)
-
getSku
public String getSku()
Stock keeping unit.- Returns:
- sku
-
setSku
public void setSku(String sku)
-
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)
-
getUpc
public String getUpc()
Universal Product Code.- Returns:
- upc
-
setUpc
public void setUpc(String upc)
-
equals
public boolean equals(Object o)
Return true if this LineItem object is equal to o.
-
fromJson
public static LineItem fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of LineItem given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of LineItem
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to LineItem
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of LineItem to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-