Class Item
- java.lang.Object
-
- com.checkout.handlepaymentsandpayouts.flow.paymentsessionssubmit.requests.Item
-
public final class Item extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classItem.ItemBuilder
-
Constructor Summary
Constructors Constructor Description Item()Item(java.lang.String name, java.lang.Long quantity, java.lang.Long unitPrice, java.lang.String reference, java.lang.String commodityCode, java.lang.String unitOfMeasure, java.lang.Long totalAmount, java.lang.Long taxAmount, java.lang.Long discountAmount, java.lang.String url, java.lang.String imageUrl)Creates a newIteminstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Item.ItemBuilderbuilder()booleanequals(java.lang.Object o)java.lang.StringgetCommodityCode()A code identifying a commodity for value-added tax (VAT) purposes.java.lang.LonggetDiscountAmount()The discount applied to each invoice line item.java.lang.StringgetImageUrl()Link to the line item's product image.java.lang.StringgetName()The descriptive name of the line item.java.lang.LonggetQuantity()The number of line items.java.lang.StringgetReference()The item reference or product stock keeping unit (SKU).java.lang.LonggetTaxAmount()The total amount of sales tax or value-added tax (VAT) on the total purchase amount.java.lang.LonggetTotalAmount()The total cost of the line item, in minor currency units.java.lang.StringgetUnitOfMeasure()The unit in which the item is measured, as a Unit of Measure (UoM) code.java.lang.LonggetUnitPrice()The unit price of the item, in minor currency units.java.lang.StringgetUrl()Link to the line item's product page.inthashCode()voidsetCommodityCode(java.lang.String commodityCode)A code identifying a commodity for value-added tax (VAT) purposes.voidsetDiscountAmount(java.lang.Long discountAmount)The discount applied to each invoice line item.voidsetImageUrl(java.lang.String imageUrl)Link to the line item's product image.voidsetName(java.lang.String name)The descriptive name of the line item.voidsetQuantity(java.lang.Long quantity)The number of line items.voidsetReference(java.lang.String reference)The item reference or product stock keeping unit (SKU).voidsetTaxAmount(java.lang.Long taxAmount)The total amount of sales tax or value-added tax (VAT) on the total purchase amount.voidsetTotalAmount(java.lang.Long totalAmount)The total cost of the line item, in minor currency units.voidsetUnitOfMeasure(java.lang.String unitOfMeasure)The unit in which the item is measured, as a Unit of Measure (UoM) code.voidsetUnitPrice(java.lang.Long unitPrice)The unit price of the item, in minor currency units.voidsetUrl(java.lang.String url)Link to the line item's product page.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Item
public Item()
-
Item
public Item(java.lang.String name, java.lang.Long quantity, java.lang.Long unitPrice, java.lang.String reference, java.lang.String commodityCode, java.lang.String unitOfMeasure, java.lang.Long totalAmount, java.lang.Long taxAmount, java.lang.Long discountAmount, java.lang.String url, java.lang.String imageUrl)Creates a newIteminstance.- Parameters:
name- The descriptive name of the line item.quantity- The number of line items.unitPrice- The unit price of the item, in minor currency units.reference- The item reference or product stock keeping unit (SKU).commodityCode- A code identifying a commodity for value-added tax (VAT) purposes.unitOfMeasure- The unit in which the item is measured, as a Unit of Measure (UoM) code.totalAmount- The total cost of the line item, in minor currency units. The value should include any tax and discounts applied using the formula: value = (quantity x unit_price) - discount_amount.taxAmount- The total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase amount.discountAmount- The discount applied to each invoice line item.url- Link to the line item's product page.imageUrl- Link to the line item's product image.
-
-
Method Detail
-
builder
public static Item.ItemBuilder builder()
-
getName
public java.lang.String getName()
The descriptive name of the line item.
-
getQuantity
public java.lang.Long getQuantity()
The number of line items.
-
getUnitPrice
public java.lang.Long getUnitPrice()
The unit price of the item, in minor currency units.
-
getReference
public java.lang.String getReference()
The item reference or product stock keeping unit (SKU).
-
getCommodityCode
public java.lang.String getCommodityCode()
A code identifying a commodity for value-added tax (VAT) purposes.
-
getUnitOfMeasure
public java.lang.String getUnitOfMeasure()
The unit in which the item is measured, as a Unit of Measure (UoM) code.
-
getTotalAmount
public java.lang.Long getTotalAmount()
The total cost of the line item, in minor currency units. The value should include any tax and discounts applied using the formula: value = (quantity x unit_price) - discount_amount.
-
getTaxAmount
public java.lang.Long getTaxAmount()
The total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase amount.
-
getDiscountAmount
public java.lang.Long getDiscountAmount()
The discount applied to each invoice line item.
-
getUrl
public java.lang.String getUrl()
Link to the line item's product page.
-
getImageUrl
public java.lang.String getImageUrl()
Link to the line item's product image.
-
setName
public void setName(java.lang.String name)
The descriptive name of the line item.
-
setQuantity
public void setQuantity(java.lang.Long quantity)
The number of line items.
-
setUnitPrice
public void setUnitPrice(java.lang.Long unitPrice)
The unit price of the item, in minor currency units.
-
setReference
public void setReference(java.lang.String reference)
The item reference or product stock keeping unit (SKU).
-
setCommodityCode
public void setCommodityCode(java.lang.String commodityCode)
A code identifying a commodity for value-added tax (VAT) purposes.
-
setUnitOfMeasure
public void setUnitOfMeasure(java.lang.String unitOfMeasure)
The unit in which the item is measured, as a Unit of Measure (UoM) code.
-
setTotalAmount
public void setTotalAmount(java.lang.Long totalAmount)
The total cost of the line item, in minor currency units. The value should include any tax and discounts applied using the formula: value = (quantity x unit_price) - discount_amount.
-
setTaxAmount
public void setTaxAmount(java.lang.Long taxAmount)
The total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase amount.
-
setDiscountAmount
public void setDiscountAmount(java.lang.Long discountAmount)
The discount applied to each invoice line item.
-
setUrl
public void setUrl(java.lang.String url)
Link to the line item's product page.
-
setImageUrl
public void setImageUrl(java.lang.String imageUrl)
Link to the line item's product image.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-