Stripe.Resources.LineItem (tiger_stripe v0.3.0)

Copy Markdown View Source

LineItem

A line item.

Summary

Types

adjustable_quantity()

@type adjustable_quantity() :: %{
  optional(:enabled) => boolean() | nil,
  optional(:maximum) => integer() | nil,
  optional(:minimum) => integer() | nil,
  optional(String.t()) => term()
}
  • enabled
  • maximum - Nullable.
  • minimum - Nullable.

discounts()

@type discounts() :: %{
  optional(:amount) => integer() | nil,
  optional(:discount) => Stripe.Resources.Discount.t() | nil,
  optional(String.t()) => term()
}
  • amount - The amount discounted.
  • discount

t()

@type t() :: %Stripe.Resources.LineItem{
  adjustable_quantity: adjustable_quantity(),
  amount_discount: integer(),
  amount_subtotal: integer(),
  amount_tax: integer(),
  amount_total: integer(),
  currency: String.t(),
  description: String.t(),
  discounts: [discounts()] | nil,
  id: String.t(),
  metadata: %{required(String.t()) => String.t()},
  object: String.t(),
  price: Stripe.Resources.Price.t(),
  quantity: integer(),
  taxes: [taxes()] | nil
}
  • adjustable_quantity - Nullable. Expandable.
  • amount_discount - Total discount amount applied. If no discounts were applied, defaults to 0.
  • amount_subtotal - Total before any discounts or taxes are applied.
  • amount_tax - Total tax amount applied. If no tax was applied, defaults to 0.
  • amount_total - Total after discounts and taxes.
  • currency - Three-letter ISO currency code, in lowercase. Must be a supported currency. Format: ISO 4217 currency code.
  • description - An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. Max length: 5000. Nullable.
  • discounts - The discounts applied to the line item. Expandable.
  • id - Unique identifier for the object. Max length: 5000.
  • 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. Nullable.
  • object - String representing the object's type. Objects of the same type share the same value. Possible values: item.
  • price - The price used to generate the line item. Nullable. Expandable.
  • quantity - The quantity of products being purchased. Nullable.
  • taxes - The taxes applied to the line item. Expandable.

taxes()

@type taxes() :: %{
  optional(:amount) => integer() | nil,
  optional(:rate) => Stripe.Resources.TaxRate.t() | nil,
  optional(:taxability_reason) => String.t() | nil,
  optional(:taxable_amount) => integer() | nil,
  optional(String.t()) => term()
}
  • amount - Amount of tax applied for this rate.
  • rate
  • taxability_reason - The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. Possible values: customer_exempt, not_collecting, not_subject_to_tax, not_supported, portion_product_exempt, portion_reduced_rated, portion_standard_rated, product_exempt, product_exempt_holiday, proportionally_rated, reduced_rated, reverse_charge, standard_rated, taxable_basis_reduced, zero_rated. Nullable.
  • taxable_amount - The amount on which tax is calculated, in cents (or local equivalent). Nullable.

Functions

expandable_fields()

object_name()