stripe 8.6.0.pre.beta.4 → 8.6.0.pre.beta.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile +3 -0
- data/OPENAPI_VERSION +1 -1
- data/README.md +12 -1
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/resources/charge.rb +4 -5
- data/lib/stripe/resources/customer_session.rb +12 -0
- data/lib/stripe/resources/invoice.rb +1 -1
- data/lib/stripe/resources/login_link.rb +1 -0
- data/lib/stripe/resources/reversal.rb +2 -2
- data/lib/stripe/resources/token.rb +0 -2
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/stripe_client.rb +9 -8
- data/lib/stripe/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81d0ddbdb1d081579fb52860e1295326a1e3b9863e84ac8167146525320e7c59
|
4
|
+
data.tar.gz: 7145dd01065eae301d8ff96f547dee29893f7b7d5e922bd1ed1b6559f57e614e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be55e03a197319fcf3115c89e664119e8b1c271e163fc4ac91fe4088f9413cc0dbe9a411f7e4fc1c10b15d75cd9521889807236af044ed9b5c20b45a9272af6
|
7
|
+
data.tar.gz: 8951c0d63c7124b8c4b9c627e41bb1bc8b6fdc3e63d88d2fdc7faa917f0545a4b362c7886822ce6b817041a28d091e3b1ea5535bb92fa38cead45b6fe9753705
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 8.6.0-beta.6 - 2023-06-22
|
4
|
+
* [#1237](https://github.com/stripe/stripe-ruby/pull/1237) Update generated code for beta
|
5
|
+
* Add support for new resource `CustomerSession`
|
6
|
+
* Add support for `create` method on resource `CustomerSession`
|
7
|
+
* [#1233](https://github.com/stripe/stripe-ruby/pull/1233) Update generated code for beta
|
8
|
+
* [#1229](https://github.com/stripe/stripe-ruby/pull/1229) Update generated code for beta
|
9
|
+
|
10
|
+
## 8.6.0-beta.5 - 2023-06-01
|
11
|
+
* [#1227](https://github.com/stripe/stripe-ruby/pull/1227) Update generated code for beta
|
12
|
+
* [#1228](https://github.com/stripe/stripe-ruby/pull/1228) Document raw_request
|
13
|
+
* [#1222](https://github.com/stripe/stripe-ruby/pull/1222) Update generated code for beta
|
14
|
+
* [#1224](https://github.com/stripe/stripe-ruby/pull/1224) Handle developer message in preview error responses
|
15
|
+
|
3
16
|
## 8.6.0-beta.4 - 2023-05-19
|
4
17
|
* [#1220](https://github.com/stripe/stripe-ruby/pull/1220) Update generated code for beta
|
5
18
|
* Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
|
data/Gemfile
CHANGED
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v392
|
data/README.md
CHANGED
@@ -266,7 +266,7 @@ For example:
|
|
266
266
|
```ruby
|
267
267
|
Stripe::Instrumentation.subscribe(:request_end) do |request_event|
|
268
268
|
# Filter out high-cardinality ids from `path`
|
269
|
-
path_parts =
|
269
|
+
path_parts = request_event.path.split("/").drop(2)
|
270
270
|
resource = path_parts.map { |part| part.match?(/\A[a-z_]+\z/) ? part : ":id" }.join("/")
|
271
271
|
|
272
272
|
tags = {
|
@@ -323,6 +323,17 @@ If your beta feature requires a `Stripe-Version` header to be sent, use the `Str
|
|
323
323
|
Stripe.api_version += "; feature_beta=v3"
|
324
324
|
```
|
325
325
|
|
326
|
+
### Custom requests
|
327
|
+
|
328
|
+
If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `raw_request` method on `Stripe`.
|
329
|
+
|
330
|
+
```ruby
|
331
|
+
resp = Stripe.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
|
332
|
+
|
333
|
+
# (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.
|
334
|
+
deserialized_resp = Stripe.deserialize(resp.http_body)
|
335
|
+
```
|
336
|
+
|
326
337
|
## Support
|
327
338
|
|
328
339
|
New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
8.6.0-beta.
|
1
|
+
8.6.0-beta.6
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/object_types.rb
CHANGED
@@ -39,6 +39,7 @@ module Stripe
|
|
39
39
|
Customer::OBJECT_NAME => Customer,
|
40
40
|
CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
|
41
41
|
CustomerCashBalanceTransaction::OBJECT_NAME => CustomerCashBalanceTransaction,
|
42
|
+
CustomerSession::OBJECT_NAME => CustomerSession,
|
42
43
|
Discount::OBJECT_NAME => Discount,
|
43
44
|
Dispute::OBJECT_NAME => Dispute,
|
44
45
|
EphemeralKey::OBJECT_NAME => EphemeralKey,
|
@@ -2,11 +2,10 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges)
|
5
|
+
# The `Charge` object represents a single attempt to move money into your Stripe account.
|
6
|
+
# PaymentIntent confirmation is the most common way to create Charges, but transferring
|
7
|
+
# money to a different Stripe account through Connect also creates Charges.
|
8
|
+
# Some legacy payment flows create Charges directly, which is not recommended for new integrations.
|
10
9
|
class Charge < APIResource
|
11
10
|
extend Stripe::APIOperations::Create
|
12
11
|
extend Stripe::APIOperations::List
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
# A customer session allows you to grant client access to Stripe's frontend SDKs (like BillingJs)
|
6
|
+
# control over a customer.
|
7
|
+
class CustomerSession < APIResource
|
8
|
+
extend Stripe::APIOperations::Create
|
9
|
+
|
10
|
+
OBJECT_NAME = "customer_session"
|
11
|
+
end
|
12
|
+
end
|
@@ -11,7 +11,7 @@ module Stripe
|
|
11
11
|
# If your invoice is configured to be billed through automatic charges,
|
12
12
|
# Stripe automatically finalizes your invoice and attempts payment. Note
|
13
13
|
# that finalizing the invoice,
|
14
|
-
# [when automatic](https://stripe.com/docs/
|
14
|
+
# [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
|
15
15
|
# not happen immediately as the invoice is created. Stripe waits
|
16
16
|
# until one hour after the last webhook was successfully sent (or the last
|
17
17
|
# webhook timed out after failing). If you (and the platforms you may have
|
@@ -10,11 +10,11 @@ module Stripe
|
|
10
10
|
# Reversing a transfer that was made for a [destination
|
11
11
|
# charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of
|
12
12
|
# the charge. It is possible to reverse a
|
13
|
-
# [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)
|
13
|
+
# [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options)
|
14
14
|
# transfer only if the destination account has enough balance to cover the
|
15
15
|
# reversal.
|
16
16
|
#
|
17
|
-
# Related guide: [Reversing transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers)
|
17
|
+
# Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers)
|
18
18
|
class Reversal < APIResource
|
19
19
|
extend Stripe::APIOperations::List
|
20
20
|
include Stripe::APIOperations::Save
|
@@ -22,8 +22,6 @@ module Stripe
|
|
22
22
|
# objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
|
23
23
|
# [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
|
24
24
|
# performs best with integrations that use client-side tokenization.
|
25
|
-
#
|
26
|
-
# Related guide: [Accept a payment with Charges and Tokens](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
|
27
25
|
class Token < APIResource
|
28
26
|
extend Stripe::APIOperations::Create
|
29
27
|
|
@@ -11,7 +11,7 @@ module Stripe
|
|
11
11
|
# information, read about the
|
12
12
|
# [transfer/payout split](https://stripe.com/docs/transfer-payout-split).
|
13
13
|
#
|
14
|
-
# Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/charges-transfers)
|
14
|
+
# Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers)
|
15
15
|
class Transfer < APIResource
|
16
16
|
extend Stripe::APIOperations::Create
|
17
17
|
extend Stripe::APIOperations::List
|
data/lib/stripe/resources.rb
CHANGED
@@ -28,6 +28,7 @@ require "stripe/resources/credit_note_line_item"
|
|
28
28
|
require "stripe/resources/customer"
|
29
29
|
require "stripe/resources/customer_balance_transaction"
|
30
30
|
require "stripe/resources/customer_cash_balance_transaction"
|
31
|
+
require "stripe/resources/customer_session"
|
31
32
|
require "stripe/resources/discount"
|
32
33
|
require "stripe/resources/dispute"
|
33
34
|
require "stripe/resources/ephemeral_key"
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -768,10 +768,11 @@ module Stripe
|
|
768
768
|
end
|
769
769
|
|
770
770
|
private def specific_api_error(resp, error_data, context)
|
771
|
+
message = error_data[:message] || error_data[:developer_message]
|
771
772
|
Util.log_error("Stripe API error",
|
772
773
|
status: resp.http_status,
|
773
774
|
error_code: error_data[:code],
|
774
|
-
error_message:
|
775
|
+
error_message: message,
|
775
776
|
error_param: error_data[:param],
|
776
777
|
error_type: error_data[:type],
|
777
778
|
idempotency_key: context.idempotency_key,
|
@@ -792,26 +793,26 @@ module Stripe
|
|
792
793
|
when 400, 404
|
793
794
|
case error_data[:type]
|
794
795
|
when "idempotency_error"
|
795
|
-
IdempotencyError.new(
|
796
|
+
IdempotencyError.new(message, **opts)
|
796
797
|
else
|
797
798
|
InvalidRequestError.new(
|
798
|
-
|
799
|
+
message, error_data[:param],
|
799
800
|
**opts
|
800
801
|
)
|
801
802
|
end
|
802
803
|
when 401
|
803
|
-
AuthenticationError.new(
|
804
|
+
AuthenticationError.new(message, **opts)
|
804
805
|
when 402
|
805
806
|
CardError.new(
|
806
|
-
|
807
|
+
message, error_data[:param],
|
807
808
|
**opts
|
808
809
|
)
|
809
810
|
when 403
|
810
|
-
PermissionError.new(
|
811
|
+
PermissionError.new(message, **opts)
|
811
812
|
when 429
|
812
|
-
RateLimitError.new(
|
813
|
+
RateLimitError.new(message, **opts)
|
813
814
|
else
|
814
|
-
APIError.new(
|
815
|
+
APIError.new(message, **opts)
|
815
816
|
end
|
816
817
|
end
|
817
818
|
|
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: 8.6.0.pre.beta.
|
4
|
+
version: 8.6.0.pre.beta.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-22 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.
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- lib/stripe/resources/customer.rb
|
81
81
|
- lib/stripe/resources/customer_balance_transaction.rb
|
82
82
|
- lib/stripe/resources/customer_cash_balance_transaction.rb
|
83
|
+
- lib/stripe/resources/customer_session.rb
|
83
84
|
- lib/stripe/resources/discount.rb
|
84
85
|
- lib/stripe/resources/dispute.rb
|
85
86
|
- lib/stripe/resources/ephemeral_key.rb
|