stripity_stripe v2.7.0 Stripe.LineItem 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
Link to this type
t()
View Source
t()
View Source
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,
proration: boolean(),
quantity: integer(),
subscription: Stripe.id() | nil,
subscription_item: Stripe.id() | nil,
tax_amounts: [tax_amount()],
tax_rates: [Stripe.TaxRate.t()],
type: String.t()
}
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, proration: boolean(), quantity: integer(), subscription: Stripe.id() | nil, subscription_item: Stripe.id() | nil, tax_amounts: [tax_amount()], tax_rates: [Stripe.TaxRate.t()], type: String.t() }
Link to this type
tax_amount()
View Source
tax_amount()
View Source
tax_amount() :: %{
amount: integer(),
inclusive: boolean(),
tax_rate: Stripe.id() | Stripe.TaxRate.t()
}
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
retrieve(id, params \\ %{}, opts \\ [])
View Source
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(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.