stripe 11.7.0 → 12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/resources/bank_account.rb +16 -4
- data/lib/stripe/resources/climate/order.rb +2 -2
- data/lib/stripe/resources/issuing/authorization.rb +20 -0
- data/lib/stripe/resources/setup_intent.rb +2 -2
- data/lib/stripe/resources/tax/calculation.rb +3 -3
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/stripe_client.rb +1 -1
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 446974a2656e8116ce09817c52f60f15016378f1e755c05b23b32dd87ab95674
|
4
|
+
data.tar.gz: fcbf3d1a8dcbfafdd94535193b3ebf75dc3e25b39b06cd4f7acdbac9e6e8b49b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e1605800ffbad689caa7bce3a02e17cfdb0d22602f488308d3e75fb9ff663613e8d82259a96abc0e6c9f7808344d7ae70259360f985f2d6a552cd10922a6aca
|
7
|
+
data.tar.gz: 197e67cb767c40385844d05320f0543343ed16e3714b412a17cff5cb2d14cbb5ee71f5e32efc0d3d760c2f4343c42e24c4c09c290b71ce6ba58d6d6799e39a7c
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,28 @@
|
|
1
1
|
# Changelog
|
2
|
+
## 12.0.0 - 2024-06-24
|
3
|
+
* [#1418](https://github.com/stripe/stripe-ruby/pull/1418) Add missing static method for verify on BankAccount
|
4
|
+
* [#1419](https://github.com/stripe/stripe-ruby/pull/1419)
|
5
|
+
|
6
|
+
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.
|
7
|
+
|
8
|
+
### ⚠️ Breaking changes
|
9
|
+
|
10
|
+
* 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.
|
11
|
+
```ruby
|
12
|
+
params = { expand: ["available"] }
|
13
|
+
opts = { stripe_account: "acct_123" }
|
14
|
+
|
15
|
+
# ❌ No longer works
|
16
|
+
Stripe::Balance.retrieve(opts)
|
17
|
+
|
18
|
+
# ✅ Correct way to call retrieve method
|
19
|
+
Stripe::Balance.retrieve(params, opts)
|
20
|
+
```
|
21
|
+
|
22
|
+
### Additions
|
23
|
+
|
24
|
+
* Add support for `finalize_amount` test helper method on resource `Issuing.Authorization`
|
25
|
+
|
2
26
|
## 11.7.0 - 2024-06-13
|
3
27
|
* [#1415](https://github.com/stripe/stripe-ruby/pull/1415) Deprecate StripeClient#request
|
4
28
|
* 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.
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v1093
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
12.0.0
|
data/lib/stripe/api_version.rb
CHANGED
@@ -5,8 +5,7 @@ module Stripe
|
|
5
5
|
# These bank accounts are payment methods on `Customer` objects.
|
6
6
|
#
|
7
7
|
# On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
|
8
|
-
# destinations on `Account` objects for accounts
|
9
|
-
# is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts).
|
8
|
+
# destinations on `Account` objects for connected accounts.
|
10
9
|
# They can be bank accounts or debit cards as well, and are documented in the links above.
|
11
10
|
#
|
12
11
|
# Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
|
@@ -21,8 +20,21 @@ module Stripe
|
|
21
20
|
end
|
22
21
|
|
23
22
|
def verify(params = {}, opts = {})
|
24
|
-
|
25
|
-
|
23
|
+
request_stripe_object(
|
24
|
+
method: :post,
|
25
|
+
path: "#{Customer.resource_url}/#{customer}/sources/#{id}/verify",
|
26
|
+
params: params,
|
27
|
+
opts: opts
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.verify(customer, id, params = {}, opts = {})
|
32
|
+
request_stripe_object(
|
33
|
+
method: :post,
|
34
|
+
path: "#{Customer.resource_url}/#{customer}/sources/#{id}/verify",
|
35
|
+
params: params,
|
36
|
+
opts: opts
|
37
|
+
)
|
26
38
|
end
|
27
39
|
|
28
40
|
def resource_url
|
@@ -15,7 +15,7 @@ module Stripe
|
|
15
15
|
"climate.order"
|
16
16
|
end
|
17
17
|
|
18
|
-
# Cancels a Climate order. You can cancel an order within
|
18
|
+
# Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
|
19
19
|
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
20
20
|
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
|
21
21
|
# provides 90 days advance notice and refunds the amount_total.
|
@@ -28,7 +28,7 @@ module Stripe
|
|
28
28
|
)
|
29
29
|
end
|
30
30
|
|
31
|
-
# Cancels a Climate order. You can cancel an order within
|
31
|
+
# Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
|
32
32
|
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
33
33
|
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
|
34
34
|
# provides 90 days advance notice and refunds the amount_total.
|
@@ -152,6 +152,26 @@ module Stripe
|
|
152
152
|
)
|
153
153
|
end
|
154
154
|
|
155
|
+
# Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
|
156
|
+
def self.finalize_amount(authorization, params = {}, opts = {})
|
157
|
+
request_stripe_object(
|
158
|
+
method: :post,
|
159
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape(authorization) }),
|
160
|
+
params: params,
|
161
|
+
opts: opts
|
162
|
+
)
|
163
|
+
end
|
164
|
+
|
165
|
+
# Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
|
166
|
+
def finalize_amount(params = {}, opts = {})
|
167
|
+
@resource.request_stripe_object(
|
168
|
+
method: :post,
|
169
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape(@resource["id"]) }),
|
170
|
+
params: params,
|
171
|
+
opts: opts
|
172
|
+
)
|
173
|
+
end
|
174
|
+
|
155
175
|
# Increment a test-mode Authorization.
|
156
176
|
def self.increment(authorization, params = {}, opts = {})
|
157
177
|
request_stripe_object(
|
@@ -35,7 +35,7 @@ module Stripe
|
|
35
35
|
|
36
36
|
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
37
37
|
#
|
38
|
-
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
|
38
|
+
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
|
39
39
|
def cancel(params = {}, opts = {})
|
40
40
|
request_stripe_object(
|
41
41
|
method: :post,
|
@@ -47,7 +47,7 @@ module Stripe
|
|
47
47
|
|
48
48
|
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
49
49
|
#
|
50
|
-
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
|
50
|
+
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
|
51
51
|
def self.cancel(intent, params = {}, opts = {})
|
52
52
|
request_stripe_object(
|
53
53
|
method: :post,
|
@@ -14,7 +14,7 @@ module Stripe
|
|
14
14
|
"tax.calculation"
|
15
15
|
end
|
16
16
|
|
17
|
-
# Calculates tax based on input and returns a Tax Calculation object.
|
17
|
+
# Calculates tax based on the input and returns a Tax Calculation object.
|
18
18
|
def self.create(params = {}, opts = {})
|
19
19
|
request_stripe_object(
|
20
20
|
method: :post,
|
@@ -24,7 +24,7 @@ module Stripe
|
|
24
24
|
)
|
25
25
|
end
|
26
26
|
|
27
|
-
# Retrieves the line items of a
|
27
|
+
# Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
|
28
28
|
def list_line_items(params = {}, opts = {})
|
29
29
|
request_stripe_object(
|
30
30
|
method: :get,
|
@@ -34,7 +34,7 @@ module Stripe
|
|
34
34
|
)
|
35
35
|
end
|
36
36
|
|
37
|
-
# Retrieves the line items of a
|
37
|
+
# Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
|
38
38
|
def self.list_line_items(calculation, params = {}, opts = {})
|
39
39
|
request_stripe_object(
|
40
40
|
method: :get,
|
@@ -12,7 +12,7 @@ module Stripe
|
|
12
12
|
"tax.transaction"
|
13
13
|
end
|
14
14
|
|
15
|
-
# Creates a Tax Transaction from a calculation.
|
15
|
+
# Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
|
16
16
|
def self.create_from_calculation(params = {}, opts = {})
|
17
17
|
request_stripe_object(
|
18
18
|
method: :post,
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -366,7 +366,7 @@ module Stripe
|
|
366
366
|
# garbage in `Thread.current`.
|
367
367
|
attr_accessor :last_responses
|
368
368
|
|
369
|
-
# A map of connection
|
369
|
+
# A map of connection managers for the thread. Normally shared between
|
370
370
|
# all `StripeClient` objects on a particular thread, and created so as to
|
371
371
|
# minimize the number of open connections that an application needs.
|
372
372
|
def default_connection_managers
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
14
14
|
for details.
|