View Source ExOAPI.Stripe.Schemas.LineItem (exoapi_stripe v0.1.4)

:amount :: :integer

The amount, in %s.

:currency :: :string

Three-letter ISO currency code, in lowercase. Must be a supported currency.

:description :: :string

An arbitrary string attached to the object. Often useful for displaying to users.

::discount_amounts :: ExOAPI.Stripe.Schemas.DiscountsResourceDiscountAmount

:discountable :: :boolean

If true, discounts will apply to this line item. Always false for prorations.

::discounts :: ExOAPI.Stripe.Schemas.Discount | :string

:id :: :string

Unique identifier for the object.

:invoice_item :: :string

The ID of the invoice item associated with this line item if any.

:livemode :: :boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

:metadata :: :map

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.

:object :: :string

String representing the object's type. Objects of the same type share the same value.

:period :: ExOAPI.Stripe.Schemas.InvoiceLineItemPeriod

:price :: ExOAPI.Stripe.Schemas.Price

The price of the line item.

:proration :: :boolean

Whether this is a proration.

:proration_details :: ExOAPI.Stripe.Schemas.InvoicesLineItemsProrationDetails

Additional details for proration line items

:quantity :: :integer

The quantity of the subscription, if the line item is a subscription or a proration.

:subscription :: ExOAPI.Stripe.Schemas.Subscription

The subscription that the invoice item pertains to, if any.

:subscription_item :: ExOAPI.Stripe.Schemas.SubscriptionItem

The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.

::tax_amounts :: ExOAPI.Stripe.Schemas.InvoiceTaxAmount

::tax_rates :: ExOAPI.Stripe.Schemas.TaxRate

:type :: :string

A string identifying the type of the source of this line item, either an invoiceitem or a subscription.

Link to this section Summary

Link to this section Types

@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.LineItem{
  amount: integer() | nil,
  currency: String.t() | nil,
  description: String.t() | nil,
  discount_amounts: [ExOAPI.Stripe.Schemas.DiscountsResourceDiscountAmount.t()],
  discountable: boolean() | nil,
  discounts: [ExOAPI.EctoTypes.AnyOf.t()] | nil,
  id: String.t() | nil,
  invoice_item: String.t() | nil,
  livemode: boolean() | nil,
  metadata: map() | nil,
  object: :line_item | nil,
  period: ExOAPI.Stripe.Schemas.InvoiceLineItemPeriod.t() | nil,
  price: ExOAPI.EctoTypes.AnyOf.t() | nil,
  proration: boolean() | nil,
  proration_details: ExOAPI.EctoTypes.AnyOf.t() | nil,
  quantity: integer() | nil,
  subscription: String.t() | nil,
  subscription_item: String.t() | nil,
  tax_amounts: [ExOAPI.Stripe.Schemas.InvoiceTaxAmount.t()],
  tax_rates: [ExOAPI.Stripe.Schemas.TaxRate.t()],
  type: (:subscription | :invoiceitem) | nil
}

Link to this section Functions

Link to this function

changeset(struct \\ %__MODULE__{}, params)

View Source
@spec changeset(t(), params()) :: Ecto.Changeset.t()