Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lygg6699 committed Jun 25, 2024
2 parents 37e290d + 856693e commit 9a38d99
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1079
v1093
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.7.0
12.0.0
2 changes: 1 addition & 1 deletion lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

module Stripe
module ApiVersion
CURRENT = "2024-04-10"
CURRENT = "2024-06-20"
end
end
20 changes: 20 additions & 0 deletions lib/stripe/resources/issuing/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/%<authorization>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/%<authorization>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(
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/tax/calculation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Stripe
VERSION = "11.7.0"
VERSION = "12.0.0"
end
6 changes: 3 additions & 3 deletions test/stripe/generated_examples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9a38d99

Please sign in to comment.