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)Item amount excluding the tax, in minor units.LineItemamountIncludingTax(Long amountIncludingTax)Item amount including the tax, in minor units.LineItembrand(String brand)Brand of the item.LineItemcolor(String color)Color of the item.LineItemdescription(String description)Description of the line item.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)ID of the line item.LineItemimageUrl(String imageUrl)Link to the picture of the purchased item.LineItemitemCategory(String itemCategory)Item category, used by the payment methods PayPal and Ratepay.LineItemmanufacturer(String manufacturer)Manufacturer of the item.LineItemmarketplaceSellerId(String marketplaceSellerId)Marketplace seller id.LineItemproductUrl(String productUrl)Link to the purchased item.LineItemquantity(Long quantity)Number of items.LineItemreceiverEmail(String receiverEmail)Email associated with the given product in the basket (usually in electronic gift cards).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)Size of the item.LineItemsku(String sku)Stock keeping unit.LineItemtaxAmount(Long taxAmount)Tax amount, in minor units.LineItemtaxPercentage(Long taxPercentage)Tax percentage, in minor units.StringtoJson()Convert an instance of LineItem to an JSON stringStringtoString()LineItemupc(String upc)Universal Product Code.
-
-
-
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
-
amountExcludingTax
public LineItem amountExcludingTax(Long amountExcludingTax)
Item amount excluding the tax, in minor units.- Parameters:
amountExcludingTax-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
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-
-
amountIncludingTax
public LineItem amountIncludingTax(Long amountIncludingTax)
Item amount including the tax, in minor units.- Parameters:
amountIncludingTax-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
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-
-
brand
public LineItem brand(String brand)
Brand of the item.- Parameters:
brand-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getBrand
public String getBrand()
Brand of the item.- Returns:
- brand
-
setBrand
public void setBrand(String brand)
Brand of the item.- Parameters:
brand-
-
color
public LineItem color(String color)
Color of the item.- Parameters:
color-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getColor
public String getColor()
Color of the item.- Returns:
- color
-
setColor
public void setColor(String color)
Color of the item.- Parameters:
color-
-
description
public LineItem description(String description)
Description of the line item.- Parameters:
description-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getDescription
public String getDescription()
Description of the line item.- Returns:
- description
-
setDescription
public void setDescription(String description)
Description of the line item.- Parameters:
description-
-
id
public LineItem id(String id)
ID of the line item.- Parameters:
id-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getId
public String getId()
ID of the line item.- Returns:
- id
-
setId
public void setId(String id)
ID of the line item.- Parameters:
id-
-
imageUrl
public LineItem imageUrl(String imageUrl)
Link to the picture of the purchased item.- Parameters:
imageUrl-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
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-
-
itemCategory
public LineItem itemCategory(String itemCategory)
Item category, used by the payment methods PayPal and Ratepay.- Parameters:
itemCategory-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
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-
-
manufacturer
public LineItem manufacturer(String manufacturer)
Manufacturer of the item.- Parameters:
manufacturer-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getManufacturer
public String getManufacturer()
Manufacturer of the item.- Returns:
- manufacturer
-
setManufacturer
public void setManufacturer(String manufacturer)
Manufacturer of the item.- Parameters:
manufacturer-
-
marketplaceSellerId
public LineItem marketplaceSellerId(String marketplaceSellerId)
Marketplace seller id.- Parameters:
marketplaceSellerId-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getMarketplaceSellerId
public String getMarketplaceSellerId()
Marketplace seller id.- Returns:
- marketplaceSellerId
-
setMarketplaceSellerId
public void setMarketplaceSellerId(String marketplaceSellerId)
Marketplace seller id.- Parameters:
marketplaceSellerId-
-
productUrl
public LineItem productUrl(String productUrl)
Link to the purchased item.- Parameters:
productUrl-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getProductUrl
public String getProductUrl()
Link to the purchased item.- Returns:
- productUrl
-
setProductUrl
public void setProductUrl(String productUrl)
Link to the purchased item.- Parameters:
productUrl-
-
quantity
public LineItem quantity(Long quantity)
Number of items.- Parameters:
quantity-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getQuantity
public Long getQuantity()
Number of items.- Returns:
- quantity
-
setQuantity
public void setQuantity(Long quantity)
Number of items.- Parameters:
quantity-
-
receiverEmail
public LineItem receiverEmail(String receiverEmail)
Email associated with the given product in the basket (usually in electronic gift cards).- Parameters:
receiverEmail-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
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-
-
size
public LineItem size(String size)
Size of the item.- Parameters:
size-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getSize
public String getSize()
Size of the item.- Returns:
- size
-
setSize
public void setSize(String size)
Size of the item.- Parameters:
size-
-
sku
public LineItem sku(String sku)
Stock keeping unit.- Parameters:
sku-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getSku
public String getSku()
Stock keeping unit.- Returns:
- sku
-
setSku
public void setSku(String sku)
Stock keeping unit.- Parameters:
sku-
-
taxAmount
public LineItem taxAmount(Long taxAmount)
Tax amount, in minor units.- Parameters:
taxAmount-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getTaxAmount
public Long getTaxAmount()
Tax amount, in minor units.- Returns:
- taxAmount
-
setTaxAmount
public void setTaxAmount(Long taxAmount)
Tax amount, in minor units.- Parameters:
taxAmount-
-
taxPercentage
public LineItem taxPercentage(Long taxPercentage)
Tax percentage, in minor units.- Parameters:
taxPercentage-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
getTaxPercentage
public Long getTaxPercentage()
Tax percentage, in minor units.- Returns:
- taxPercentage
-
setTaxPercentage
public void setTaxPercentage(Long taxPercentage)
Tax percentage, in minor units.- Parameters:
taxPercentage-
-
upc
public LineItem upc(String upc)
Universal Product Code.- Parameters:
upc-- Returns:
- the current
LineIteminstance, allowing for method chaining
-
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
-
-