Class InvoiceLineItem

java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.InvoiceLineItem
All Implemented Interfaces:
HasId, StripeObjectInterface

public class InvoiceLineItem
extends StripeObject
implements HasId
  • Field Summary

    Fields inherited from class com.stripe.model.StripeObject

    PRETTY_PRINT_GSON
  • Constructor Summary

    Constructors 
    Constructor Description
    InvoiceLineItem()  
  • Method Summary

    Modifier and Type Method Description
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.lang.Long getAmount()
    The amount, in %s.
    java.lang.String getCurrency()
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
    java.lang.String getDescription()
    An arbitrary string attached to the object.
    java.lang.Boolean getDiscountable()
    If true, discounts will apply to this line item.
    java.lang.String getId()
    Unique identifier for the object.
    java.lang.String getInvoiceItem()
    The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
    java.lang.Boolean getLivemode()
    Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    java.util.Map<java.lang.String,​java.lang.String> getMetadata()
    Set of key-value pairs that you can attach to an object.
    java.lang.String getObject()
    String representing the object's type.
    InvoiceLineItemPeriod getPeriod()  
    Plan getPlan()
    The plan of the subscription, if the line item is a subscription or a proration.
    java.lang.Boolean getProration()
    Whether this is a proration.
    java.lang.Long getQuantity()
    The quantity of the subscription, if the line item is a subscription or a proration.
    java.lang.String getSubscription()
    The subscription that the invoice item pertains to, if any.
    java.lang.String getSubscriptionItem()
    The subscription item that generated this invoice item.
    java.util.List<Invoice.TaxAmount> getTaxAmounts()
    The amount of tax calculated per tax rate for this line item.
    java.util.List<TaxRate> getTaxRates()
    The tax rates which apply to the line item.
    java.lang.String getType()
    A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
    java.lang.Boolean getUnifiedProration()
    For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.
    int hashCode()  
    void setAmount​(java.lang.Long amount)
    The amount, in %s.
    void setCurrency​(java.lang.String currency)
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
    void setDescription​(java.lang.String description)
    An arbitrary string attached to the object.
    void setDiscountable​(java.lang.Boolean discountable)
    If true, discounts will apply to this line item.
    void setId​(java.lang.String id)
    Unique identifier for the object.
    void setInvoiceItem​(java.lang.String invoiceItem)
    The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
    void setLivemode​(java.lang.Boolean livemode)
    Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
    Set of key-value pairs that you can attach to an object.
    void setObject​(java.lang.String object)
    String representing the object's type.
    void setPeriod​(InvoiceLineItemPeriod period)  
    void setPlan​(Plan plan)
    The plan of the subscription, if the line item is a subscription or a proration.
    void setProration​(java.lang.Boolean proration)
    Whether this is a proration.
    void setQuantity​(java.lang.Long quantity)
    The quantity of the subscription, if the line item is a subscription or a proration.
    void setSubscription​(java.lang.String subscription)
    The subscription that the invoice item pertains to, if any.
    void setSubscriptionItem​(java.lang.String subscriptionItem)
    The subscription item that generated this invoice item.
    void setTaxAmounts​(java.util.List<Invoice.TaxAmount> taxAmounts)
    The amount of tax calculated per tax rate for this line item.
    void setTaxRates​(java.util.List<TaxRate> taxRates)
    The tax rates which apply to the line item.
    void setType​(java.lang.String type)
    A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
    void setUnifiedProration​(java.lang.Boolean unifiedProration)
    For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.

    Methods inherited from class com.stripe.model.StripeObject

    equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getAmount

      public java.lang.Long getAmount()
      The amount, in %s.
    • getCurrency

      public java.lang.String getCurrency()
      Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
    • getDescription

      public java.lang.String getDescription()
      An arbitrary string attached to the object. Often useful for displaying to users.
    • getDiscountable

      public java.lang.Boolean getDiscountable()
      If true, discounts will apply to this line item. Always false for prorations.
    • getInvoiceItem

      public java.lang.String getInvoiceItem()
      The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
    • getLivemode

      public java.lang.Boolean getLivemode()
      Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    • getMetadata

      public java.util.Map<java.lang.String,​java.lang.String> getMetadata()
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.
    • getObject

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

      Equal to `line_item`.

    • getPeriod

      public InvoiceLineItemPeriod getPeriod()
    • getPlan

      public Plan getPlan()
      The plan of the subscription, if the line item is a subscription or a proration.
    • getProration

      public java.lang.Boolean getProration()
      Whether this is a proration.
    • getQuantity

      public java.lang.Long getQuantity()
      The quantity of the subscription, if the line item is a subscription or a proration.
    • getSubscription

      public java.lang.String getSubscription()
      The subscription that the invoice item pertains to, if any.
    • getSubscriptionItem

      public java.lang.String getSubscriptionItem()
      The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
    • getTaxAmounts

      public java.util.List<Invoice.TaxAmount> getTaxAmounts()
      The amount of tax calculated per tax rate for this line item.
    • getTaxRates

      public java.util.List<TaxRate> getTaxRates()
      The tax rates which apply to the line item.
    • getType

      public java.lang.String getType()
      A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.

      One of `invoiceitem`, or `subscription`.

    • getUnifiedProration

      public java.lang.Boolean getUnifiedProration()
      For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.
    • setAmount

      public void setAmount​(java.lang.Long amount)
      The amount, in %s.
    • setCurrency

      public void setCurrency​(java.lang.String currency)
      Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
    • setDescription

      public void setDescription​(java.lang.String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • setDiscountable

      public void setDiscountable​(java.lang.Boolean discountable)
      If true, discounts will apply to this line item. Always false for prorations.
    • setId

      public void setId​(java.lang.String id)
      Unique identifier for the object.
    • setInvoiceItem

      public void setInvoiceItem​(java.lang.String invoiceItem)
      The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
    • setLivemode

      public void setLivemode​(java.lang.Boolean livemode)
      Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    • setMetadata

      public void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.
    • setObject

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

      Equal to `line_item`.

    • setPeriod

      public void setPeriod​(InvoiceLineItemPeriod period)
    • setPlan

      public void setPlan​(Plan plan)
      The plan of the subscription, if the line item is a subscription or a proration.
    • setProration

      public void setProration​(java.lang.Boolean proration)
      Whether this is a proration.
    • setQuantity

      public void setQuantity​(java.lang.Long quantity)
      The quantity of the subscription, if the line item is a subscription or a proration.
    • setSubscription

      public void setSubscription​(java.lang.String subscription)
      The subscription that the invoice item pertains to, if any.
    • setSubscriptionItem

      public void setSubscriptionItem​(java.lang.String subscriptionItem)
      The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
    • setTaxAmounts

      public void setTaxAmounts​(java.util.List<Invoice.TaxAmount> taxAmounts)
      The amount of tax calculated per tax rate for this line item.
    • setTaxRates

      public void setTaxRates​(java.util.List<TaxRate> taxRates)
      The tax rates which apply to the line item.
    • setType

      public void setType​(java.lang.String type)
      A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.

      One of `invoiceitem`, or `subscription`.

    • setUnifiedProration

      public void setUnifiedProration​(java.lang.Boolean unifiedProration)
      For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

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

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