stripe 10.8.0.pre.beta.1 → 10.9.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/resources/account.rb +61 -1
- data/lib/stripe/resources/account_link.rb +5 -0
- data/lib/stripe/resources/account_notice.rb +15 -0
- data/lib/stripe/resources/account_session.rb +5 -0
- data/lib/stripe/resources/apple_pay_domain.rb +40 -0
- data/lib/stripe/resources/application_fee.rb +5 -0
- data/lib/stripe/resources/apps/secret.rb +10 -0
- data/lib/stripe/resources/balance_transaction.rb +12 -0
- data/lib/stripe/resources/bank_account.rb +27 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +30 -0
- data/lib/stripe/resources/billing_portal/session.rb +10 -0
- data/lib/stripe/resources/capital/financing_offer.rb +10 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +11 -0
- data/lib/stripe/resources/card.rb +27 -0
- data/lib/stripe/resources/charge.rb +22 -0
- data/lib/stripe/resources/checkout/session.rb +20 -0
- data/lib/stripe/resources/climate/order.rb +22 -0
- data/lib/stripe/resources/climate/product.rb +10 -0
- data/lib/stripe/resources/climate/supplier.rb +10 -0
- data/lib/stripe/resources/country_spec.rb +5 -0
- data/lib/stripe/resources/coupon.rb +42 -0
- data/lib/stripe/resources/credit_note.rb +33 -0
- data/lib/stripe/resources/customer.rb +42 -0
- data/lib/stripe/resources/customer_session.rb +10 -0
- data/lib/stripe/resources/dispute.rb +17 -0
- data/lib/stripe/resources/entitlements/event.rb +10 -0
- data/lib/stripe/resources/entitlements/feature.rb +20 -0
- data/lib/stripe/resources/ephemeral_key.rb +20 -0
- data/lib/stripe/resources/event.rb +5 -0
- data/lib/stripe/resources/exchange_rate.rb +5 -0
- data/lib/stripe/resources/file.rb +5 -0
- data/lib/stripe/resources/file_link.rb +20 -0
- data/lib/stripe/resources/financial_connections/account.rb +10 -0
- data/lib/stripe/resources/financial_connections/session.rb +10 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +10 -0
- data/lib/stripe/resources/gift_cards/card.rb +30 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +30 -0
- data/lib/stripe/resources/identity/verification_report.rb +10 -0
- data/lib/stripe/resources/identity/verification_session.rb +39 -0
- data/lib/stripe/resources/invoice.rb +45 -0
- data/lib/stripe/resources/invoice_item.rb +40 -0
- data/lib/stripe/resources/issuing/authorization.rb +20 -0
- data/lib/stripe/resources/issuing/card.rb +20 -0
- data/lib/stripe/resources/issuing/cardholder.rb +30 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +10 -0
- data/lib/stripe/resources/issuing/dispute.rb +30 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +30 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +10 -0
- data/lib/stripe/resources/issuing/token.rb +15 -0
- data/lib/stripe/resources/issuing/transaction.rb +20 -0
- data/lib/stripe/resources/margin.rb +20 -0
- data/lib/stripe/resources/order.rb +20 -0
- data/lib/stripe/resources/payment_intent.rb +35 -0
- data/lib/stripe/resources/payment_link.rb +20 -0
- data/lib/stripe/resources/payment_method.rb +22 -0
- data/lib/stripe/resources/payment_method_configuration.rb +30 -0
- data/lib/stripe/resources/payment_method_domain.rb +30 -0
- data/lib/stripe/resources/payout.rb +24 -0
- data/lib/stripe/resources/plan.rb +40 -0
- data/lib/stripe/resources/price.rb +20 -0
- data/lib/stripe/resources/product.rb +40 -0
- data/lib/stripe/resources/promotion_code.rb +20 -0
- data/lib/stripe/resources/quote.rb +20 -0
- data/lib/stripe/resources/quote_phase.rb +5 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +10 -0
- data/lib/stripe/resources/radar/value_list.rb +50 -0
- data/lib/stripe/resources/radar/value_list_item.rb +40 -0
- data/lib/stripe/resources/refund.rb +36 -0
- data/lib/stripe/resources/reporting/report_run.rb +20 -0
- data/lib/stripe/resources/reporting/report_type.rb +10 -0
- data/lib/stripe/resources/review.rb +5 -0
- data/lib/stripe/resources/setup_attempt.rb +5 -0
- data/lib/stripe/resources/setup_intent.rb +23 -0
- data/lib/stripe/resources/shipping_rate.rb +20 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +10 -0
- data/lib/stripe/resources/source.rb +17 -0
- data/lib/stripe/resources/subscription.rb +46 -0
- data/lib/stripe/resources/subscription_item.rb +50 -0
- data/lib/stripe/resources/subscription_schedule.rb +30 -0
- data/lib/stripe/resources/tax/calculation.rb +10 -0
- data/lib/stripe/resources/tax/form.rb +5 -0
- data/lib/stripe/resources/tax/registration.rb +32 -0
- data/lib/stripe/resources/tax_code.rb +5 -0
- data/lib/stripe/resources/tax_id.rb +20 -0
- data/lib/stripe/resources/tax_rate.rb +20 -0
- data/lib/stripe/resources/terminal/configuration.rb +50 -0
- data/lib/stripe/resources/terminal/connection_token.rb +10 -0
- data/lib/stripe/resources/terminal/location.rb +51 -0
- data/lib/stripe/resources/terminal/reader.rb +50 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +40 -0
- data/lib/stripe/resources/token.rb +6 -0
- data/lib/stripe/resources/topup.rb +20 -0
- data/lib/stripe/resources/transfer.rb +22 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +20 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +20 -0
- data/lib/stripe/resources/treasury/financial_account.rb +30 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +20 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +20 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +20 -0
- data/lib/stripe/resources/treasury/received_credit.rb +10 -0
- data/lib/stripe/resources/treasury/received_debit.rb +10 -0
- data/lib/stripe/resources/treasury/transaction.rb +10 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +10 -0
- data/lib/stripe/resources/webhook_endpoint.rb +50 -0
- data/lib/stripe/search_result_object.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: f178b071644d6b983c84a038558f00f935e9e6a640fac3afbaa10d6de00215a0
|
4
|
+
data.tar.gz: de8ab63d17fc5a7fcadd707f85bce306e2e3c02d30013964fa0e7947eaac7e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6e8048f87b42d0984792d91629b06148f0461180659ed489a095f905882ba0ad10c98451dfdede7dcaa080e47c9ab0d9b8d2be0841b27dade67438d8d8a4640
|
7
|
+
data.tar.gz: 29183605ce541cca61cdca1065d567106ca5c2d99b145f1a0c34a13d8f7c9e04c7c60779ab8b1c497c4ababce554a7790e3902e4c6651999d770175ca9e8f028
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 10.9.0-beta.1 - 2024-02-08
|
4
|
+
* [#1321](https://github.com/stripe/stripe-ruby/pull/1321) Update generated code for beta
|
5
|
+
* Release specs are identical.
|
6
|
+
|
3
7
|
## 10.8.0-beta.1 - 2024-02-01
|
4
8
|
* [#1318](https://github.com/stripe/stripe-ruby/pull/1318) Update generated code for beta
|
5
9
|
* Add support for new resources `Entitlements.Event` and `Entitlements.Feature`
|
6
10
|
* Add support for `create` method on resource `Event`
|
7
11
|
* Add support for `create` and `list` methods on resource `Feature`
|
8
12
|
|
13
|
+
## 10.7.1 - 2024-02-05
|
14
|
+
* [#1320](https://github.com/stripe/stripe-ruby/pull/1320) Remove spurious _search deprecation messages (https://github.com/stripe/stripe-ruby/issues/1319)
|
15
|
+
|
9
16
|
## 10.7.0 - 2024-02-01
|
10
17
|
* [#1317](https://github.com/stripe/stripe-ruby/pull/1317) Remove list method in child resources
|
11
18
|
* Removes list method mixin from child resources, as these methods always return `InvalidRequestError` and never succeed
|
data/Gemfile
CHANGED
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v810
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.
|
1
|
+
10.9.0-beta.1
|
@@ -10,7 +10,6 @@ module Stripe
|
|
10
10
|
# account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions),
|
11
11
|
# some properties are only returned for Custom accounts. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
|
12
12
|
class Account < APIResource
|
13
|
-
extend Gem::Deprecate
|
14
13
|
extend Stripe::APIOperations::Create
|
15
14
|
include Stripe::APIOperations::Delete
|
16
15
|
extend Stripe::APIOperations::List
|
@@ -195,5 +194,66 @@ module Stripe
|
|
195
194
|
end
|
196
195
|
update_hash
|
197
196
|
end
|
197
|
+
|
198
|
+
# With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
|
199
|
+
# To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
|
200
|
+
#
|
201
|
+
# If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when
|
202
|
+
# creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding.
|
203
|
+
# You can prefill any information on the account.
|
204
|
+
def self.create(params = {}, opts = {})
|
205
|
+
request_stripe_object(method: :post, path: "/v1/accounts", params: params, opts: opts)
|
206
|
+
end
|
207
|
+
|
208
|
+
# With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
|
209
|
+
#
|
210
|
+
# Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
|
211
|
+
#
|
212
|
+
# If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
|
213
|
+
def self.delete(id, params = {}, opts = {})
|
214
|
+
request_stripe_object(
|
215
|
+
method: :delete,
|
216
|
+
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
|
217
|
+
params: params,
|
218
|
+
opts: opts
|
219
|
+
)
|
220
|
+
end
|
221
|
+
|
222
|
+
# With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
|
223
|
+
#
|
224
|
+
# Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
|
225
|
+
#
|
226
|
+
# If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
|
227
|
+
def delete(params = {}, opts = {})
|
228
|
+
request_stripe_object(
|
229
|
+
method: :delete,
|
230
|
+
path: format("/v1/accounts/%<account>s", { account: CGI.escape(self["id"]) }),
|
231
|
+
params: params,
|
232
|
+
opts: opts
|
233
|
+
)
|
234
|
+
end
|
235
|
+
|
236
|
+
# Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
|
237
|
+
def self.list(filters = {}, opts = {})
|
238
|
+
request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: opts)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Updates a [connected account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
|
242
|
+
# left unchanged.
|
243
|
+
#
|
244
|
+
# For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that
|
245
|
+
# account has started to go through Connect Onboarding. Once you create an [Account Link or <a href="/docs/api/account_sessions">Account Session](https://stripe.com/docs/api/account_links),
|
246
|
+
# some properties can only be changed or updated for Custom accounts.
|
247
|
+
#
|
248
|
+
# To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
|
249
|
+
# [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
|
250
|
+
def self.update(id, params = {}, opts = {})
|
251
|
+
request_stripe_object(
|
252
|
+
method: :post,
|
253
|
+
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
|
254
|
+
params: params,
|
255
|
+
opts: opts
|
256
|
+
)
|
257
|
+
end
|
198
258
|
end
|
199
259
|
end
|
@@ -10,5 +10,10 @@ module Stripe
|
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
|
12
12
|
OBJECT_NAME = "account_link"
|
13
|
+
|
14
|
+
# Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
|
15
|
+
def self.create(params = {}, opts = {})
|
16
|
+
request_stripe_object(method: :post, path: "/v1/account_links", params: params, opts: opts)
|
17
|
+
end
|
13
18
|
end
|
14
19
|
end
|
@@ -10,5 +10,20 @@ module Stripe
|
|
10
10
|
include Stripe::APIOperations::Save
|
11
11
|
|
12
12
|
OBJECT_NAME = "account_notice"
|
13
|
+
|
14
|
+
# Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
15
|
+
def self.list(filters = {}, opts = {})
|
16
|
+
request_stripe_object(method: :get, path: "/v1/account_notices", params: filters, opts: opts)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Updates an AccountNotice object.
|
20
|
+
def self.update(id, params = {}, opts = {})
|
21
|
+
request_stripe_object(
|
22
|
+
method: :post,
|
23
|
+
path: format("/v1/account_notices/%<id>s", { id: CGI.escape(id) }),
|
24
|
+
params: params,
|
25
|
+
opts: opts
|
26
|
+
)
|
27
|
+
end
|
13
28
|
end
|
14
29
|
end
|
@@ -13,5 +13,10 @@ module Stripe
|
|
13
13
|
extend Stripe::APIOperations::Create
|
14
14
|
|
15
15
|
OBJECT_NAME = "account_session"
|
16
|
+
|
17
|
+
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
|
18
|
+
def self.create(params = {}, opts = {})
|
19
|
+
request_stripe_object(method: :post, path: "/v1/account_sessions", params: params, opts: opts)
|
20
|
+
end
|
16
21
|
end
|
17
22
|
end
|
@@ -13,5 +13,45 @@ module Stripe
|
|
13
13
|
def self.resource_url
|
14
14
|
"/v1/apple_pay/domains"
|
15
15
|
end
|
16
|
+
|
17
|
+
# Create an apple pay domain.
|
18
|
+
def self.create(params = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :post,
|
21
|
+
path: "/v1/apple_pay/domains",
|
22
|
+
params: params,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Delete an apple pay domain.
|
28
|
+
def self.delete(id, params = {}, opts = {})
|
29
|
+
request_stripe_object(
|
30
|
+
method: :delete,
|
31
|
+
path: format("/v1/apple_pay/domains/%<id>s", { id: CGI.escape(id) }),
|
32
|
+
params: params,
|
33
|
+
opts: opts
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Delete an apple pay domain.
|
38
|
+
def delete(params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :delete,
|
41
|
+
path: format("/v1/apple_pay/domains/%<domain>s", { domain: CGI.escape(self["id"]) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
# List apple pay domains.
|
48
|
+
def self.list(filters = {}, opts = {})
|
49
|
+
request_stripe_object(
|
50
|
+
method: :get,
|
51
|
+
path: "/v1/apple_pay/domains",
|
52
|
+
params: filters,
|
53
|
+
opts: opts
|
54
|
+
)
|
55
|
+
end
|
16
56
|
end
|
17
57
|
end
|
@@ -9,5 +9,10 @@ module Stripe
|
|
9
9
|
OBJECT_NAME = "application_fee"
|
10
10
|
|
11
11
|
nested_resource_class_methods :refund, operations: %i[create retrieve update list]
|
12
|
+
|
13
|
+
# Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
|
14
|
+
def self.list(filters = {}, opts = {})
|
15
|
+
request_stripe_object(method: :get, path: "/v1/application_fees", params: filters, opts: opts)
|
16
|
+
end
|
12
17
|
end
|
13
18
|
end
|
@@ -37,6 +37,16 @@ module Stripe
|
|
37
37
|
opts: opts
|
38
38
|
)
|
39
39
|
end
|
40
|
+
|
41
|
+
# Create or replace a secret in the secret store.
|
42
|
+
def self.create(params = {}, opts = {})
|
43
|
+
request_stripe_object(method: :post, path: "/v1/apps/secrets", params: params, opts: opts)
|
44
|
+
end
|
45
|
+
|
46
|
+
# List all secrets stored on the given scope.
|
47
|
+
def self.list(filters = {}, opts = {})
|
48
|
+
request_stripe_object(method: :get, path: "/v1/apps/secrets", params: filters, opts: opts)
|
49
|
+
end
|
40
50
|
end
|
41
51
|
end
|
42
52
|
end
|
@@ -10,5 +10,17 @@ module Stripe
|
|
10
10
|
extend Stripe::APIOperations::List
|
11
11
|
|
12
12
|
OBJECT_NAME = "balance_transaction"
|
13
|
+
|
14
|
+
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
|
15
|
+
#
|
16
|
+
# Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
|
17
|
+
def self.list(filters = {}, opts = {})
|
18
|
+
request_stripe_object(
|
19
|
+
method: :get,
|
20
|
+
path: "/v1/balance_transactions",
|
21
|
+
params: filters,
|
22
|
+
opts: opts
|
23
|
+
)
|
24
|
+
end
|
13
25
|
end
|
14
26
|
end
|
@@ -46,5 +46,32 @@ module Stripe
|
|
46
46
|
"or `Account.retrieve_external_account('account_id', " \
|
47
47
|
"'bank_account_id')`"
|
48
48
|
end
|
49
|
+
|
50
|
+
def self.delete(id, params = {}, opts = {})
|
51
|
+
request_stripe_object(
|
52
|
+
method: :delete,
|
53
|
+
path: "#{resource_url}/#{id}",
|
54
|
+
params: params,
|
55
|
+
opts: opts
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
def delete(params = {}, opts = {})
|
60
|
+
request_stripe_object(
|
61
|
+
method: :delete,
|
62
|
+
path: resource_url.to_s,
|
63
|
+
params: params,
|
64
|
+
opts: opts
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.list(filters = {}, opts = {})
|
69
|
+
request_stripe_object(
|
70
|
+
method: :delete,
|
71
|
+
path: resource_url.to_s,
|
72
|
+
params: filters,
|
73
|
+
opts: opts
|
74
|
+
)
|
75
|
+
end
|
49
76
|
end
|
50
77
|
end
|
@@ -10,6 +10,36 @@ module Stripe
|
|
10
10
|
include Stripe::APIOperations::Save
|
11
11
|
|
12
12
|
OBJECT_NAME = "billing_portal.configuration"
|
13
|
+
|
14
|
+
# Creates a configuration that describes the functionality and behavior of a PortalSession
|
15
|
+
def self.create(params = {}, opts = {})
|
16
|
+
request_stripe_object(
|
17
|
+
method: :post,
|
18
|
+
path: "/v1/billing_portal/configurations",
|
19
|
+
params: params,
|
20
|
+
opts: opts
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns a list of configurations that describe the functionality of the customer portal.
|
25
|
+
def self.list(filters = {}, opts = {})
|
26
|
+
request_stripe_object(
|
27
|
+
method: :get,
|
28
|
+
path: "/v1/billing_portal/configurations",
|
29
|
+
params: filters,
|
30
|
+
opts: opts
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Updates a configuration that describes the functionality of the customer portal.
|
35
|
+
def self.update(id, params = {}, opts = {})
|
36
|
+
request_stripe_object(
|
37
|
+
method: :post,
|
38
|
+
path: format("/v1/billing_portal/configurations/%<id>s", { id: CGI.escape(id) }),
|
39
|
+
params: params,
|
40
|
+
opts: opts
|
41
|
+
)
|
42
|
+
end
|
13
43
|
end
|
14
44
|
end
|
15
45
|
end
|
@@ -21,6 +21,16 @@ module Stripe
|
|
21
21
|
extend Stripe::APIOperations::Create
|
22
22
|
|
23
23
|
OBJECT_NAME = "billing_portal.session"
|
24
|
+
|
25
|
+
# Creates a session of the customer portal.
|
26
|
+
def self.create(params = {}, opts = {})
|
27
|
+
request_stripe_object(
|
28
|
+
method: :post,
|
29
|
+
path: "/v1/billing_portal/sessions",
|
30
|
+
params: params,
|
31
|
+
opts: opts
|
32
|
+
)
|
33
|
+
end
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
@@ -31,6 +31,16 @@ module Stripe
|
|
31
31
|
opts: opts
|
32
32
|
)
|
33
33
|
end
|
34
|
+
|
35
|
+
# Retrieves the financing offers available for Connected accounts that belong to your platform.
|
36
|
+
def self.list(filters = {}, opts = {})
|
37
|
+
request_stripe_object(
|
38
|
+
method: :get,
|
39
|
+
path: "/v1/capital/financing_offers",
|
40
|
+
params: filters,
|
41
|
+
opts: opts
|
42
|
+
)
|
43
|
+
end
|
34
44
|
end
|
35
45
|
end
|
36
46
|
end
|
@@ -8,6 +8,17 @@ module Stripe
|
|
8
8
|
extend Stripe::APIOperations::List
|
9
9
|
|
10
10
|
OBJECT_NAME = "capital.financing_transaction"
|
11
|
+
|
12
|
+
# Returns a list of financing transactions. The transactions are returned in sorted order,
|
13
|
+
# with the most recent transactions appearing first.
|
14
|
+
def self.list(filters = {}, opts = {})
|
15
|
+
request_stripe_object(
|
16
|
+
method: :get,
|
17
|
+
path: "/v1/capital/financing_transactions",
|
18
|
+
params: filters,
|
19
|
+
opts: opts
|
20
|
+
)
|
21
|
+
end
|
11
22
|
end
|
12
23
|
end
|
13
24
|
end
|
@@ -37,5 +37,32 @@ module Stripe
|
|
37
37
|
"'customer_id', 'card_id')` or " \
|
38
38
|
"`Account.retrieve_external_account('account_id', 'card_id')`"
|
39
39
|
end
|
40
|
+
|
41
|
+
def self.delete(id, params = {}, opts = {})
|
42
|
+
request_stripe_object(
|
43
|
+
method: :delete,
|
44
|
+
path: "#{resource_url}/#{id}",
|
45
|
+
params: params,
|
46
|
+
opts: opts
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
def delete(params = {}, opts = {})
|
51
|
+
request_stripe_object(
|
52
|
+
method: :delete,
|
53
|
+
path: resource_url.to_s,
|
54
|
+
params: params,
|
55
|
+
opts: opts
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.list(filters = {}, opts = {})
|
60
|
+
request_stripe_object(
|
61
|
+
method: :delete,
|
62
|
+
path: resource_url.to_s,
|
63
|
+
params: filters,
|
64
|
+
opts: opts
|
65
|
+
)
|
66
|
+
end
|
40
67
|
end
|
41
68
|
end
|
@@ -42,6 +42,18 @@ module Stripe
|
|
42
42
|
)
|
43
43
|
end
|
44
44
|
|
45
|
+
# This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
|
46
|
+
# to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
|
47
|
+
# object used to request payment.
|
48
|
+
def self.create(params = {}, opts = {})
|
49
|
+
request_stripe_object(method: :post, path: "/v1/charges", params: params, opts: opts)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
|
53
|
+
def self.list(filters = {}, opts = {})
|
54
|
+
request_stripe_object(method: :get, path: "/v1/charges", params: filters, opts: opts)
|
55
|
+
end
|
56
|
+
|
45
57
|
def self.search(params = {}, opts = {})
|
46
58
|
request_stripe_object(method: :get, path: "/v1/charges/search", params: params, opts: opts)
|
47
59
|
end
|
@@ -49,5 +61,15 @@ module Stripe
|
|
49
61
|
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
50
62
|
search(params, opts).auto_paging_each(&blk)
|
51
63
|
end
|
64
|
+
|
65
|
+
# Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
66
|
+
def self.update(id, params = {}, opts = {})
|
67
|
+
request_stripe_object(
|
68
|
+
method: :post,
|
69
|
+
path: format("/v1/charges/%<id>s", { id: CGI.escape(id) }),
|
70
|
+
params: params,
|
71
|
+
opts: opts
|
72
|
+
)
|
73
|
+
end
|
52
74
|
end
|
53
75
|
end
|
@@ -66,6 +66,26 @@ module Stripe
|
|
66
66
|
opts: opts
|
67
67
|
)
|
68
68
|
end
|
69
|
+
|
70
|
+
# Creates a Session object.
|
71
|
+
def self.create(params = {}, opts = {})
|
72
|
+
request_stripe_object(
|
73
|
+
method: :post,
|
74
|
+
path: "/v1/checkout/sessions",
|
75
|
+
params: params,
|
76
|
+
opts: opts
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Returns a list of Checkout Sessions.
|
81
|
+
def self.list(filters = {}, opts = {})
|
82
|
+
request_stripe_object(
|
83
|
+
method: :get,
|
84
|
+
path: "/v1/checkout/sessions",
|
85
|
+
params: filters,
|
86
|
+
opts: opts
|
87
|
+
)
|
88
|
+
end
|
69
89
|
end
|
70
90
|
end
|
71
91
|
end
|
@@ -37,6 +37,28 @@ module Stripe
|
|
37
37
|
opts: opts
|
38
38
|
)
|
39
39
|
end
|
40
|
+
|
41
|
+
# Creates a Climate order object for a given Climate product. The order will be processed immediately
|
42
|
+
# after creation and payment will be deducted your Stripe balance.
|
43
|
+
def self.create(params = {}, opts = {})
|
44
|
+
request_stripe_object(method: :post, path: "/v1/climate/orders", params: params, opts: opts)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Lists all Climate order objects. The orders are returned sorted by creation date, with the
|
48
|
+
# most recently created orders appearing first.
|
49
|
+
def self.list(filters = {}, opts = {})
|
50
|
+
request_stripe_object(method: :get, path: "/v1/climate/orders", params: filters, opts: opts)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Updates the specified order by setting the values of the parameters passed.
|
54
|
+
def self.update(id, params = {}, opts = {})
|
55
|
+
request_stripe_object(
|
56
|
+
method: :post,
|
57
|
+
path: format("/v1/climate/orders/%<id>s", { id: CGI.escape(id) }),
|
58
|
+
params: params,
|
59
|
+
opts: opts
|
60
|
+
)
|
61
|
+
end
|
40
62
|
end
|
41
63
|
end
|
42
64
|
end
|
@@ -9,6 +9,16 @@ module Stripe
|
|
9
9
|
extend Stripe::APIOperations::List
|
10
10
|
|
11
11
|
OBJECT_NAME = "climate.product"
|
12
|
+
|
13
|
+
# Lists all available Climate product objects.
|
14
|
+
def self.list(filters = {}, opts = {})
|
15
|
+
request_stripe_object(
|
16
|
+
method: :get,
|
17
|
+
path: "/v1/climate/products",
|
18
|
+
params: filters,
|
19
|
+
opts: opts
|
20
|
+
)
|
21
|
+
end
|
12
22
|
end
|
13
23
|
end
|
14
24
|
end
|
@@ -8,6 +8,16 @@ module Stripe
|
|
8
8
|
extend Stripe::APIOperations::List
|
9
9
|
|
10
10
|
OBJECT_NAME = "climate.supplier"
|
11
|
+
|
12
|
+
# Lists all available Climate supplier objects.
|
13
|
+
def self.list(filters = {}, opts = {})
|
14
|
+
request_stripe_object(
|
15
|
+
method: :get,
|
16
|
+
path: "/v1/climate/suppliers",
|
17
|
+
params: filters,
|
18
|
+
opts: opts
|
19
|
+
)
|
20
|
+
end
|
11
21
|
end
|
12
22
|
end
|
13
23
|
end
|
@@ -12,5 +12,10 @@ module Stripe
|
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
|
14
14
|
OBJECT_NAME = "country_spec"
|
15
|
+
|
16
|
+
# Lists all Country Spec objects available in the API.
|
17
|
+
def self.list(filters = {}, opts = {})
|
18
|
+
request_stripe_object(method: :get, path: "/v1/country_specs", params: filters, opts: opts)
|
19
|
+
end
|
15
20
|
end
|
16
21
|
end
|
@@ -12,5 +12,47 @@ module Stripe
|
|
12
12
|
include Stripe::APIOperations::Save
|
13
13
|
|
14
14
|
OBJECT_NAME = "coupon"
|
15
|
+
|
16
|
+
# You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
|
17
|
+
#
|
18
|
+
# A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
|
19
|
+
def self.create(params = {}, opts = {})
|
20
|
+
request_stripe_object(method: :post, path: "/v1/coupons", params: params, opts: opts)
|
21
|
+
end
|
22
|
+
|
23
|
+
# You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
|
24
|
+
def self.delete(id, params = {}, opts = {})
|
25
|
+
request_stripe_object(
|
26
|
+
method: :delete,
|
27
|
+
path: format("/v1/coupons/%<id>s", { id: CGI.escape(id) }),
|
28
|
+
params: params,
|
29
|
+
opts: opts
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
|
34
|
+
def delete(params = {}, opts = {})
|
35
|
+
request_stripe_object(
|
36
|
+
method: :delete,
|
37
|
+
path: format("/v1/coupons/%<coupon>s", { coupon: CGI.escape(self["id"]) }),
|
38
|
+
params: params,
|
39
|
+
opts: opts
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Returns a list of your coupons.
|
44
|
+
def self.list(filters = {}, opts = {})
|
45
|
+
request_stripe_object(method: :get, path: "/v1/coupons", params: filters, opts: opts)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
|
49
|
+
def self.update(id, params = {}, opts = {})
|
50
|
+
request_stripe_object(
|
51
|
+
method: :post,
|
52
|
+
path: format("/v1/coupons/%<id>s", { id: CGI.escape(id) }),
|
53
|
+
params: params,
|
54
|
+
opts: opts
|
55
|
+
)
|
56
|
+
end
|
15
57
|
end
|
16
58
|
end
|
@@ -51,5 +51,38 @@ module Stripe
|
|
51
51
|
opts: opts
|
52
52
|
)
|
53
53
|
end
|
54
|
+
|
55
|
+
# Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
|
56
|
+
# its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
|
57
|
+
# in any combination of the following:
|
58
|
+
#
|
59
|
+
#
|
60
|
+
# Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
|
61
|
+
# Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
|
62
|
+
# Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
|
63
|
+
#
|
64
|
+
#
|
65
|
+
# For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
|
66
|
+
#
|
67
|
+
# You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
|
68
|
+
# or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
|
69
|
+
def self.create(params = {}, opts = {})
|
70
|
+
request_stripe_object(method: :post, path: "/v1/credit_notes", params: params, opts: opts)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns a list of credit notes.
|
74
|
+
def self.list(filters = {}, opts = {})
|
75
|
+
request_stripe_object(method: :get, path: "/v1/credit_notes", params: filters, opts: opts)
|
76
|
+
end
|
77
|
+
|
78
|
+
# Updates an existing credit note.
|
79
|
+
def self.update(id, params = {}, opts = {})
|
80
|
+
request_stripe_object(
|
81
|
+
method: :post,
|
82
|
+
path: format("/v1/credit_notes/%<id>s", { id: CGI.escape(id) }),
|
83
|
+
params: params,
|
84
|
+
opts: opts
|
85
|
+
)
|
86
|
+
end
|
54
87
|
end
|
55
88
|
end
|