Class LineItem


  • public class LineItem
    extends Object
    LineItem
    • Constructor Detail

      • LineItem

        public LineItem()
    • Method Detail

      • amountExcludingTax

        public LineItem amountExcludingTax​(Long amountExcludingTax)
        Item amount excluding the tax, in minor units.
        Parameters:
        amountExcludingTax - Item amount excluding the tax, in minor units.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getAmountExcludingTax

        public Long getAmountExcludingTax()
        Item amount excluding the tax, in minor units.
        Returns:
        amountExcludingTax Item amount excluding the tax, in minor units.
      • setAmountExcludingTax

        public void setAmountExcludingTax​(Long amountExcludingTax)
        Item amount excluding the tax, in minor units.
        Parameters:
        amountExcludingTax - Item amount excluding the tax, in minor units.
      • amountIncludingTax

        public LineItem amountIncludingTax​(Long amountIncludingTax)
        Item amount including the tax, in minor units.
        Parameters:
        amountIncludingTax - Item amount including the tax, in minor units.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getAmountIncludingTax

        public Long getAmountIncludingTax()
        Item amount including the tax, in minor units.
        Returns:
        amountIncludingTax Item amount including the tax, in minor units.
      • setAmountIncludingTax

        public void setAmountIncludingTax​(Long amountIncludingTax)
        Item amount including the tax, in minor units.
        Parameters:
        amountIncludingTax - Item amount including the tax, in minor units.
      • brand

        public LineItem brand​(String brand)
        Brand of the item.
        Parameters:
        brand - Brand of the item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getBrand

        public String getBrand()
        Brand of the item.
        Returns:
        brand Brand of the item.
      • setBrand

        public void setBrand​(String brand)
        Brand of the item.
        Parameters:
        brand - Brand of the item.
      • color

        public LineItem color​(String color)
        Color of the item.
        Parameters:
        color - Color of the item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getColor

        public String getColor()
        Color of the item.
        Returns:
        color Color of the item.
      • setColor

        public void setColor​(String color)
        Color of the item.
        Parameters:
        color - Color of the item.
      • description

        public LineItem description​(String description)
        Description of the line item.
        Parameters:
        description - Description of the line item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getDescription

        public String getDescription()
        Description of the line item.
        Returns:
        description Description of the line item.
      • setDescription

        public void setDescription​(String description)
        Description of the line item.
        Parameters:
        description - Description of the line item.
      • id

        public LineItem id​(String id)
        ID of the line item.
        Parameters:
        id - ID of the line item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getId

        public String getId()
        ID of the line item.
        Returns:
        id ID of the line item.
      • setId

        public void setId​(String id)
        ID of the line item.
        Parameters:
        id - ID of the line item.
      • imageUrl

        public LineItem imageUrl​(String imageUrl)
        Link to the picture of the purchased item.
        Parameters:
        imageUrl - Link to the picture of the purchased item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getImageUrl

        public String getImageUrl()
        Link to the picture of the purchased item.
        Returns:
        imageUrl Link to the picture of the purchased item.
      • setImageUrl

        public void setImageUrl​(String imageUrl)
        Link to the picture of the purchased item.
        Parameters:
        imageUrl - Link to the picture of the purchased item.
      • itemCategory

        public LineItem itemCategory​(String itemCategory)
        Item category, used by the payment methods PayPal and Ratepay.
        Parameters:
        itemCategory - Item category, used by the payment methods PayPal and Ratepay.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getItemCategory

        public String getItemCategory()
        Item category, used by the payment methods PayPal and Ratepay.
        Returns:
        itemCategory Item category, used by the payment methods PayPal and Ratepay.
      • setItemCategory

        public void setItemCategory​(String itemCategory)
        Item category, used by the payment methods PayPal and Ratepay.
        Parameters:
        itemCategory - Item category, used by the payment methods PayPal and Ratepay.
      • manufacturer

        public LineItem manufacturer​(String manufacturer)
        Manufacturer of the item.
        Parameters:
        manufacturer - Manufacturer of the item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getManufacturer

        public String getManufacturer()
        Manufacturer of the item.
        Returns:
        manufacturer Manufacturer of the item.
      • setManufacturer

        public void setManufacturer​(String manufacturer)
        Manufacturer of the item.
        Parameters:
        manufacturer - Manufacturer of the item.
      • marketplaceSellerId

        public LineItem marketplaceSellerId​(String marketplaceSellerId)
        Marketplace seller id.
        Parameters:
        marketplaceSellerId - Marketplace seller id.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getMarketplaceSellerId

        public String getMarketplaceSellerId()
        Marketplace seller id.
        Returns:
        marketplaceSellerId Marketplace seller id.
      • setMarketplaceSellerId

        public void setMarketplaceSellerId​(String marketplaceSellerId)
        Marketplace seller id.
        Parameters:
        marketplaceSellerId - Marketplace seller id.
      • productUrl

        public LineItem productUrl​(String productUrl)
        Link to the purchased item.
        Parameters:
        productUrl - Link to the purchased item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getProductUrl

        public String getProductUrl()
        Link to the purchased item.
        Returns:
        productUrl Link to the purchased item.
      • setProductUrl

        public void setProductUrl​(String productUrl)
        Link to the purchased item.
        Parameters:
        productUrl - Link to the purchased item.
      • quantity

        public LineItem quantity​(Long quantity)
        Number of items.
        Parameters:
        quantity - Number of items.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getQuantity

        public Long getQuantity()
        Number of items.
        Returns:
        quantity Number of items.
      • setQuantity

        public void setQuantity​(Long quantity)
        Number of items.
        Parameters:
        quantity - Number of items.
      • receiverEmail

        public LineItem receiverEmail​(String receiverEmail)
        Email associated with the given product in the basket (usually in electronic gift cards).
        Parameters:
        receiverEmail - Email associated with the given product in the basket (usually in electronic gift cards).
        Returns:
        the current LineItem instance, allowing for method chaining
      • getReceiverEmail

        public String getReceiverEmail()
        Email associated with the given product in the basket (usually in electronic gift cards).
        Returns:
        receiverEmail Email associated with the given product in the basket (usually in electronic gift cards).
      • setReceiverEmail

        public void setReceiverEmail​(String receiverEmail)
        Email associated with the given product in the basket (usually in electronic gift cards).
        Parameters:
        receiverEmail - Email associated with the given product in the basket (usually in electronic gift cards).
      • size

        public LineItem size​(String size)
        Size of the item.
        Parameters:
        size - Size of the item.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getSize

        public String getSize()
        Size of the item.
        Returns:
        size Size of the item.
      • setSize

        public void setSize​(String size)
        Size of the item.
        Parameters:
        size - Size of the item.
      • sku

        public LineItem sku​(String sku)
        Stock keeping unit.
        Parameters:
        sku - Stock keeping unit.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getSku

        public String getSku()
        Stock keeping unit.
        Returns:
        sku Stock keeping unit.
      • setSku

        public void setSku​(String sku)
        Stock keeping unit.
        Parameters:
        sku - Stock keeping unit.
      • taxAmount

        public LineItem taxAmount​(Long taxAmount)
        Tax amount, in minor units.
        Parameters:
        taxAmount - Tax amount, in minor units.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getTaxAmount

        public Long getTaxAmount()
        Tax amount, in minor units.
        Returns:
        taxAmount Tax amount, in minor units.
      • setTaxAmount

        public void setTaxAmount​(Long taxAmount)
        Tax amount, in minor units.
        Parameters:
        taxAmount - Tax amount, in minor units.
      • taxPercentage

        public LineItem taxPercentage​(Long taxPercentage)
        Tax percentage, in minor units.
        Parameters:
        taxPercentage - Tax percentage, in minor units.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getTaxPercentage

        public Long getTaxPercentage()
        Tax percentage, in minor units.
        Returns:
        taxPercentage Tax percentage, in minor units.
      • setTaxPercentage

        public void setTaxPercentage​(Long taxPercentage)
        Tax percentage, in minor units.
        Parameters:
        taxPercentage - Tax percentage, in minor units.
      • upc

        public LineItem upc​(String upc)
        Universal Product Code.
        Parameters:
        upc - Universal Product Code.
        Returns:
        the current LineItem instance, allowing for method chaining
      • getUpc

        public String getUpc()
        Universal Product Code.
        Returns:
        upc Universal Product Code.
      • setUpc

        public void setUpc​(String upc)
        Universal Product Code.
        Parameters:
        upc - Universal Product Code.
      • equals

        public boolean equals​(Object o)
        Return true if this LineItem object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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