From aa880437dcc6eb86e710cb836976a2f168f79f43 Mon Sep 17 00:00:00 2001 From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:33:20 -0800 Subject: [PATCH 1/2] Fix APIResource#retrieve not sending `stripe_version` (#1483) * Fix retrieve stripe version * better test --- lib/stripe/request_options.rb | 2 +- test/stripe/request_options_test.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/stripe/request_options.rb b/lib/stripe/request_options.rb index 56c29ec8..9006dcfe 100644 --- a/lib/stripe/request_options.rb +++ b/lib/stripe/request_options.rb @@ -63,7 +63,7 @@ module Stripe idempotency_key: req_opts[:idempotency_key], stripe_account: req_opts[:stripe_account] || object_opts[:stripe_account], stripe_context: req_opts[:stripe_context] || object_opts[:stripe_context], - stripe_version: req_opts[:stripe_version] || object_opts[:api_version], + stripe_version: req_opts[:stripe_version] || object_opts[:stripe_version], } # Remove nil values from headers diff --git a/test/stripe/request_options_test.rb b/test/stripe/request_options_test.rb index af72abc2..c9eefb8a 100644 --- a/test/stripe/request_options_test.rb +++ b/test/stripe/request_options_test.rb @@ -77,5 +77,16 @@ module Stripe assert_equal({ "A-Header" => "header", "B-Header" => "header" }, request_opts[:headers]) end end + + context "combine_opts" do + should "correctly combine user specified options" do + object_opts = { api_key: "sk_123", stripe_version: "2022-11-15" } + request_opts = { api_key: "sk_456", stripe_account: "acct_123" } + combined = RequestOptions.combine_opts(object_opts, request_opts) + assert_equal(combined[:stripe_version], "2022-11-15") + assert_equal(combined[:api_key], "sk_456") + assert_equal(combined[:stripe_account], "acct_123") + end + end end end From 75c8c3835cde832602cdd0fbb62ba2599884e954 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Wed, 6 Nov 2024 17:38:41 -0500 Subject: [PATCH 2/2] Bump version to 13.1.1 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- lib/stripe/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb1c3993..3d9c8605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## 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`. * Add support for `submit_card` test helper method on resource `Issuing.Card` diff --git a/VERSION b/VERSION index e6ba3513..21b80e99 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -13.1.0 +13.1.1 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index f66ce030..e8e5736e 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "13.1.0" + VERSION = "13.1.1" end