Stripe.SubscriptionItem (stripity_stripe v2.17.3) View Source
Work with Stripe subscription item objects.
Stripe API reference: https://stripe.com/docs/api#subscription_items
Link to this section Summary
Functions
Create a subscription item.
Delete a subscription.
List all subscriptions.
Retrieve a subscription.
Update a subscription item.
Link to this section Types
Specs
t() :: %Stripe.SubscriptionItem{ billing_thresholds: Stripe.Types.collection_method_thresholds() | nil, created: Stripe.timestamp(), deleted: boolean() | nil, id: Stripe.id(), metadata: Stripe.Types.metadata(), object: String.t(), plan: Stripe.Plan.t(), price: Stripe.Price.t(), quantity: non_neg_integer(), subscription: Stripe.id() | Stripe.Subscription.t() | nil, tax_rates: [Stripe.TaxRate.t()] }
Link to this section Functions
Specs
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ :subscription => Stripe.id() | Stripe.Subscription.t(), optional(:plan) => Stripe.id() | Stripe.Plan.t(), optional(:price) => Stripe.id() | Stripe.Price.t(), optional(:metadata) => Stripe.Types.metadata(), optional(:prorate) => boolean(), optional(:proration_date) => Stripe.timestamp(), optional(:quantity) => non_neg_integer(), optional(:tax_rates) => [String.t()] }
Create a subscription item.
Specs
delete(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:clear_usage) => boolean(), optional(:prorate) => boolean(), optional(:proration_date) => Stripe.timestamp() }
Delete a subscription.
Takes the id
and an optional map of params
.
Specs
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 subscriptions.
Specs
retrieve(Stripe.id() | t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Retrieve a subscription.
Specs
update(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:metadata) => Stripe.Types.metadata(), optional(:plan) => Stripe.id() | Stripe.Plan.t(), optional(:price) => Stripe.id() | Stripe.Price.t(), optional(:prorate) => boolean(), optional(:proration_date) => Stripe.timestamp(), optional(:quantity) => non_neg_integer(), optional(:tax_rates) => [String.t()] }
Update a subscription item.
Takes the id
and a map of changes.