stripe 8.6.0.pre.beta.3 → 8.6.0.pre.beta.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +3 -0
- data/OPENAPI_VERSION +1 -1
- data/README.md +11 -0
- data/VERSION +1 -1
- data/lib/stripe/api_operations/request.rb +2 -0
- data/lib/stripe/api_version.rb +1 -0
- data/lib/stripe/resources/account_link.rb +1 -1
- data/lib/stripe/resources/account_session.rb +1 -1
- data/lib/stripe/resources/application_fee_refund.rb +1 -1
- data/lib/stripe/resources/apps/secret.rb +1 -1
- data/lib/stripe/resources/balance.rb +1 -1
- data/lib/stripe/resources/balance_transaction.rb +1 -1
- data/lib/stripe/resources/bank_account.rb +1 -1
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/card.rb +1 -1
- data/lib/stripe/resources/charge.rb +4 -5
- data/lib/stripe/resources/checkout/session.rb +1 -1
- data/lib/stripe/resources/credit_note.rb +1 -1
- data/lib/stripe/resources/customer.rb +1 -1
- data/lib/stripe/resources/customer_balance_transaction.rb +2 -2
- data/lib/stripe/resources/discount.rb +1 -1
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/financial_connections/account.rb +36 -0
- data/lib/stripe/resources/funding_instructions.rb +1 -1
- data/lib/stripe/resources/invoice.rb +1 -1
- data/lib/stripe/resources/issuing/authorization.rb +1 -1
- data/lib/stripe/resources/issuing/cardholder.rb +1 -1
- data/lib/stripe/resources/issuing/dispute.rb +1 -1
- data/lib/stripe/resources/issuing/transaction.rb +1 -1
- data/lib/stripe/resources/payment_intent.rb +1 -1
- data/lib/stripe/resources/payout.rb +1 -1
- data/lib/stripe/resources/person.rb +1 -1
- data/lib/stripe/resources/radar/early_fraud_warning.rb +1 -1
- data/lib/stripe/resources/radar/value_list.rb +1 -1
- data/lib/stripe/resources/radar/value_list_item.rb +1 -1
- data/lib/stripe/resources/refund.rb +1 -1
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +1 -1
- data/lib/stripe/resources/subscription.rb +1 -1
- data/lib/stripe/resources/subscription_schedule.rb +1 -1
- data/lib/stripe/resources/tax/calculation.rb +1 -1
- data/lib/stripe/resources/tax/registration.rb +3 -1
- data/lib/stripe/resources/tax/settings.rb +1 -1
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +1 -1
- data/lib/stripe/resources/tax_rate.rb +1 -1
- data/lib/stripe/resources/terminal/connection_token.rb +1 -1
- data/lib/stripe/resources/terminal/location.rb +1 -1
- data/lib/stripe/resources/terminal/reader.rb +1 -1
- data/lib/stripe/resources/token.rb +0 -2
- data/lib/stripe/resources/topup.rb +1 -1
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/usage_record.rb +1 -1
- data/lib/stripe/resources/webhook_endpoint.rb +1 -1
- data/lib/stripe/stripe_client.rb +44 -23
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +43 -0
- 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: 9bbe5f8429142f8ca731c92b88cdb7ce4c13ac0dc47f736b479c4e12ea73ce53
|
4
|
+
data.tar.gz: 3fecbead2127d4a54204e04107edf6b9131cce54c94bbc7c550318127354cc03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f386d2f8fbce74b1ea1e898ae28a983689af6ddd87a9ac98b4f60b98866780192d35a89abf80cfbb01630b0dd6ba378486c59b97ab6cb3b9065c347702917260
|
7
|
+
data.tar.gz: 0cf9d291677ec2fd7186c47c408de3436cca0c3dcd9396d4b388cbdb5cc0b4f9ec6fb992fd99b35cf159f70a5f79de94f1a01cc1f065bca79de9212edf7abf3a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 8.6.0-beta.5 - 2023-06-01
|
4
|
+
* [#1227](https://github.com/stripe/stripe-ruby/pull/1227) Update generated code for beta
|
5
|
+
* [#1228](https://github.com/stripe/stripe-ruby/pull/1228) Document raw_request
|
6
|
+
* [#1222](https://github.com/stripe/stripe-ruby/pull/1222) Update generated code for beta
|
7
|
+
* [#1224](https://github.com/stripe/stripe-ruby/pull/1224) Handle developer message in preview error responses
|
8
|
+
|
9
|
+
## 8.6.0-beta.4 - 2023-05-19
|
10
|
+
* [#1220](https://github.com/stripe/stripe-ruby/pull/1220) Update generated code for beta
|
11
|
+
* Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
|
12
|
+
* [#1217](https://github.com/stripe/stripe-ruby/pull/1217) Add raw_request
|
13
|
+
* [#1216](https://github.com/stripe/stripe-ruby/pull/1216) Update generated code for beta
|
14
|
+
* [#1214](https://github.com/stripe/stripe-ruby/pull/1214) Update generated code for beta
|
15
|
+
|
16
|
+
|
3
17
|
## 8.6.0-beta.3 - 2023-04-17
|
4
18
|
* [#1211](https://github.com/stripe/stripe-ruby/pull/1211) Update generated code for beta
|
5
19
|
* [#1210](https://github.com/stripe/stripe-ruby/pull/1210), [#1212](https://github.com/stripe/stripe-ruby/pull/1212), [#1213](https://github.com/stripe/stripe-ruby/pull/1213) Add support for request signing
|
data/Gemfile
CHANGED
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v361
|
data/README.md
CHANGED
@@ -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.5
|
@@ -47,6 +47,7 @@ module Stripe
|
|
47
47
|
api_key = headers.delete(:api_key)
|
48
48
|
api_base = headers.delete(:api_base)
|
49
49
|
client = headers.delete(:client)
|
50
|
+
api_mode = headers.delete(:api_mode)
|
50
51
|
# Assume all remaining opts must be headers
|
51
52
|
|
52
53
|
resp, opts[:api_key] = client.send(
|
@@ -54,6 +55,7 @@ module Stripe
|
|
54
55
|
method, url,
|
55
56
|
api_base: api_base, api_key: api_key,
|
56
57
|
headers: headers, params: params,
|
58
|
+
api_mode: api_mode,
|
57
59
|
&read_body_chunk_block
|
58
60
|
)
|
59
61
|
|
data/lib/stripe/api_version.rb
CHANGED
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
# Account Links are the means by which a Connect platform grants a connected account permission to access
|
6
6
|
# Stripe-hosted applications, such as Connect Onboarding.
|
7
7
|
#
|
8
|
-
# Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding)
|
8
|
+
# Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding)
|
9
9
|
class AccountLink < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
|
@@ -8,7 +8,7 @@ module Stripe
|
|
8
8
|
# to your user. Do not save AccountSessions to your database as they expire relatively
|
9
9
|
# quickly, and cannot be used more than once.
|
10
10
|
#
|
11
|
-
# Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
|
11
|
+
# Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
|
12
12
|
class AccountSession < APIResource
|
13
13
|
extend Stripe::APIOperations::Create
|
14
14
|
|
@@ -6,7 +6,7 @@ module Stripe
|
|
6
6
|
# has previously been created but not yet refunded. Funds will be refunded to
|
7
7
|
# the Stripe account from which the fee was originally collected.
|
8
8
|
#
|
9
|
-
# Related guide: [Refunding
|
9
|
+
# Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee)
|
10
10
|
class ApplicationFeeRefund < APIResource
|
11
11
|
extend Stripe::APIOperations::List
|
12
12
|
include Stripe::APIOperations::Save
|
@@ -11,7 +11,7 @@ module Stripe
|
|
11
11
|
#
|
12
12
|
# A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
|
13
13
|
#
|
14
|
-
# Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
|
14
|
+
# Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
|
15
15
|
class Secret < APIResource
|
16
16
|
extend Stripe::APIOperations::Create
|
17
17
|
extend Stripe::APIOperations::List
|
@@ -12,7 +12,7 @@ module Stripe
|
|
12
12
|
# The available and pending amounts for each currency are broken down further by
|
13
13
|
# payment source types.
|
14
14
|
#
|
15
|
-
# Related guide: [Understanding Connect
|
15
|
+
# Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
|
16
16
|
class Balance < SingletonAPIResource
|
17
17
|
OBJECT_NAME = "balance"
|
18
18
|
end
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
# Balance transactions represent funds moving through your Stripe account.
|
6
6
|
# They're created for every type of transaction that comes into or flows out of your Stripe account balance.
|
7
7
|
#
|
8
|
-
# Related guide: [Balance
|
8
|
+
# Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
|
9
9
|
class BalanceTransaction < APIResource
|
10
10
|
extend Stripe::APIOperations::List
|
11
11
|
|
@@ -8,7 +8,7 @@ module Stripe
|
|
8
8
|
# destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
|
9
9
|
# They can be bank accounts or debit cards as well, and are documented in the links above.
|
10
10
|
#
|
11
|
-
# Related guide: [Bank
|
11
|
+
# Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers)
|
12
12
|
class BankAccount < APIResource
|
13
13
|
include Stripe::APIOperations::Delete
|
14
14
|
extend Stripe::APIOperations::List
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
# This is an object representing a capability for a Stripe account.
|
6
6
|
#
|
7
|
-
# Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)
|
7
|
+
# Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)
|
8
8
|
class Capability < APIResource
|
9
9
|
extend Stripe::APIOperations::List
|
10
10
|
include Stripe::APIOperations::Save
|
@@ -6,7 +6,7 @@ module Stripe
|
|
6
6
|
# later. You can also store multiple debit cards on a recipient in order to
|
7
7
|
# transfer to those cards later.
|
8
8
|
#
|
9
|
-
# Related guide: [Card
|
9
|
+
# Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
|
10
10
|
class Card < APIResource
|
11
11
|
include Stripe::APIOperations::Delete
|
12
12
|
extend Stripe::APIOperations::List
|
@@ -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
|
@@ -16,7 +16,7 @@ module Stripe
|
|
16
16
|
# You can create a Checkout Session on your server and redirect to its URL
|
17
17
|
# to begin Checkout.
|
18
18
|
#
|
19
|
-
# Related guide: [Checkout
|
19
|
+
# Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)
|
20
20
|
class Session < APIResource
|
21
21
|
extend Stripe::APIOperations::Create
|
22
22
|
extend Stripe::APIOperations::List
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
# Issue a credit note to adjust an invoice's amount after the invoice is finalized.
|
6
6
|
#
|
7
|
-
# Related guide: [Credit
|
7
|
+
# Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes)
|
8
8
|
class CreditNote < APIResource
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
extend Stripe::APIOperations::List
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
# This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.
|
6
6
|
#
|
7
|
-
# Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)
|
7
|
+
# Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)
|
8
8
|
class Customer < APIResource
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
include Stripe::APIOperations::Delete
|
@@ -2,12 +2,12 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
# Each customer has a [
|
5
|
+
# Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value,
|
6
6
|
# which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
|
7
7
|
# You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),
|
8
8
|
# or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.
|
9
9
|
#
|
10
|
-
# Related guide: [Customer
|
10
|
+
# Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance)
|
11
11
|
class CustomerBalanceTransaction < APIResource
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
include Stripe::APIOperations::Save
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
|
6
6
|
# It contains information about when the discount began, when it will end, and what it is applied to.
|
7
7
|
#
|
8
|
-
# Related guide: [Applying
|
8
|
+
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
9
9
|
class Discount < StripeObject
|
10
10
|
OBJECT_NAME = "discount"
|
11
11
|
end
|
@@ -8,7 +8,7 @@ module Stripe
|
|
8
8
|
# information about the dispute process in our [Disputes and
|
9
9
|
# Fraud](https://stripe.com/docs/disputes) documentation.
|
10
10
|
#
|
11
|
-
# Related guide: [Disputes and
|
11
|
+
# Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
|
12
12
|
class Dispute < APIResource
|
13
13
|
extend Stripe::APIOperations::List
|
14
14
|
include Stripe::APIOperations::Save
|
@@ -8,7 +8,7 @@ module Stripe
|
|
8
8
|
# been created by Stripe (for example, the results of a [Sigma scheduled
|
9
9
|
# query](https://stripe.com/docs/api#scheduled_queries)).
|
10
10
|
#
|
11
|
-
# Related guide: [File
|
11
|
+
# Related guide: [File upload guide](https://stripe.com/docs/file-upload)
|
12
12
|
class File < APIResource
|
13
13
|
extend Stripe::APIOperations::Create
|
14
14
|
extend Stripe::APIOperations::List
|
@@ -39,6 +39,24 @@ module Stripe
|
|
39
39
|
)
|
40
40
|
end
|
41
41
|
|
42
|
+
def subscribe(params = {}, opts = {})
|
43
|
+
request_stripe_object(
|
44
|
+
method: :post,
|
45
|
+
path: format("/v1/financial_connections/accounts/%<account>s/subscribe", { account: CGI.escape(self["id"]) }),
|
46
|
+
params: params,
|
47
|
+
opts: opts
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
def unsubscribe(params = {}, opts = {})
|
52
|
+
request_stripe_object(
|
53
|
+
method: :post,
|
54
|
+
path: format("/v1/financial_connections/accounts/%<account>s/unsubscribe", { account: CGI.escape(self["id"]) }),
|
55
|
+
params: params,
|
56
|
+
opts: opts
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
42
60
|
def self.disconnect(account, params = {}, opts = {})
|
43
61
|
request_stripe_object(
|
44
62
|
method: :post,
|
@@ -65,6 +83,24 @@ module Stripe
|
|
65
83
|
opts: opts
|
66
84
|
)
|
67
85
|
end
|
86
|
+
|
87
|
+
def self.subscribe(account, params = {}, opts = {})
|
88
|
+
request_stripe_object(
|
89
|
+
method: :post,
|
90
|
+
path: format("/v1/financial_connections/accounts/%<account>s/subscribe", { account: CGI.escape(account) }),
|
91
|
+
params: params,
|
92
|
+
opts: opts
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.unsubscribe(account, params = {}, opts = {})
|
97
|
+
request_stripe_object(
|
98
|
+
method: :post,
|
99
|
+
path: format("/v1/financial_connections/accounts/%<account>s/unsubscribe", { account: CGI.escape(account) }),
|
100
|
+
params: params,
|
101
|
+
opts: opts
|
102
|
+
)
|
103
|
+
end
|
68
104
|
end
|
69
105
|
end
|
70
106
|
end
|
@@ -6,7 +6,7 @@ module Stripe
|
|
6
6
|
# automatically applied to future invoices and payments using the `customer_balance` payment method.
|
7
7
|
# Customers can fund this balance by initiating a bank transfer to any account in the
|
8
8
|
# `financial_addresses` field.
|
9
|
-
# Related guide: [Customer
|
9
|
+
# Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)
|
10
10
|
class FundingInstructions < APIResource
|
11
11
|
OBJECT_NAME = "funding_instructions"
|
12
12
|
|
@@ -33,7 +33,7 @@ module Stripe
|
|
33
33
|
# More details on the customer's credit balance are
|
34
34
|
# [here](https://stripe.com/docs/billing/customer/balance).
|
35
35
|
#
|
36
|
-
# Related guide: [Send
|
36
|
+
# Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
|
37
37
|
class Invoice < APIResource
|
38
38
|
extend Stripe::APIOperations::Create
|
39
39
|
include Stripe::APIOperations::Delete
|
@@ -7,7 +7,7 @@ module Stripe
|
|
7
7
|
# object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
|
8
8
|
# purchase to be completed successfully.
|
9
9
|
#
|
10
|
-
# Related guide: [Issued
|
10
|
+
# Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
|
11
11
|
class Authorization < APIResource
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
include Stripe::APIOperations::Save
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Issuing
|
6
6
|
# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
|
7
7
|
#
|
8
|
-
# Related guide: [How to create a
|
8
|
+
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
|
9
9
|
class Cardholder < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
extend Stripe::APIOperations::List
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Issuing
|
6
6
|
# As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
|
7
7
|
#
|
8
|
-
# Related guide: [
|
8
|
+
# Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)
|
9
9
|
class Dispute < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
extend Stripe::APIOperations::List
|
@@ -7,7 +7,7 @@ module Stripe
|
|
7
7
|
# your Stripe account, such as a completed purchase or refund, is represented by an Issuing
|
8
8
|
# `Transaction` object.
|
9
9
|
#
|
10
|
-
# Related guide: [Issued
|
10
|
+
# Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions)
|
11
11
|
class Transaction < APIResource
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
include Stripe::APIOperations::Save
|
@@ -12,7 +12,7 @@ module Stripe
|
|
12
12
|
# throughout its lifetime as it interfaces with Stripe.js to perform
|
13
13
|
# authentication flows and ultimately creates at most one successful charge.
|
14
14
|
#
|
15
|
-
# Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
|
15
|
+
# Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
|
16
16
|
class PaymentIntent < APIResource
|
17
17
|
extend Stripe::APIOperations::Create
|
18
18
|
extend Stripe::APIOperations::List
|
@@ -9,7 +9,7 @@ module Stripe
|
|
9
9
|
# schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
|
10
10
|
# industry.
|
11
11
|
#
|
12
|
-
# Related guide: [Receiving
|
12
|
+
# Related guide: [Receiving payouts](https://stripe.com/docs/payouts)
|
13
13
|
class Payout < APIResource
|
14
14
|
extend Stripe::APIOperations::Create
|
15
15
|
extend Stripe::APIOperations::List
|
@@ -7,7 +7,7 @@ module Stripe
|
|
7
7
|
# A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
|
8
8
|
# See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
|
9
9
|
#
|
10
|
-
# Related guide: [Handling
|
10
|
+
# Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information)
|
11
11
|
class Person < APIResource
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
include Stripe::APIOperations::Save
|
@@ -6,7 +6,7 @@ module Stripe
|
|
6
6
|
# An early fraud warning indicates that the card issuer has notified us that a
|
7
7
|
# charge may be fraudulent.
|
8
8
|
#
|
9
|
-
# Related guide: [Early
|
9
|
+
# Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)
|
10
10
|
class EarlyFraudWarning < APIResource
|
11
11
|
extend Stripe::APIOperations::List
|
12
12
|
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Radar
|
6
6
|
# Value lists allow you to group values together which can then be referenced in rules.
|
7
7
|
#
|
8
|
-
# Related guide: [Default Stripe
|
8
|
+
# Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items)
|
9
9
|
class ValueList < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
include Stripe::APIOperations::Delete
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Radar
|
6
6
|
# Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
|
7
7
|
#
|
8
|
-
# Related guide: [Managing
|
8
|
+
# Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)
|
9
9
|
class ValueListItem < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
include Stripe::APIOperations::Delete
|
@@ -6,7 +6,7 @@ module Stripe
|
|
6
6
|
# but not yet refunded. Funds will be refunded to the credit or debit card that
|
7
7
|
# was originally charged.
|
8
8
|
#
|
9
|
-
# Related guide: [Refunds](https://stripe.com/docs/refunds)
|
9
|
+
# Related guide: [Refunds](https://stripe.com/docs/refunds)
|
10
10
|
class Refund < APIResource
|
11
11
|
extend Stripe::APIOperations::Create
|
12
12
|
extend Stripe::APIOperations::List
|
@@ -14,7 +14,7 @@ module Stripe
|
|
14
14
|
# transfer only if the destination account has enough balance to cover the
|
15
15
|
# reversal.
|
16
16
|
#
|
17
|
-
# Related guide: [Reversing
|
17
|
+
# Related guide: [Reversing transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers)
|
18
18
|
class Reversal < APIResource
|
19
19
|
extend Stripe::APIOperations::List
|
20
20
|
include Stripe::APIOperations::Save
|
@@ -23,7 +23,7 @@ module Stripe
|
|
23
23
|
# By using SetupIntents, you ensure that your customers experience the minimum set of required friction,
|
24
24
|
# even as regulations change over time.
|
25
25
|
#
|
26
|
-
# Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents)
|
26
|
+
# Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents)
|
27
27
|
class SetupIntent < APIResource
|
28
28
|
extend Stripe::APIOperations::Create
|
29
29
|
extend Stripe::APIOperations::List
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
# Subscriptions allow you to charge a customer on a recurring basis.
|
6
6
|
#
|
7
|
-
# Related guide: [Creating
|
7
|
+
# Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
|
8
8
|
class Subscription < APIResource
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
extend Stripe::APIOperations::List
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
# A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
|
6
6
|
#
|
7
|
-
# Related guide: [Subscription
|
7
|
+
# Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
|
8
8
|
class SubscriptionSchedule < APIResource
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
extend Stripe::APIOperations::List
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Tax
|
6
6
|
# A Tax Calculation allows you to calculate the tax to collect from your customer.
|
7
7
|
#
|
8
|
-
# Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)
|
8
|
+
# Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)
|
9
9
|
class Calculation < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
|
@@ -5,7 +5,9 @@ module Stripe
|
|
5
5
|
module Tax
|
6
6
|
# A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax).
|
7
7
|
#
|
8
|
-
# Stripe
|
8
|
+
# Stripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering).
|
9
|
+
#
|
10
|
+
# Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api)
|
9
11
|
class Registration < APIResource
|
10
12
|
extend Stripe::APIOperations::Create
|
11
13
|
extend Stripe::APIOperations::List
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Tax
|
6
6
|
# You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.
|
7
7
|
#
|
8
|
-
# Related guide: [
|
8
|
+
# Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
|
9
9
|
class Settings < SingletonAPIResource
|
10
10
|
include Stripe::APIOperations::Save
|
11
11
|
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Tax
|
6
6
|
# A Tax Transaction records the tax collected from or refunded to your customer.
|
7
7
|
#
|
8
|
-
# Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)
|
8
|
+
# Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)
|
9
9
|
class Transaction < APIResource
|
10
10
|
OBJECT_NAME = "tax.transaction"
|
11
11
|
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
# You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).
|
6
6
|
# A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
|
7
7
|
#
|
8
|
-
# Related guide: [Customer
|
8
|
+
# Related guide: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids)
|
9
9
|
class TaxId < APIResource
|
10
10
|
include Stripe::APIOperations::Delete
|
11
11
|
extend Stripe::APIOperations::List
|
@@ -4,7 +4,7 @@
|
|
4
4
|
module Stripe
|
5
5
|
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
6
6
|
#
|
7
|
-
# Related guide: [Tax
|
7
|
+
# Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
8
8
|
class TaxRate < APIResource
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
extend Stripe::APIOperations::List
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Terminal
|
6
6
|
# A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
|
7
7
|
#
|
8
|
-
# Related guide: [Fleet
|
8
|
+
# Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
|
9
9
|
class ConnectionToken < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Terminal
|
6
6
|
# A Location represents a grouping of readers.
|
7
7
|
#
|
8
|
-
# Related guide: [Fleet
|
8
|
+
# Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
|
9
9
|
class Location < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
include Stripe::APIOperations::Delete
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Terminal
|
6
6
|
# A Reader represents a physical device for accepting payment details.
|
7
7
|
#
|
8
|
-
# Related guide: [Connecting to a
|
8
|
+
# Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader)
|
9
9
|
class Reader < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
include Stripe::APIOperations::Delete
|
@@ -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](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
|
|
@@ -6,7 +6,7 @@ module Stripe
|
|
6
6
|
# individual top-ups, as well as list all top-ups. Top-ups are identified by a
|
7
7
|
# unique, random ID.
|
8
8
|
#
|
9
|
-
# Related guide: [Topping
|
9
|
+
# Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups)
|
10
10
|
class Topup < APIResource
|
11
11
|
extend Stripe::APIOperations::Create
|
12
12
|
extend Stripe::APIOperations::List
|
@@ -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
|
14
|
+
# Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/charges-transfers)
|
15
15
|
class Transfer < APIResource
|
16
16
|
extend Stripe::APIOperations::Create
|
17
17
|
extend Stripe::APIOperations::List
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
# Usage records allow you to report customer usage and metrics to Stripe for
|
6
6
|
# metered billing of subscription prices.
|
7
7
|
#
|
8
|
-
# Related guide: [Metered
|
8
|
+
# Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing)
|
9
9
|
class UsageRecord < APIResource
|
10
10
|
OBJECT_NAME = "usage_record"
|
11
11
|
end
|
@@ -8,7 +8,7 @@ module Stripe
|
|
8
8
|
#
|
9
9
|
# Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.
|
10
10
|
#
|
11
|
-
# Related guide: [Setting up
|
11
|
+
# Related guide: [Setting up webhooks](https://stripe.com/docs/webhooks/configure)
|
12
12
|
class WebhookEndpoint < APIResource
|
13
13
|
extend Stripe::APIOperations::Create
|
14
14
|
include Stripe::APIOperations::Delete
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -212,9 +212,10 @@ module Stripe
|
|
212
212
|
end
|
213
213
|
|
214
214
|
def execute_request(method, path,
|
215
|
-
api_base: nil, api_key: nil,
|
215
|
+
api_base: nil, api_key: nil,
|
216
|
+
headers: {}, params: {}, api_mode: nil)
|
216
217
|
http_resp, api_key = execute_request_internal(
|
217
|
-
method, path, api_base, api_key, headers, params
|
218
|
+
method, path, api_base, api_key, headers, params, api_mode
|
218
219
|
)
|
219
220
|
|
220
221
|
begin
|
@@ -245,6 +246,7 @@ module Stripe
|
|
245
246
|
def execute_request_stream(method, path,
|
246
247
|
api_base: nil, api_key: nil,
|
247
248
|
headers: {}, params: {},
|
249
|
+
api_mode: nil,
|
248
250
|
&read_body_chunk_block)
|
249
251
|
unless block_given?
|
250
252
|
raise ArgumentError,
|
@@ -252,7 +254,8 @@ module Stripe
|
|
252
254
|
end
|
253
255
|
|
254
256
|
http_resp, api_key = execute_request_internal(
|
255
|
-
method, path, api_base, api_key,
|
257
|
+
method, path, api_base, api_key,
|
258
|
+
headers, params, api_mode, &read_body_chunk_block
|
256
259
|
)
|
257
260
|
|
258
261
|
# When the read_body_chunk_block is given, we no longer have access to the
|
@@ -432,7 +435,7 @@ module Stripe
|
|
432
435
|
|
433
436
|
private def execute_request_internal(method, path,
|
434
437
|
api_base, api_key, headers, params,
|
435
|
-
&read_body_chunk_block)
|
438
|
+
api_mode, &read_body_chunk_block)
|
436
439
|
raise ArgumentError, "method should be a symbol" \
|
437
440
|
unless method.is_a?(Symbol)
|
438
441
|
raise ArgumentError, "path should be a string" \
|
@@ -456,8 +459,9 @@ module Stripe
|
|
456
459
|
|
457
460
|
query_params, path = merge_query_params(query_params, path)
|
458
461
|
|
459
|
-
headers = request_headers(api_key, method)
|
462
|
+
headers = request_headers(api_key, method, api_mode)
|
460
463
|
.update(Util.normalize_headers(headers))
|
464
|
+
|
461
465
|
url = api_url(path, api_base)
|
462
466
|
|
463
467
|
# Merge given query parameters with any already encoded in the path.
|
@@ -468,7 +472,7 @@ module Stripe
|
|
468
472
|
# a log-friendly variant of the encoded form. File objects are displayed
|
469
473
|
# as such instead of as their file contents.
|
470
474
|
body, body_log =
|
471
|
-
body_params ? encode_body(body_params, headers) : [nil, nil]
|
475
|
+
body_params ? encode_body(body_params, headers, api_mode) : [nil, nil]
|
472
476
|
|
473
477
|
authenticator.authenticate(method, headers, body) unless api_key
|
474
478
|
|
@@ -544,7 +548,7 @@ module Stripe
|
|
544
548
|
# Encodes a set of body parameters using multipart if `Content-Type` is set
|
545
549
|
# for that, or standard form-encoding otherwise. Returns the encoded body
|
546
550
|
# and a version of the encoded body that's safe to be logged.
|
547
|
-
private def encode_body(body_params, headers)
|
551
|
+
private def encode_body(body_params, headers, api_mode)
|
548
552
|
body = nil
|
549
553
|
flattened_params = Util.flatten_params(body_params)
|
550
554
|
|
@@ -560,15 +564,22 @@ module Stripe
|
|
560
564
|
flattened_params =
|
561
565
|
flattened_params.map { |k, v| [k, v.is_a?(String) ? v : v.to_s] }.to_h
|
562
566
|
|
567
|
+
elsif api_mode == :preview
|
568
|
+
body = JSON.generate(body_params)
|
569
|
+
headers["Content-Type"] = "application/json"
|
563
570
|
else
|
564
571
|
body = Util.encode_parameters(body_params)
|
565
572
|
end
|
566
573
|
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
574
|
+
if api_mode == :preview
|
575
|
+
body_log = body
|
576
|
+
else
|
577
|
+
# We don't use `Util.encode_parameters` partly as an optimization (to
|
578
|
+
# not redo work we've already done), and partly because the encoded
|
579
|
+
# forms of certain characters introduce a lot of visual noise and it's
|
580
|
+
# nice to have a clearer format for logs.
|
581
|
+
body_log = flattened_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
582
|
+
end
|
572
583
|
|
573
584
|
[body, body_log]
|
574
585
|
end
|
@@ -757,10 +768,11 @@ module Stripe
|
|
757
768
|
end
|
758
769
|
|
759
770
|
private def specific_api_error(resp, error_data, context)
|
771
|
+
message = error_data[:message] || error_data[:developer_message]
|
760
772
|
Util.log_error("Stripe API error",
|
761
773
|
status: resp.http_status,
|
762
774
|
error_code: error_data[:code],
|
763
|
-
error_message:
|
775
|
+
error_message: message,
|
764
776
|
error_param: error_data[:param],
|
765
777
|
error_type: error_data[:type],
|
766
778
|
idempotency_key: context.idempotency_key,
|
@@ -781,26 +793,26 @@ module Stripe
|
|
781
793
|
when 400, 404
|
782
794
|
case error_data[:type]
|
783
795
|
when "idempotency_error"
|
784
|
-
IdempotencyError.new(
|
796
|
+
IdempotencyError.new(message, **opts)
|
785
797
|
else
|
786
798
|
InvalidRequestError.new(
|
787
|
-
|
799
|
+
message, error_data[:param],
|
788
800
|
**opts
|
789
801
|
)
|
790
802
|
end
|
791
803
|
when 401
|
792
|
-
AuthenticationError.new(
|
804
|
+
AuthenticationError.new(message, **opts)
|
793
805
|
when 402
|
794
806
|
CardError.new(
|
795
|
-
|
807
|
+
message, error_data[:param],
|
796
808
|
**opts
|
797
809
|
)
|
798
810
|
when 403
|
799
|
-
PermissionError.new(
|
811
|
+
PermissionError.new(message, **opts)
|
800
812
|
when 429
|
801
|
-
RateLimitError.new(
|
813
|
+
RateLimitError.new(message, **opts)
|
802
814
|
else
|
803
|
-
APIError.new(
|
815
|
+
APIError.new(message, **opts)
|
804
816
|
end
|
805
817
|
end
|
806
818
|
|
@@ -868,7 +880,7 @@ module Stripe
|
|
868
880
|
message + "\n\n(Network error: #{error.message})"
|
869
881
|
end
|
870
882
|
|
871
|
-
private def request_headers(api_key, method)
|
883
|
+
private def request_headers(api_key, method, api_mode)
|
872
884
|
user_agent = "Stripe/v1 RubyBindings/#{Stripe::VERSION}"
|
873
885
|
unless Stripe.app_info.nil?
|
874
886
|
user_agent += " " + format_app_info(Stripe.app_info)
|
@@ -877,9 +889,13 @@ module Stripe
|
|
877
889
|
headers = {
|
878
890
|
"User-Agent" => user_agent,
|
879
891
|
"Authorization" => "Bearer #{api_key}",
|
880
|
-
"Content-Type" => "application/x-www-form-urlencoded",
|
881
892
|
}
|
882
893
|
|
894
|
+
if api_mode != :preview
|
895
|
+
# TODO: (major) don't set Content-Type if method is not post
|
896
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded"
|
897
|
+
end
|
898
|
+
|
883
899
|
if config.enable_telemetry? && !@last_request_metrics.nil?
|
884
900
|
headers["X-Stripe-Client-Telemetry"] = JSON.generate(
|
885
901
|
last_request_metrics: @last_request_metrics.payload
|
@@ -892,7 +908,12 @@ module Stripe
|
|
892
908
|
headers["Idempotency-Key"] ||= SecureRandom.uuid
|
893
909
|
end
|
894
910
|
|
895
|
-
|
911
|
+
if api_mode == :preview
|
912
|
+
headers["Stripe-Version"] = ApiVersion::PREVIEW
|
913
|
+
elsif config.api_version
|
914
|
+
headers["Stripe-Version"] = config.api_version
|
915
|
+
end
|
916
|
+
|
896
917
|
headers["Stripe-Account"] = config.stripe_account if config.stripe_account
|
897
918
|
|
898
919
|
user_agent = @system_profiler.user_agent
|
data/lib/stripe/version.rb
CHANGED
data/lib/stripe.rb
CHANGED
@@ -119,6 +119,49 @@ module Stripe
|
|
119
119
|
version: version,
|
120
120
|
}
|
121
121
|
end
|
122
|
+
|
123
|
+
class Preview
|
124
|
+
def self._get_default_opts(opts)
|
125
|
+
{ api_mode: :preview }.merge(opts)
|
126
|
+
end
|
127
|
+
|
128
|
+
def self.get(url, opts = {})
|
129
|
+
Stripe.raw_request(:get, url, {}, _get_default_opts(opts))
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.post(url, params = {}, opts = {})
|
133
|
+
Stripe.raw_request(:post, url, params, _get_default_opts(opts))
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.delete(url, opts = {})
|
137
|
+
Stripe.raw_request(:delete, url, {}, _get_default_opts(opts))
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
class RawRequest
|
142
|
+
include Stripe::APIOperations::Request
|
143
|
+
|
144
|
+
def initialize
|
145
|
+
@opts = {}
|
146
|
+
end
|
147
|
+
|
148
|
+
def execute(method, url, params = {}, opts = {})
|
149
|
+
resp, = execute_resource_request(method, url, params, opts)
|
150
|
+
|
151
|
+
resp
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Sends a request to Stripe REST API
|
156
|
+
def self.raw_request(method, url, params = {}, opts = {})
|
157
|
+
req = RawRequest.new
|
158
|
+
req.execute(method, url, params, opts)
|
159
|
+
end
|
160
|
+
|
161
|
+
def self.deserialize(data)
|
162
|
+
data = JSON.parse(data) if data.is_a?(String)
|
163
|
+
Util.convert_to_stripe_object(data, {})
|
164
|
+
end
|
122
165
|
end
|
123
166
|
|
124
167
|
Stripe.log_level = ENV["STRIPE_LOG"] unless ENV["STRIPE_LOG"].nil?
|
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.5
|
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-01 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.
|