Class LineItem

All Implemented Interfaces:
HasId, StripeObjectInterface

public class LineItem extends StripeObject implements HasId
A line item.
  • Constructor Details

    • LineItem

      public LineItem()
  • Method Details

    • getAmountDiscount

      public Long getAmountDiscount()
      Total discount amount applied. If no discounts were applied, defaults to 0.
    • getAmountSubtotal

      public Long getAmountSubtotal()
      Total before any discounts or taxes are applied.
    • getAmountTax

      public Long getAmountTax()
      Total tax amount applied. If no tax was applied, defaults to 0.
    • getAmountTotal

      public Long getAmountTotal()
      Total after discounts and taxes.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getDescription

      public String getDescription()
      An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
    • getDiscounts

      public List<LineItem.Discount> getDiscounts()
      The discounts applied to the line item.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to item.

    • getPrice

      public Price getPrice()
      The price used to generate the line item.
    • getQuantity

      public Long getQuantity()
      The quantity of products being purchased.
    • getTaxes

      public List<LineItem.Tax> getTaxes()
      The taxes applied to the line item.
    • setAmountDiscount

      public void setAmountDiscount(Long amountDiscount)
      Total discount amount applied. If no discounts were applied, defaults to 0.
    • setAmountSubtotal

      public void setAmountSubtotal(Long amountSubtotal)
      Total before any discounts or taxes are applied.
    • setAmountTax

      public void setAmountTax(Long amountTax)
      Total tax amount applied. If no tax was applied, defaults to 0.
    • setAmountTotal

      public void setAmountTotal(Long amountTotal)
      Total after discounts and taxes.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setDescription

      public void setDescription(String description)
      An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
    • setDiscounts

      public void setDiscounts(List<LineItem.Discount> discounts)
      The discounts applied to the line item.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to item.

    • setPrice

      public void setPrice(Price price)
      The price used to generate the line item.
    • setQuantity

      public void setQuantity(Long quantity)
      The quantity of products being purchased.
    • setTaxes

      public void setTaxes(List<LineItem.Tax> taxes)
      The taxes applied to the line item.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId