Skip to content

Commit

Permalink
Add missing unit_label to Stripe.Product (beam-community#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvanvliet authored and snewcomer committed Jul 26, 2018
1 parent 2fb98e3 commit 308ee6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/stripe/subscriptions/product.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ defmodule Stripe.Product do
shippable: boolean | nil,
statement_descriptor: String.t() | nil,
type: String.t() | nil,
unit_label: String.t() | nil,
updated: Stripe.timestamp(),
url: String.t() | nil
}
Expand All @@ -54,6 +55,7 @@ defmodule Stripe.Product do
:shippable,
:statement_descriptor,
:type,
:unit_label,
:updated,
:url
]
Expand Down
6 changes: 3 additions & 3 deletions test/stripe/subscriptions/product_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ defmodule Stripe.ProductTest do
use Stripe.StripeCase, async: true

describe "create/2" do
test "creates an invoice" do
test "creates an product" do
assert {:ok, %Stripe.Product{}} = Stripe.Product.create(%{name: "Plus", type: "service"})
assert_stripe_requested(:post, "/v1/products")
end
end

describe "retrieve/2" do
test "retrieves an invoice" do
test "retrieves an product" do
assert {:ok, %Stripe.Product{}} = Stripe.Product.retrieve("Plus")
assert_stripe_requested(:get, "/v1/products/Plus")
end
end

describe "update/2" do
test "updates an invoice" do
test "updates an product" do
params = %{metadata: %{key: "value"}}
assert {:ok, %Stripe.Product{}} = Stripe.Product.update("Plus", params)
assert_stripe_requested(:post, "/v1/products/Plus")
Expand Down

0 comments on commit 308ee6e

Please sign in to comment.