Stripe.LineItem (stripity_stripe v2.17.2) View Source

Work with Stripe (invoice) line item objects.

Stripe API reference: https://stripe.com/docs/api/ruby#invoice_line_item_object

Link to this section Summary

Functions

Retrieve an invoice line item.

Link to this section Types

Specs

proration_details() :: %{
  credited_items: %{invoice: String.t(), invoice_line_items: [String.t()]} | nil
}

Specs

t() :: %Stripe.LineItem{
  amount: integer(),
  currency: String.t(),
  description: String.t(),
  discountable: boolean(),
  id: Stripe.id(),
  invoice_item: Stripe.id() | nil,
  livemode: boolean(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  period: %{start: Stripe.timestamp(), end: Stripe.timestamp()},
  plan: Stripe.Plan.t() | nil,
  price: Stripe.Price.t() | nil,
  proration: boolean(),
  proration_details: proration_details(),
  quantity: integer(),
  subscription: Stripe.id() | nil,
  subscription_item: Stripe.id() | nil,
  tax_amounts: [tax_amount()],
  tax_rates: [Stripe.TaxRate.t()],
  type: String.t()
}

Specs

tax_amount() :: %{
  amount: integer(),
  inclusive: boolean(),
  tax_rate: Stripe.id() | Stripe.TaxRate.t()
}

Link to this section Functions

Link to this function

retrieve(id, params \\ %{}, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:coupon) => Stripe.id() | Stripe.Coupon.t(),
         optional(:customer) => Stripe.id() | Stripe.Customer.t(),
         optional(:ending_before) => t() | Stripe.id(),
         optional(:limit) => 1..100,
         optional(:starting_after) => t() | Stripe.id(),
         optional(:subscription) => Stripe.id() | Stripe.Subscription.t(),
         optional(:subscription_billing_cycle_anchor) => integer(),
         optional(:subscription_items) =>
           Stripe.List.t(Stripe.SubscriptionItem.t()),
         optional(:subscription_prorate) => boolean(),
         optional(:subscription_proration_date) => Stripe.timestamp(),
         optional(:subscription_tax_percent) => integer(),
         optional(:subscription_trial_from_plan) => boolean()
       }
       | %{}

Retrieve an invoice line item.