Class Item


  • public final class Item
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Item.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 new Item instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Item.ItemBuilder builder()  
      boolean equals​(java.lang.Object o)  
      java.lang.String getCommodityCode()
      A code identifying a commodity for value-added tax (VAT) purposes.
      java.lang.Long getDiscountAmount()
      The discount applied to each invoice line item.
      java.lang.String getImageUrl()
      Link to the line item's product image.
      java.lang.String getName()
      The descriptive name of the line item.
      java.lang.Long getQuantity()
      The number of line items.
      java.lang.String getReference()
      The item reference or product stock keeping unit (SKU).
      java.lang.Long getTaxAmount()
      The total amount of sales tax or value-added tax (VAT) on the total purchase amount.
      java.lang.Long getTotalAmount()
      The total cost of the line item, in minor currency units.
      java.lang.String getUnitOfMeasure()
      The unit in which the item is measured, as a Unit of Measure (UoM) code.
      java.lang.Long getUnitPrice()
      The unit price of the item, in minor currency units.
      java.lang.String getUrl()
      Link to the line item's product page.
      int hashCode()  
      void setCommodityCode​(java.lang.String commodityCode)
      A code identifying a commodity for value-added tax (VAT) purposes.
      void setDiscountAmount​(java.lang.Long discountAmount)
      The discount applied to each invoice line item.
      void setImageUrl​(java.lang.String imageUrl)
      Link to the line item's product image.
      void setName​(java.lang.String name)
      The descriptive name of the line item.
      void setQuantity​(java.lang.Long quantity)
      The number of line items.
      void setReference​(java.lang.String reference)
      The item reference or product stock keeping unit (SKU).
      void setTaxAmount​(java.lang.Long taxAmount)
      The total amount of sales tax or value-added tax (VAT) on the total purchase amount.
      void setTotalAmount​(java.lang.Long totalAmount)
      The total cost of the line item, in minor currency units.
      void setUnitOfMeasure​(java.lang.String unitOfMeasure)
      The unit in which the item is measured, as a Unit of Measure (UoM) code.
      void setUnitPrice​(java.lang.Long unitPrice)
      The unit price of the item, in minor currency units.
      void setUrl​(java.lang.String url)
      Link to the line item's product page.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 new Item instance.
        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

      • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object