Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sdk-release/next-major
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-stripe committed Jul 26, 2022
2 parents 6b11276 + a961665 commit c408baf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v162
v163
3 changes: 1 addition & 2 deletions lib/stripe/resources/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ def self.retrieve_payment_method(
)
end

custom_method :delete_discount, http_verb: :delete, http_path: "discount"

save_nested_resource :source
nested_resource_class_methods :source,
operations: %i[create retrieve update delete list]
Expand All @@ -87,6 +85,7 @@ def self.retrieve_payment_method(
class << self
alias detach_source delete_source
end
custom_method :delete_discount, http_verb: :delete, http_path: "discount"

# Deletes a discount associated with the customer.
#
Expand Down
15 changes: 15 additions & 0 deletions test/stripe/generated_examples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,21 @@ class CodegennedExampleTest < Test::Unit::TestCase
end
end
context "Price.create" do
should "support requests with args: unit_amount, currency, currency_options, recurring, product" do
Stripe::Price.create(
{
unit_amount: 2000,
currency: "usd",
currency_options: {
uah: { unit_amount: 5000 },
eur: { unit_amount: 1800 },
},
recurring: { interval: "month" },
product: "prod_xxxxxxxxxxxxx",
}
)
assert_requested :post, "#{Stripe.api_base}/v1/prices"
end
should "support requests with args: unit_amount, currency, recurring, product" do
Stripe::Price.create(
{
Expand Down

0 comments on commit c408baf

Please sign in to comment.