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_MARKETPLACE_SELLER_IDstatic 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.StringgetMarketplaceSellerId()Marketplace seller id.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)LineItemmarketplaceSellerId(String marketplaceSellerId)LineItemproductUrl(String productUrl)LineItemquantity(Long quantity)LineItemreceiverEmail(String receiverEmail)voidsetAmountExcludingTax(Long amountExcludingTax)Item amount excluding the tax, in minor units.voidsetAmountIncludingTax(Long amountIncludingTax)Item amount including the tax, in minor units.voidsetBrand(String brand)Brand of the item.voidsetColor(String color)Color of the item.voidsetDescription(String description)Description of the line item.voidsetId(String id)ID of the line item.voidsetImageUrl(String imageUrl)Link to the picture of the purchased item.voidsetItemCategory(String itemCategory)Item category, used by the payment methods PayPal and Ratepay.voidsetManufacturer(String manufacturer)Manufacturer of the item.voidsetMarketplaceSellerId(String marketplaceSellerId)Marketplace seller id.voidsetProductUrl(String productUrl)Link to the purchased item.voidsetQuantity(Long quantity)Number of items.voidsetReceiverEmail(String receiverEmail)Email associated with the given product in the basket (usually in electronic gift cards).voidsetSize(String size)Size of the item.voidsetSku(String sku)Stock keeping unit.voidsetTaxAmount(Long taxAmount)Tax amount, in minor units.voidsetTaxPercentage(Long taxPercentage)Tax percentage, in minor units.voidsetUpc(String upc)Universal Product Code.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_MARKETPLACE_SELLER_ID
public static final String JSON_PROPERTY_MARKETPLACE_SELLER_ID
- 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)
Item amount excluding the tax, in minor units.- Parameters:
amountExcludingTax-
-
getAmountIncludingTax
public Long getAmountIncludingTax()
Item amount including the tax, in minor units.- Returns:
- amountIncludingTax
-
setAmountIncludingTax
public void setAmountIncludingTax(Long amountIncludingTax)
Item amount including the tax, in minor units.- Parameters:
amountIncludingTax-
-
getBrand
public String getBrand()
Brand of the item.- Returns:
- brand
-
setBrand
public void setBrand(String brand)
Brand of the item.- Parameters:
brand-
-
getColor
public String getColor()
Color of the item.- Returns:
- color
-
setColor
public void setColor(String color)
Color of the item.- Parameters:
color-
-
getDescription
public String getDescription()
Description of the line item.- Returns:
- description
-
setDescription
public void setDescription(String description)
Description of the line item.- Parameters:
description-
-
getId
public String getId()
ID of the line item.- Returns:
- id
-
setId
public void setId(String id)
ID of the line item.- Parameters:
id-
-
getImageUrl
public String getImageUrl()
Link to the picture of the purchased item.- Returns:
- imageUrl
-
setImageUrl
public void setImageUrl(String imageUrl)
Link to the picture of the purchased item.- Parameters:
imageUrl-
-
getItemCategory
public String getItemCategory()
Item category, used by the payment methods PayPal and Ratepay.- Returns:
- itemCategory
-
setItemCategory
public void setItemCategory(String itemCategory)
Item category, used by the payment methods PayPal and Ratepay.- Parameters:
itemCategory-
-
getManufacturer
public String getManufacturer()
Manufacturer of the item.- Returns:
- manufacturer
-
setManufacturer
public void setManufacturer(String manufacturer)
Manufacturer of the item.- Parameters:
manufacturer-
-
getMarketplaceSellerId
public String getMarketplaceSellerId()
Marketplace seller id.- Returns:
- marketplaceSellerId
-
setMarketplaceSellerId
public void setMarketplaceSellerId(String marketplaceSellerId)
Marketplace seller id.- Parameters:
marketplaceSellerId-
-
getProductUrl
public String getProductUrl()
Link to the purchased item.- Returns:
- productUrl
-
setProductUrl
public void setProductUrl(String productUrl)
Link to the purchased item.- Parameters:
productUrl-
-
getQuantity
public Long getQuantity()
Number of items.- Returns:
- quantity
-
setQuantity
public void setQuantity(Long quantity)
Number of items.- Parameters:
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)
Email associated with the given product in the basket (usually in electronic gift cards).- Parameters:
receiverEmail-
-
getSize
public String getSize()
Size of the item.- Returns:
- size
-
setSize
public void setSize(String size)
Size of the item.- Parameters:
size-
-
getSku
public String getSku()
Stock keeping unit.- Returns:
- sku
-
setSku
public void setSku(String sku)
Stock keeping unit.- Parameters:
sku-
-
getTaxAmount
public Long getTaxAmount()
Tax amount, in minor units.- Returns:
- taxAmount
-
setTaxAmount
public void setTaxAmount(Long taxAmount)
Tax amount, in minor units.- Parameters:
taxAmount-
-
getTaxPercentage
public Long getTaxPercentage()
Tax percentage, in minor units.- Returns:
- taxPercentage
-
setTaxPercentage
public void setTaxPercentage(Long taxPercentage)
Tax percentage, in minor units.- Parameters:
taxPercentage-
-
getUpc
public String getUpc()
Universal Product Code.- Returns:
- upc
-
setUpc
public void setUpc(String upc)
Universal Product Code.- Parameters:
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
-
-