Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1092

Merged
merged 1 commit into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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