stripe 10.9.0.pre.beta.1 → 10.9.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 +51 -275
- data/Gemfile +3 -0
- data/Makefile +7 -0
- data/OPENAPI_VERSION +1 -1
- data/README.md +0 -11
- data/VERSION +1 -1
- data/bin/tapioca +27 -0
- data/lib/stripe/api_operations/request.rb +1 -2
- data/lib/stripe/api_resource.rb +10 -1
- data/lib/stripe/api_resource_test_helpers.rb +6 -2
- data/lib/stripe/api_version.rb +0 -1
- data/lib/stripe/list_object.rb +3 -0
- data/lib/stripe/object_types.rb +120 -141
- data/lib/stripe/resources/account.rb +6 -4
- data/lib/stripe/resources/account_link.rb +3 -0
- data/lib/stripe/resources/account_session.rb +3 -0
- data/lib/stripe/resources/apple_pay_domain.rb +3 -0
- data/lib/stripe/resources/application_fee.rb +3 -0
- data/lib/stripe/resources/application_fee_refund.rb +3 -0
- data/lib/stripe/resources/apps/secret.rb +3 -0
- data/lib/stripe/resources/balance.rb +3 -0
- data/lib/stripe/resources/balance_transaction.rb +3 -0
- data/lib/stripe/resources/bank_account.rb +3 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +3 -0
- data/lib/stripe/resources/billing_portal/session.rb +3 -0
- data/lib/stripe/resources/capability.rb +3 -0
- data/lib/stripe/resources/card.rb +3 -0
- data/lib/stripe/resources/cash_balance.rb +3 -0
- data/lib/stripe/resources/charge.rb +3 -0
- data/lib/stripe/resources/checkout/session.rb +3 -0
- data/lib/stripe/resources/climate/order.rb +3 -0
- data/lib/stripe/resources/climate/product.rb +3 -0
- data/lib/stripe/resources/climate/supplier.rb +3 -0
- data/lib/stripe/resources/country_spec.rb +3 -0
- data/lib/stripe/resources/coupon.rb +3 -0
- data/lib/stripe/resources/credit_note.rb +3 -0
- data/lib/stripe/resources/credit_note_line_item.rb +3 -0
- data/lib/stripe/resources/customer.rb +7 -13
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +3 -0
- data/lib/stripe/resources/customer_session.rb +3 -0
- data/lib/stripe/resources/discount.rb +3 -0
- data/lib/stripe/resources/dispute.rb +3 -0
- data/lib/stripe/resources/ephemeral_key.rb +3 -0
- data/lib/stripe/resources/event.rb +3 -0
- data/lib/stripe/resources/exchange_rate.rb +3 -0
- data/lib/stripe/resources/file.rb +6 -0
- data/lib/stripe/resources/file_link.rb +3 -0
- data/lib/stripe/resources/financial_connections/account.rb +3 -3
- data/lib/stripe/resources/financial_connections/account_owner.rb +3 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +3 -0
- data/lib/stripe/resources/financial_connections/session.rb +3 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +3 -0
- data/lib/stripe/resources/funding_instructions.rb +3 -0
- data/lib/stripe/resources/identity/verification_report.rb +3 -0
- data/lib/stripe/resources/identity/verification_session.rb +3 -0
- data/lib/stripe/resources/invoice.rb +2 -52
- data/lib/stripe/resources/invoice_item.rb +3 -0
- data/lib/stripe/resources/invoice_line_item.rb +3 -0
- data/lib/stripe/resources/issuing/authorization.rb +6 -0
- data/lib/stripe/resources/issuing/card.rb +6 -0
- data/lib/stripe/resources/issuing/cardholder.rb +3 -0
- data/lib/stripe/resources/issuing/dispute.rb +3 -0
- data/lib/stripe/resources/issuing/token.rb +3 -0
- data/lib/stripe/resources/issuing/transaction.rb +6 -0
- data/lib/stripe/resources/line_item.rb +3 -0
- data/lib/stripe/resources/login_link.rb +3 -0
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/payment_intent.rb +5 -4
- data/lib/stripe/resources/payment_link.rb +3 -0
- data/lib/stripe/resources/payment_method.rb +3 -0
- data/lib/stripe/resources/payment_method_configuration.rb +3 -0
- data/lib/stripe/resources/payment_method_domain.rb +3 -0
- data/lib/stripe/resources/payout.rb +3 -0
- data/lib/stripe/resources/person.rb +3 -0
- data/lib/stripe/resources/plan.rb +3 -0
- data/lib/stripe/resources/price.rb +3 -0
- data/lib/stripe/resources/product.rb +3 -0
- data/lib/stripe/resources/promotion_code.rb +3 -0
- data/lib/stripe/resources/quote.rb +3 -104
- data/lib/stripe/resources/radar/early_fraud_warning.rb +3 -0
- data/lib/stripe/resources/radar/value_list.rb +3 -0
- data/lib/stripe/resources/radar/value_list_item.rb +3 -0
- data/lib/stripe/resources/refund.rb +6 -0
- data/lib/stripe/resources/reporting/report_run.rb +3 -0
- data/lib/stripe/resources/reporting/report_type.rb +3 -0
- data/lib/stripe/resources/reversal.rb +3 -0
- data/lib/stripe/resources/review.rb +3 -0
- data/lib/stripe/resources/setup_attempt.rb +3 -0
- data/lib/stripe/resources/setup_intent.rb +3 -0
- data/lib/stripe/resources/shipping_rate.rb +3 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +3 -0
- data/lib/stripe/resources/source.rb +3 -0
- data/lib/stripe/resources/source_transaction.rb +3 -0
- data/lib/stripe/resources/subscription.rb +3 -0
- data/lib/stripe/resources/subscription_item.rb +3 -0
- data/lib/stripe/resources/subscription_schedule.rb +2 -19
- data/lib/stripe/resources/tax/calculation.rb +3 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +3 -0
- data/lib/stripe/resources/tax/registration.rb +3 -0
- data/lib/stripe/resources/tax/settings.rb +3 -0
- data/lib/stripe/resources/tax/transaction.rb +3 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +3 -0
- data/lib/stripe/resources/tax_code.rb +3 -0
- data/lib/stripe/resources/tax_id.rb +5 -4
- data/lib/stripe/resources/tax_rate.rb +3 -0
- data/lib/stripe/resources/terminal/configuration.rb +3 -0
- data/lib/stripe/resources/terminal/connection_token.rb +3 -0
- data/lib/stripe/resources/terminal/location.rb +3 -0
- data/lib/stripe/resources/terminal/reader.rb +6 -60
- data/lib/stripe/resources/test_helpers/test_clock.rb +3 -0
- data/lib/stripe/resources/token.rb +3 -0
- data/lib/stripe/resources/topup.rb +3 -0
- data/lib/stripe/resources/transfer.rb +3 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +3 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +3 -0
- data/lib/stripe/resources/treasury/financial_account.rb +3 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +3 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +6 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +6 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +6 -0
- data/lib/stripe/resources/treasury/received_credit.rb +6 -0
- data/lib/stripe/resources/treasury/received_debit.rb +6 -0
- data/lib/stripe/resources/treasury/transaction.rb +3 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +3 -0
- data/lib/stripe/resources/usage_record.rb +3 -0
- data/lib/stripe/resources/usage_record_summary.rb +3 -0
- data/lib/stripe/resources/webhook_endpoint.rb +3 -0
- data/lib/stripe/resources.rb +0 -22
- data/lib/stripe/search_result_object.rb +3 -0
- data/lib/stripe/singleton_api_resource.rb +1 -1
- data/lib/stripe/stripe_client.rb +28 -62
- data/lib/stripe/stripe_configuration.rb +1 -2
- data/lib/stripe/util.rb +1 -8
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -46
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/coveralls_reborn.rbi +3 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3437 -0
- data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +8 -0
- data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
- data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +19 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/mocha@1.16.1.rbi +11 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +9454 -0
- data/sorbet/rbi/gems/power_assert@2.0.3.rbi +414 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10085 -0
- data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +931 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
- data/sorbet/rbi/gems/rack@3.0.8.rbi +5193 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +2884 -0
- data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3766 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4887 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7004 -0
- data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56919 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +555 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +8 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
- data/sorbet/rbi/gems/tapioca@0.11.17.rbi +3503 -0
- data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
- data/sorbet/rbi/gems/test-unit@3.6.1.rbi +4403 -0
- data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
- data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
- data/sorbet/rbi/gems/webmock@3.19.1.rbi +1740 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +61 -27
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -29
- data/lib/stripe/resources/capital/financing_offer.rb +0 -46
- data/lib/stripe/resources/capital/financing_summary.rb +0 -12
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -24
- data/lib/stripe/resources/confirmation_token.rb +0 -13
- data/lib/stripe/resources/customer_entitlement.rb +0 -9
- data/lib/stripe/resources/customer_entitlement_summary.rb +0 -9
- data/lib/stripe/resources/entitlements/event.rb +0 -23
- data/lib/stripe/resources/entitlements/feature.rb +0 -35
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -11
- data/lib/stripe/resources/gift_cards/card.rb +0 -56
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -90
- data/lib/stripe/resources/invoice_payment.rb +0 -9
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -85
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -113
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -23
- data/lib/stripe/resources/margin.rb +0 -34
- data/lib/stripe/resources/order.rb +0 -117
- data/lib/stripe/resources/quote_phase.rb +0 -36
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -40
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -8
- data/lib/stripe/resources/tax/form.rb +0 -46
@@ -8,12 +8,11 @@ module Stripe
|
|
8
8
|
extend Stripe::APIOperations::Create
|
9
9
|
extend Stripe::APIOperations::List
|
10
10
|
include Stripe::APIOperations::Save
|
11
|
-
extend Stripe::APIOperations::NestedResource
|
12
11
|
|
13
12
|
OBJECT_NAME = "quote"
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def self.object_name
|
14
|
+
"quote"
|
15
|
+
end
|
17
16
|
|
18
17
|
# Accepts the specified quote.
|
19
18
|
def accept(params = {}, opts = {})
|
@@ -65,46 +64,6 @@ module Stripe
|
|
65
64
|
)
|
66
65
|
end
|
67
66
|
|
68
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
69
|
-
def list_lines(params = {}, opts = {})
|
70
|
-
request_stripe_object(
|
71
|
-
method: :get,
|
72
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
|
73
|
-
params: params,
|
74
|
-
opts: opts
|
75
|
-
)
|
76
|
-
end
|
77
|
-
|
78
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
79
|
-
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
|
80
|
-
request_stripe_object(
|
81
|
-
method: :get,
|
82
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
|
83
|
-
params: params,
|
84
|
-
opts: opts
|
85
|
-
)
|
86
|
-
end
|
87
|
-
|
88
|
-
# Converts a stale quote to draft.
|
89
|
-
def mark_draft(params = {}, opts = {})
|
90
|
-
request_stripe_object(
|
91
|
-
method: :post,
|
92
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
|
93
|
-
params: params,
|
94
|
-
opts: opts
|
95
|
-
)
|
96
|
-
end
|
97
|
-
|
98
|
-
# Converts a draft or open quote to stale.
|
99
|
-
def mark_stale(params = {}, opts = {})
|
100
|
-
request_stripe_object(
|
101
|
-
method: :post,
|
102
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
|
103
|
-
params: params,
|
104
|
-
opts: opts
|
105
|
-
)
|
106
|
-
end
|
107
|
-
|
108
67
|
# Download the PDF for a finalized quote
|
109
68
|
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
110
69
|
config = opts[:client]&.config || Stripe.config
|
@@ -118,16 +77,6 @@ module Stripe
|
|
118
77
|
)
|
119
78
|
end
|
120
79
|
|
121
|
-
# Recompute the upcoming invoice estimate for the quote.
|
122
|
-
def reestimate(params = {}, opts = {})
|
123
|
-
request_stripe_object(
|
124
|
-
method: :post,
|
125
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
|
126
|
-
params: params,
|
127
|
-
opts: opts
|
128
|
-
)
|
129
|
-
end
|
130
|
-
|
131
80
|
# Accepts the specified quote.
|
132
81
|
def self.accept(quote, params = {}, opts = {})
|
133
82
|
request_stripe_object(
|
@@ -178,46 +127,6 @@ module Stripe
|
|
178
127
|
)
|
179
128
|
end
|
180
129
|
|
181
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
182
|
-
def self.list_lines(quote, params = {}, opts = {})
|
183
|
-
request_stripe_object(
|
184
|
-
method: :get,
|
185
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
186
|
-
params: params,
|
187
|
-
opts: opts
|
188
|
-
)
|
189
|
-
end
|
190
|
-
|
191
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
192
|
-
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
193
|
-
request_stripe_object(
|
194
|
-
method: :get,
|
195
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
196
|
-
params: params,
|
197
|
-
opts: opts
|
198
|
-
)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Converts a stale quote to draft.
|
202
|
-
def self.mark_draft(quote, params = {}, opts = {})
|
203
|
-
request_stripe_object(
|
204
|
-
method: :post,
|
205
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
206
|
-
params: params,
|
207
|
-
opts: opts
|
208
|
-
)
|
209
|
-
end
|
210
|
-
|
211
|
-
# Converts a draft or open quote to stale.
|
212
|
-
def self.mark_stale(quote, params = {}, opts = {})
|
213
|
-
request_stripe_object(
|
214
|
-
method: :post,
|
215
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
216
|
-
params: params,
|
217
|
-
opts: opts
|
218
|
-
)
|
219
|
-
end
|
220
|
-
|
221
130
|
# Download the PDF for a finalized quote
|
222
131
|
def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
|
223
132
|
config = opts[:client]&.config || Stripe.config
|
@@ -231,16 +140,6 @@ module Stripe
|
|
231
140
|
)
|
232
141
|
end
|
233
142
|
|
234
|
-
# Recompute the upcoming invoice estimate for the quote.
|
235
|
-
def self.reestimate(quote, params = {}, opts = {})
|
236
|
-
request_stripe_object(
|
237
|
-
method: :post,
|
238
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
239
|
-
params: params,
|
240
|
-
opts: opts
|
241
|
-
)
|
242
|
-
end
|
243
|
-
|
244
143
|
# A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
|
245
144
|
def self.create(params = {}, opts = {})
|
246
145
|
request_stripe_object(method: :post, path: "/v1/quotes", params: params, opts: opts)
|
@@ -13,6 +13,9 @@ module Stripe
|
|
13
13
|
include Stripe::APIOperations::Save
|
14
14
|
|
15
15
|
OBJECT_NAME = "radar.value_list"
|
16
|
+
def self.object_name
|
17
|
+
"radar.value_list"
|
18
|
+
end
|
16
19
|
|
17
20
|
# Creates a new ValueList object, which can then be referenced in rules.
|
18
21
|
def self.create(params = {}, opts = {})
|
@@ -12,6 +12,9 @@ module Stripe
|
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
|
14
14
|
OBJECT_NAME = "radar.value_list_item"
|
15
|
+
def self.object_name
|
16
|
+
"radar.value_list_item"
|
17
|
+
end
|
15
18
|
|
16
19
|
# Creates a new ValueListItem object, which is added to the specified parent value list.
|
17
20
|
def self.create(params = {}, opts = {})
|
@@ -13,6 +13,9 @@ module Stripe
|
|
13
13
|
include Stripe::APIOperations::Save
|
14
14
|
|
15
15
|
OBJECT_NAME = "refund"
|
16
|
+
def self.object_name
|
17
|
+
"refund"
|
18
|
+
end
|
16
19
|
|
17
20
|
# Cancels a refund with a status of requires_action.
|
18
21
|
#
|
@@ -80,6 +83,9 @@ module Stripe
|
|
80
83
|
|
81
84
|
class TestHelpers < APIResourceTestHelpers
|
82
85
|
RESOURCE_CLASS = Refund
|
86
|
+
def self.resource_class
|
87
|
+
"Refund"
|
88
|
+
end
|
83
89
|
|
84
90
|
# Expire a refund with a status of requires_action.
|
85
91
|
def self.expire(refund, params = {}, opts = {})
|
@@ -16,6 +16,9 @@ module Stripe
|
|
16
16
|
extend Stripe::APIOperations::List
|
17
17
|
|
18
18
|
OBJECT_NAME = "reporting.report_run"
|
19
|
+
def self.object_name
|
20
|
+
"reporting.report_run"
|
21
|
+
end
|
19
22
|
|
20
23
|
# Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
|
21
24
|
def self.create(params = {}, opts = {})
|
@@ -10,6 +10,9 @@ module Stripe
|
|
10
10
|
extend Stripe::APIOperations::List
|
11
11
|
|
12
12
|
OBJECT_NAME = "setup_attempt"
|
13
|
+
def self.object_name
|
14
|
+
"setup_attempt"
|
15
|
+
end
|
13
16
|
|
14
17
|
# Returns a list of SetupAttempts that associate with a provided SetupIntent.
|
15
18
|
def self.list(filters = {}, opts = {})
|
@@ -29,6 +29,9 @@ module Stripe
|
|
29
29
|
include Stripe::APIOperations::Save
|
30
30
|
|
31
31
|
OBJECT_NAME = "setup_intent"
|
32
|
+
def self.object_name
|
33
|
+
"setup_intent"
|
34
|
+
end
|
32
35
|
|
33
36
|
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
34
37
|
#
|
@@ -12,6 +12,9 @@ module Stripe
|
|
12
12
|
extend Stripe::APIOperations::NestedResource
|
13
13
|
|
14
14
|
OBJECT_NAME = "subscription_item"
|
15
|
+
def self.object_name
|
16
|
+
"subscription_item"
|
17
|
+
end
|
15
18
|
|
16
19
|
nested_resource_class_methods :usage_record, operations: %i[create]
|
17
20
|
nested_resource_class_methods :usage_record_summary,
|
@@ -11,15 +11,8 @@ module Stripe
|
|
11
11
|
include Stripe::APIOperations::Save
|
12
12
|
|
13
13
|
OBJECT_NAME = "subscription_schedule"
|
14
|
-
|
15
|
-
|
16
|
-
def amend(params = {}, opts = {})
|
17
|
-
request_stripe_object(
|
18
|
-
method: :post,
|
19
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
20
|
-
params: params,
|
21
|
-
opts: opts
|
22
|
-
)
|
14
|
+
def self.object_name
|
15
|
+
"subscription_schedule"
|
23
16
|
end
|
24
17
|
|
25
18
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
@@ -42,16 +35,6 @@ module Stripe
|
|
42
35
|
)
|
43
36
|
end
|
44
37
|
|
45
|
-
# Amends an existing subscription schedule.
|
46
|
-
def self.amend(schedule, params = {}, opts = {})
|
47
|
-
request_stripe_object(
|
48
|
-
method: :post,
|
49
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
50
|
-
params: params,
|
51
|
-
opts: opts
|
52
|
-
)
|
53
|
-
end
|
54
|
-
|
55
38
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
56
39
|
def self.cancel(schedule, params = {}, opts = {})
|
57
40
|
request_stripe_object(
|
@@ -10,6 +10,9 @@ module Stripe
|
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
|
12
12
|
OBJECT_NAME = "tax.calculation"
|
13
|
+
def self.object_name
|
14
|
+
"tax.calculation"
|
15
|
+
end
|
13
16
|
|
14
17
|
# Retrieves the line items of a persisted tax calculation as a collection.
|
15
18
|
def list_line_items(params = {}, opts = {})
|
@@ -8,6 +8,9 @@ module Stripe
|
|
8
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
|
+
def self.object_name
|
12
|
+
"tax.transaction"
|
13
|
+
end
|
11
14
|
|
12
15
|
# Retrieves the line items of a committed standalone transaction as a collection.
|
13
16
|
def list_line_items(params = {}, opts = {})
|
@@ -7,6 +7,9 @@ module Stripe
|
|
7
7
|
extend Stripe::APIOperations::List
|
8
8
|
|
9
9
|
OBJECT_NAME = "tax_code"
|
10
|
+
def self.object_name
|
11
|
+
"tax_code"
|
12
|
+
end
|
10
13
|
|
11
14
|
# A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
|
12
15
|
def self.list(filters = {}, opts = {})
|
@@ -10,6 +10,9 @@ module Stripe
|
|
10
10
|
include Stripe::APIOperations::Delete
|
11
11
|
|
12
12
|
OBJECT_NAME = "tax_id"
|
13
|
+
def self.object_name
|
14
|
+
"tax_id"
|
15
|
+
end
|
13
16
|
|
14
17
|
def resource_url
|
15
18
|
if !respond_to?(:customer) || customer.nil?
|
@@ -27,21 +30,19 @@ module Stripe
|
|
27
30
|
"'tax_id_id')`"
|
28
31
|
end
|
29
32
|
|
30
|
-
# Deletes an existing tax_id object.
|
31
33
|
def self.delete(id, params = {}, opts = {})
|
32
34
|
request_stripe_object(
|
33
35
|
method: :delete,
|
34
|
-
path:
|
36
|
+
path: "#{resource_url}/#{id}",
|
35
37
|
params: params,
|
36
38
|
opts: opts
|
37
39
|
)
|
38
40
|
end
|
39
41
|
|
40
|
-
# Deletes an existing tax_id object.
|
41
42
|
def delete(params = {}, opts = {})
|
42
43
|
request_stripe_object(
|
43
44
|
method: :delete,
|
44
|
-
path:
|
45
|
+
path: resource_url.to_s,
|
45
46
|
params: params,
|
46
47
|
opts: opts
|
47
48
|
)
|
@@ -10,6 +10,9 @@ module Stripe
|
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
|
12
12
|
OBJECT_NAME = "terminal.connection_token"
|
13
|
+
def self.object_name
|
14
|
+
"terminal.connection_token"
|
15
|
+
end
|
13
16
|
|
14
17
|
# To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
|
15
18
|
def self.create(params = {}, opts = {})
|
@@ -13,6 +13,9 @@ module Stripe
|
|
13
13
|
include Stripe::APIOperations::Save
|
14
14
|
|
15
15
|
OBJECT_NAME = "terminal.location"
|
16
|
+
def self.object_name
|
17
|
+
"terminal.location"
|
18
|
+
end
|
16
19
|
|
17
20
|
# Creates a new Location object.
|
18
21
|
# For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
|
@@ -13,6 +13,9 @@ module Stripe
|
|
13
13
|
include Stripe::APIOperations::Save
|
14
14
|
|
15
15
|
OBJECT_NAME = "terminal.reader"
|
16
|
+
def self.object_name
|
17
|
+
"terminal.reader"
|
18
|
+
end
|
16
19
|
|
17
20
|
# Cancels the current reader action.
|
18
21
|
def cancel_action(params = {}, opts = {})
|
@@ -24,36 +27,6 @@ module Stripe
|
|
24
27
|
)
|
25
28
|
end
|
26
29
|
|
27
|
-
# Initiates an input collection flow on a Reader.
|
28
|
-
def collect_inputs(params = {}, opts = {})
|
29
|
-
request_stripe_object(
|
30
|
-
method: :post,
|
31
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
|
32
|
-
params: params,
|
33
|
-
opts: opts
|
34
|
-
)
|
35
|
-
end
|
36
|
-
|
37
|
-
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
38
|
-
def collect_payment_method(params = {}, opts = {})
|
39
|
-
request_stripe_object(
|
40
|
-
method: :post,
|
41
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
|
42
|
-
params: params,
|
43
|
-
opts: opts
|
44
|
-
)
|
45
|
-
end
|
46
|
-
|
47
|
-
# Finalizes a payment on a Reader.
|
48
|
-
def confirm_payment_intent(params = {}, opts = {})
|
49
|
-
request_stripe_object(
|
50
|
-
method: :post,
|
51
|
-
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
|
52
|
-
params: params,
|
53
|
-
opts: opts
|
54
|
-
)
|
55
|
-
end
|
56
|
-
|
57
30
|
# Initiates a payment flow on a Reader.
|
58
31
|
def process_payment_intent(params = {}, opts = {})
|
59
32
|
request_stripe_object(
|
@@ -104,36 +77,6 @@ module Stripe
|
|
104
77
|
)
|
105
78
|
end
|
106
79
|
|
107
|
-
# Initiates an input collection flow on a Reader.
|
108
|
-
def self.collect_inputs(reader, params = {}, opts = {})
|
109
|
-
request_stripe_object(
|
110
|
-
method: :post,
|
111
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
|
112
|
-
params: params,
|
113
|
-
opts: opts
|
114
|
-
)
|
115
|
-
end
|
116
|
-
|
117
|
-
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
118
|
-
def self.collect_payment_method(reader, params = {}, opts = {})
|
119
|
-
request_stripe_object(
|
120
|
-
method: :post,
|
121
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
|
122
|
-
params: params,
|
123
|
-
opts: opts
|
124
|
-
)
|
125
|
-
end
|
126
|
-
|
127
|
-
# Finalizes a payment on a Reader.
|
128
|
-
def self.confirm_payment_intent(reader, params = {}, opts = {})
|
129
|
-
request_stripe_object(
|
130
|
-
method: :post,
|
131
|
-
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
|
132
|
-
params: params,
|
133
|
-
opts: opts
|
134
|
-
)
|
135
|
-
end
|
136
|
-
|
137
80
|
# Initiates a payment flow on a Reader.
|
138
81
|
def self.process_payment_intent(reader, params = {}, opts = {})
|
139
82
|
request_stripe_object(
|
@@ -230,6 +173,9 @@ module Stripe
|
|
230
173
|
|
231
174
|
class TestHelpers < APIResourceTestHelpers
|
232
175
|
RESOURCE_CLASS = Reader
|
176
|
+
def self.resource_class
|
177
|
+
"Reader"
|
178
|
+
end
|
233
179
|
|
234
180
|
# Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
|
235
181
|
def self.present_payment_method(reader, params = {}, opts = {})
|
@@ -12,6 +12,9 @@ module Stripe
|
|
12
12
|
extend Stripe::APIOperations::List
|
13
13
|
|
14
14
|
OBJECT_NAME = "test_helpers.test_clock"
|
15
|
+
def self.object_name
|
16
|
+
"test_helpers.test_clock"
|
17
|
+
end
|
15
18
|
|
16
19
|
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
|
17
20
|
def advance(params = {}, opts = {})
|
@@ -26,6 +26,9 @@ module Stripe
|
|
26
26
|
extend Stripe::APIOperations::Create
|
27
27
|
|
28
28
|
OBJECT_NAME = "token"
|
29
|
+
def self.object_name
|
30
|
+
"token"
|
31
|
+
end
|
29
32
|
|
30
33
|
# Creates a single-use token that represents a bank account's details.
|
31
34
|
# You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts).
|
@@ -9,6 +9,9 @@ module Stripe
|
|
9
9
|
extend Stripe::APIOperations::List
|
10
10
|
|
11
11
|
OBJECT_NAME = "treasury.credit_reversal"
|
12
|
+
def self.object_name
|
13
|
+
"treasury.credit_reversal"
|
14
|
+
end
|
12
15
|
|
13
16
|
# Reverses a ReceivedCredit and creates a CreditReversal object.
|
14
17
|
def self.create(params = {}, opts = {})
|