Compare commits

..

7 Commits

Author SHA1 Message Date
Richard Marmorstein
705078e2cf Reset version to 8.3.0-beta.1 2023-02-23 17:08:24 -08:00
Richard Marmorstein
29d8261b17 Include latest changes from the master branch 2023-02-23 17:08:24 -08:00
Richard Marmorstein
3958d6a9df Set version to 8.3.0 to simplify merge 2023-02-23 17:08:24 -08:00
Richard Marmorstein
e4e6bb54fd
Merge pull request #1181 from stripe/latest-codegen-master
API Updates
2023-02-23 15:11:34 -08:00
Richard Marmorstein
e2e4b77a87 Codegen for openapi v232 2023-02-23 15:03:19 -08:00
Zac Clay
57a2806c18
Symbolize hash keys inside convert_to_stripe_object_with_params (#1152) 2023-02-21 10:45:38 -08:00
Annie Li
7db585f5a4 Bump version to 8.3.0 2023-02-16 15:01:42 -08:00
5 changed files with 16 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 8.3.0 - 2023-02-16
* [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
* Add support for `refund_payment` method on resource `Terminal.Reader`
## 8.3.0-beta.1 - 2023-02-02
* [#1174](https://github.com/stripe/stripe-ruby/pull/1174) API Updates for beta branch
* Updated stable APIs to the latest version

View File

@ -1 +1 @@
v226
v232

View File

@ -133,7 +133,8 @@ module Stripe
when Hash
# Try converting to a known object class. If none available, fall back
# to generic StripeObject
obj = object_classes.fetch(data[:object], StripeObject)
object_name = data[:object] || data["object"]
obj = object_classes.fetch(object_name, StripeObject)
.construct_from(data, opts)
# set filters so that we can fetch the same limit, expansions, and

View File

@ -826,6 +826,10 @@ module Stripe
Stripe::Invoice.retrieve("in_xxxxxxxxxxxxx")
assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?"
end
should "support requests with args: id, expand" do
Stripe::Invoice.retrieve({ expand: ["customer"], id: "in_xxxxxxxxxxxxx" })
assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?expand[0]=customer"
end
end
context "Invoice.search" do
should "support requests with args: query" do

View File

@ -122,6 +122,11 @@ module Stripe
assert obj.is_a?(ListObject)
end
should "#convert_to_stripe_object should marshal hashes with string keys" do
obj = Util.convert_to_stripe_object({ "object" => "account" }, {})
assert obj.is_a?(Account)
end
should "#convert_to_stripe_object should marshal other classes" do
obj = Util.convert_to_stripe_object({ object: "account" }, {})
assert obj.is_a?(Account)