Skip to content

Commit

Permalink
fix: add product_data type to Price params (beam-community#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Vardy authored Dec 23, 2021
1 parent 2c9e49b commit e593641
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/stripe/subscriptions/price.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ defmodule Stripe.Price do
round: String.t()
}

@type product_data :: %{
:name => String.t(),
optional(:active) => boolean,
optional(:metadata) => map,
optional(:statement_descriptor) => String.t(),
optional(:tax_code) => String.t(),
optional(:unit_label) => String.t()
}

@type t :: %__MODULE__{
id: Stripe.id(),
object: String.t(),
Expand Down Expand Up @@ -140,6 +149,7 @@ defmodule Stripe.Price do
optional(:metadata) => Stripe.Types.metadata(),
optional(:nickname) => String.t(),
optional(:product) => Stripe.id() | Stripe.Product.t(),
optional(:product_data) => product_data,
optional(:recurring) => recurring(),
optional(:tax_behavior) => String.t(),
optional(:tiers) => [price_tier()],
Expand Down

0 comments on commit e593641

Please sign in to comment.