stripity_stripe v2.7.0 Stripe.SubscriptionItem.Usage View Source
Work with Stripe usage record objects.
Stripe API reference: https://stripe.com/docs/api/usage_records
Link to this section Summary
Functions
Creates a usage record for a specified subscription item id and date, and fills it with a quantity.
List all subscription item period summaries
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: %Stripe.SubscriptionItem.Usage{
id: Stripe.id(),
invoice: Stripe.id() | nil,
livemode: boolean(),
object: String.t(),
quantity: non_neg_integer(),
subscription_item: Stripe.id() | Stripe.SubscriptionItem.t(),
timestamp: Stripe.timestamp()
}
t() :: %Stripe.SubscriptionItem.Usage{ id: Stripe.id(), invoice: Stripe.id() | nil, livemode: boolean(), object: String.t(), quantity: non_neg_integer(), subscription_item: Stripe.id() | Stripe.SubscriptionItem.t(), timestamp: Stripe.timestamp() }
Link to this section Functions
Link to this function
create(id, params, opts \\ [])
View Source
create(id, params, opts \\ [])
View Source
create(Stripe.id(), params, Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
when params: %{
:quantity => float() | pos_integer() | 0,
:timestamp => Stripe.timestamp() | non_neg_integer(),
optional(:action) => String.t()
}
create(Stripe.id(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ :quantity => float() | pos_integer() | 0, :timestamp => Stripe.timestamp() | non_neg_integer(), optional(:action) => String.t() }
Creates a usage record for a specified subscription item id and date, and fills it with a quantity.
Link to this function
list(id, params \\ %{}, opts \\ [])
View Source
list(id, params \\ %{}, opts \\ [])
View Source
list(Stripe.id(), params, Stripe.options()) ::
{:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
optional(:ending_before) => t() | Stripe.id(),
optional(:limit) => 1..100,
optional(:starting_after) => t() | Stripe.id()
}
list(Stripe.id(), params, Stripe.options()) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()} when params: %{ optional(:ending_before) => t() | Stripe.id(), optional(:limit) => 1..100, optional(:starting_after) => t() | Stripe.id() }
List all subscription item period summaries