From ad4d29b4aa05be7876335b23c5da54659624800e Mon Sep 17 00:00:00 2001 From: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> Date: Mon, 24 Jun 2024 15:44:37 -0400 Subject: [PATCH 1/3] Temporarily remove jruby from test matrix (#1424) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c2571731..fcf32cfd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, '3.3', jruby-9.4.0.0, truffleruby-head] + ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, '3.3', truffleruby-head] steps: - uses: actions/checkout@v3 - name: Set up Ruby From a0542ff7200ad5e4f624d55ac0330652fcc2ccc4 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:49:12 +0000 Subject: [PATCH 2/3] Update generated code (#1419) * Update generated code for v1087 * Update generated code for v1088 * Update generated code for v1092 * Update generated code for v1093 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/stripe/api_version.rb | 2 +- lib/stripe/resources/issuing/authorization.rb | 20 +++++++++++++++++++ lib/stripe/resources/tax/calculation.rb | 2 +- test/stripe/generated_examples_test.rb | 6 +++--- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ac0cc575d..1dbca34fc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1079 \ No newline at end of file +v1093 \ No newline at end of file diff --git a/lib/stripe/api_version.rb b/lib/stripe/api_version.rb index 4dd9b064e..9d726d565 100644 --- a/lib/stripe/api_version.rb +++ b/lib/stripe/api_version.rb @@ -3,6 +3,6 @@ module Stripe module ApiVersion - CURRENT = "2024-04-10" + CURRENT = "2024-06-20" end end diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index c5eeae69b..c21088e01 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -152,6 +152,26 @@ def expire(params = {}, opts = {}) ) end + # Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + def self.finalize_amount(authorization, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/test_helpers/issuing/authorizations/%s/finalize_amount", { authorization: CGI.escape(authorization) }), + params: params, + opts: opts + ) + end + + # Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + def finalize_amount(params = {}, opts = {}) + @resource.request_stripe_object( + method: :post, + path: format("/v1/test_helpers/issuing/authorizations/%s/finalize_amount", { authorization: CGI.escape(@resource["id"]) }), + params: params, + opts: opts + ) + end + # Increment a test-mode Authorization. def self.increment(authorization, params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index e4114250c..99cd00e65 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -14,7 +14,7 @@ def self.object_name "tax.calculation" end - # Calculates tax based on input and returns a Tax Calculation object. + # Calculates tax based on the input and returns a Tax Calculation object. def self.create(params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 50564f30c..f5b9d6b5b 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -1860,7 +1860,7 @@ class CodegennedExampleTest < Test::Unit::TestCase type: "diesel", unit: "liter", unit_cost_decimal: "3.5", - volume_decimal: "10", + quantity_decimal: "10", }, lodging: { check_in_at: 1_633_651_200, @@ -2000,7 +2000,7 @@ class CodegennedExampleTest < Test::Unit::TestCase type: "diesel", unit: "liter", unit_cost_decimal: "3.5", - volume_decimal: "10", + quantity_decimal: "10", }, lodging: { check_in_at: 1_533_651_200, @@ -2055,7 +2055,7 @@ class CodegennedExampleTest < Test::Unit::TestCase type: "diesel", unit: "liter", unit_cost_decimal: "3.5", - volume_decimal: "10", + quantity_decimal: "10", }, lodging: { check_in_at: 1_533_651_200, From 856693e948b9a2713800996798668f521ca5d0e2 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 24 Jun 2024 16:08:43 -0700 Subject: [PATCH 3/3] Bump version to 12.0.0 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ VERSION | 2 +- lib/stripe/version.rb | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 217b7caad..243a83cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,28 @@ # Changelog +## 12.0.0 - 2024-06-24 +* [#1418](https://github.com/stripe/stripe-ruby/pull/1418) Add missing static method for verify on BankAccount +* [#1419](https://github.com/stripe/stripe-ruby/pull/1419) + + This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading. + + ### ⚠️ Breaking changes + + * Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument. + ```ruby + params = { expand: ["available"] } + opts = { stripe_account: "acct_123" } + + # ❌ No longer works + Stripe::Balance.retrieve(opts) + + # ✅ Correct way to call retrieve method + Stripe::Balance.retrieve(params, opts) + ``` + + ### Additions + + * Add support for `finalize_amount` test helper method on resource `Issuing.Authorization` + ## 11.7.0 - 2024-06-13 * [#1415](https://github.com/stripe/stripe-ruby/pull/1415) Deprecate StripeClient#request * Add deprecation warning for `StripeClient#request`. This helper method will be removed in a future major version. To access response objects, use the `last_response` property on the returned resource instead. Refer to [Accessing a response object](https://github.com/stripe/stripe-ruby?tab=readme-ov-file#accessing-a-response-object) in the README for usage details. diff --git a/VERSION b/VERSION index 308bbae79..4044f9086 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.7.0 +12.0.0 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index dac728cdc..3ff748772 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "11.7.0" + VERSION = "12.0.0" end