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

Update generated code for beta #1489

Merged
merged 6 commits into from
Nov 21, 2024
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
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Changelog

## 13.2.0 - 2024-11-20
* [#1486](https://github.com/stripe/stripe-ruby/pull/1486) This release changes the pinned API version to `2024-11-20.acacia`.
* Add support for `respond` test helper method on resource `Issuing.Authorization`

## 13.2.0-beta.3 - 2024-11-14
* [#1484](https://github.com/stripe/stripe-ruby/pull/1484) Update generated code for beta


## 13.2.0-beta.2 - 2024-11-07
* [#1480](https://github.com/stripe/stripe-ruby/pull/1480) Update generated code for beta
* Add support for new resources `Issuing.FraudLiabilityDebit`, `PaymentAttemptRecord`, and `PaymentRecord`
Expand All @@ -14,9 +17,11 @@
* [#1477](https://github.com/stripe/stripe-ruby/pull/1477) Update generated code for beta
* Add support for `trigger_action` method on resource `PaymentIntent`

## 13.1.2 - 2024-11-15
* [#1488](https://github.com/stripe/stripe-ruby/pull/1488) Fix incorrect key in param encoding

## 13.1.1 - 2024-11-06
* [#1483](https://github.com/stripe/stripe-ruby/pull/1483) Fix APIResource#retrieve not sending `stripe_version`
* [#1478](https://github.com/stripe/stripe-ruby/pull/1478) Update changelog with a note on 2024-10-28.acacia API version

## 13.1.0 - 2024-10-29
* [#1472](https://github.com/stripe/stripe-ruby/pull/1472) This release changes the pinned API version to `2024-10-28.acacia`.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1345
v1370
2 changes: 1 addition & 1 deletion lib/stripe/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def self.flatten_params_array(value, api_mode, calculated_key)
if elem.is_a?(Hash)
result += flatten_params(elem, api_mode, "#{calculated_key}[#{i}]")
elsif elem.is_a?(Array)
result += flatten_params_array(elem, calculated_key, api_mode)
result += flatten_params_array(elem, api_mode, calculated_key)
else
result << if api_mode == :v2
[calculated_key, elem]
Expand Down
11 changes: 11 additions & 0 deletions test/stripe/util_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ class UtilTest < Test::Unit::TestCase

# NOTE: the empty hash won't even show up in the request
g: [],

}
assert_equal(
"a=3&b=%2Bfoo%3F&c=bar%26baz&d[a]=a&d[b]=b&e[0]=0&e[1]=1&f=",
Stripe::Util.encode_parameters(params, :v1)
)
end

should "correctly represent nested arrays" do
params = {
a: [[foo: "bar", baz: "qux"]],
}
assert_equal(
"a[0][foo]=bar&a[0][baz]=qux",
Stripe::Util.encode_parameters(params, :v1)
)
end

should "use correct array expansion for v2 query params" do
params = {
d: { a: "a", b: "b" },
Expand Down
Loading