stripity_stripe v2.7.0 Stripe.Invoiceitem View Source
Work with Stripe invoiceitem objects.
Stripe API reference: https://stripe.com/docs/api#invoiceitems
Note: this module is named Invoiceitem
and not InvoiceItem
on purpose, to
match the Stripe terminology of invoiceitem
.
Link to this section Summary
Functions
Create an invoiceitem.
Delete and invoiceitem
List all invoiceitems.
Retrieve an invoiceitem.
Update an invoiceitem.
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: %Stripe.Invoiceitem{
amount: integer(),
currency: String.t(),
customer: Stripe.id() | Stripe.Customer.t(),
date: Stripe.timestamp(),
description: String.t(),
discountable: boolean(),
id: Stripe.id(),
invoice: Stripe.id() | Stripe.Invoice.t(),
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() | Stripe.Subscription.t() | nil,
subscription_item: Stripe.id() | Stripe.SubscriptionItem.t() | nil,
tax_rates: [Stripe.TaxRate.t()],
unit_amount: integer(),
unit_amount_decimal: String.t()
}
t() :: %Stripe.Invoiceitem{ amount: integer(), currency: String.t(), customer: Stripe.id() | Stripe.Customer.t(), date: Stripe.timestamp(), description: String.t(), discountable: boolean(), id: Stripe.id(), invoice: Stripe.id() | Stripe.Invoice.t(), 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() | Stripe.Subscription.t() | nil, subscription_item: Stripe.id() | Stripe.SubscriptionItem.t() | nil, tax_rates: [Stripe.TaxRate.t()], unit_amount: integer(), unit_amount_decimal: String.t() }
Link to this section Functions
Link to this function
create(params, opts \\ [])
View Source
create(params, opts \\ [])
View Source
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params:
%{
optional(:amount) => integer(),
:currency => String.t(),
:customer => Stripe.id() | Stripe.Customer.t(),
optional(:description) => String.t(),
optional(:discountable) => boolean(),
optional(:invoice) => Stripe.id() | Stripe.Invoice.t(),
optional(:metadata) => Stripe.Types.metadata(),
optional(:quantity) => integer(),
optional(:subscription) => Stripe.id() | Stripe.Subscription.t(),
optional(:tax_rates) => [String.t()],
optional(:unit_amount) => integer(),
optional(:unit_amount_decimal) => String.t()
}
| %{}
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:amount) => integer(), :currency => String.t(), :customer => Stripe.id() | Stripe.Customer.t(), optional(:description) => String.t(), optional(:discountable) => boolean(), optional(:invoice) => Stripe.id() | Stripe.Invoice.t(), optional(:metadata) => Stripe.Types.metadata(), optional(:quantity) => integer(), optional(:subscription) => Stripe.id() | Stripe.Subscription.t(), optional(:tax_rates) => [String.t()], optional(:unit_amount) => integer(), optional(:unit_amount_decimal) => String.t() } | %{}
Create an invoiceitem.
Link to this function
delete(id, opts \\ [])
View Source
delete(id, opts \\ [])
View Source
delete(Stripe.id() | t(), Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
delete(Stripe.id() | t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Delete and invoiceitem
Takes the id
of the invoiceitem to delete.
Link to this function
list(params \\ %{}, opts \\ [])
View Source
list(params \\ %{}, opts \\ [])
View Source
list(params, Stripe.options()) ::
{:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params:
%{
optional(:created) => Stripe.timestamp(),
optional(:customer) => Stripe.id() | Stripe.Customer.t(),
optional(:ending_before) => t() | Stripe.id(),
optional(:invoice) => Stripe.id() | Stripe.Invoice.t(),
optional(:limit) => 1..100,
optional(:starting_after) => t() | Stripe.id()
}
| %{}
list(params, Stripe.options()) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()} when params: %{ optional(:created) => Stripe.timestamp(), optional(:customer) => Stripe.id() | Stripe.Customer.t(), optional(:ending_before) => t() | Stripe.id(), optional(:invoice) => Stripe.id() | Stripe.Invoice.t(), optional(:limit) => 1..100, optional(:starting_after) => t() | Stripe.id() } | %{}
List all invoiceitems.
Link to this function
retrieve(id, opts \\ [])
View Source
retrieve(id, opts \\ [])
View Source
retrieve(Stripe.id() | t(), Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
retrieve(Stripe.id() | t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Retrieve an invoiceitem.
Link to this function
update(id, params, opts \\ [])
View Source
update(id, params, opts \\ [])
View Source
update(Stripe.id() | t(), params, Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
when params:
%{
optional(:amount) => integer(),
optional(:description) => String.t(),
optional(:discountable) => boolean(),
optional(:metadata) => Stripe.Types.metadata(),
optional(:quantity) => integer(),
optional(:tax_rates) => [String.t()],
optional(:unit_amount) => integer(),
optional(:unit_amount_decimal) => String.t()
}
| %{}
update(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:amount) => integer(), optional(:description) => String.t(), optional(:discountable) => boolean(), optional(:metadata) => Stripe.Types.metadata(), optional(:quantity) => integer(), optional(:tax_rates) => [String.t()], optional(:unit_amount) => integer(), optional(:unit_amount_decimal) => String.t() } | %{}
Update an invoiceitem.
Takes the id
and a map of changes.