stripe 20.2.0.pre.alpha.2 → 20.2.0.pre.alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stripe/event_types.rb +20 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
- data/lib/stripe/events/v2_money_management_received_debit_mandate_canceled_event.rb +2 -0
- data/lib/stripe/events/v2_money_management_received_debit_mandate_created_event.rb +2 -0
- data/lib/stripe/events/v2_money_management_received_debit_mandate_expired_event.rb +2 -0
- data/lib/stripe/events/v2_money_management_received_debit_mandate_pending_cancellation_event.rb +2 -0
- data/lib/stripe/events/v2_money_management_received_debit_mandate_updated_event.rb +2 -0
- data/lib/stripe/events/v2_money_management_spending_mandate_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_spending_mandate_created_event.rb +46 -0
- data/lib/stripe/events/v2_money_management_spending_mandate_expired_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_spending_mandate_pending_cancellation_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_spending_mandate_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/params/checkout/session_create_params.rb +4 -0
- data/lib/stripe/params/customer_update_params.rb +55 -0
- data/lib/stripe/params/fx_quote_create_params.rb +2 -2
- data/lib/stripe/params/payment_attempt_record_report_authenticated_params.rb +10 -1
- data/lib/stripe/params/payment_attempt_record_report_authorized_params.rb +35 -1
- data/lib/stripe/params/payment_attempt_record_report_guaranteed_params.rb +35 -1
- data/lib/stripe/params/payment_method_configuration_create_params.rb +21 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +21 -0
- data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +35 -1
- data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +35 -1
- data/lib/stripe/params/payment_record_report_payment_params.rb +35 -1
- data/lib/stripe/params/radar/payment_evaluation_create_params.rb +7 -1
- data/lib/stripe/params/setup_intent_confirm_params.rb +13 -1
- data/lib/stripe/params/setup_intent_create_params.rb +13 -1
- data/lib/stripe/params/setup_intent_update_params.rb +13 -1
- data/lib/stripe/params/shared_payment/issued_token_create_params.rb +19 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +22 -1
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +46 -0
- data/lib/stripe/params/v2/money_management/payout_intent_create_params.rb +22 -1
- data/lib/stripe/params/v2/money_management/payout_intent_update_params.rb +22 -1
- data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +5 -2
- data/lib/stripe/params/v2/money_management/spending_mandate_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +26 -0
- data/lib/stripe/params/v2/money_management/spending_mandate_retrieve_params.rb +10 -0
- data/lib/stripe/params.rb +6 -0
- data/lib/stripe/resources/balance_transaction.rb +1 -1
- data/lib/stripe/resources/charge.rb +23 -7
- data/lib/stripe/resources/checkout/session.rb +2 -0
- data/lib/stripe/resources/confirmation_token.rb +19 -3
- data/lib/stripe/resources/identity/verification_report.rb +34 -0
- data/lib/stripe/resources/mandate.rb +16 -0
- data/lib/stripe/resources/payment_attempt_record.rb +18 -2
- data/lib/stripe/resources/payment_intent.rb +26 -0
- data/lib/stripe/resources/payment_method.rb +19 -3
- data/lib/stripe/resources/payment_method_configuration.rb +34 -0
- data/lib/stripe/resources/payment_record.rb +18 -2
- data/lib/stripe/resources/radar/payment_evaluation.rb +4 -0
- data/lib/stripe/resources/reserve/hold.rb +2 -2
- data/lib/stripe/resources/reserve/plan.rb +1 -1
- data/lib/stripe/resources/reserve/release.rb +1 -1
- data/lib/stripe/resources/setup_attempt.rb +18 -2
- data/lib/stripe/resources/setup_intent.rb +19 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +32 -2
- data/lib/stripe/resources/shared_payment/issued_token.rb +20 -0
- data/lib/stripe/resources/terminal/reader.rb +18 -1
- data/lib/stripe/resources/v2/core/event.rb +1 -1
- data/lib/stripe/resources/v2/core/event_base.rb +36 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +74 -1
- data/lib/stripe/resources/v2/money_management/payout_intent.rb +22 -1
- data/lib/stripe/resources/v2/money_management/payout_method.rb +40 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +3 -0
- data/lib/stripe/resources/v2/money_management/spending_mandate.rb +121 -0
- data/lib/stripe/resources.rb +29 -0
- data/lib/stripe/services/checkout/session_service.rb +2 -0
- data/lib/stripe/services/reserve/hold_service.rb +2 -2
- data/lib/stripe/services/reserve/plan_service.rb +2 -2
- data/lib/stripe/services/reserve/release_service.rb +2 -2
- data/lib/stripe/services/v2/core/vault/network_token_service.rb +1 -0
- data/lib/stripe/services/v2/money_management/received_debit_mandate_service.rb +3 -0
- data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +43 -0
- data/lib/stripe/services/v2/money_management_service.rb +2 -1
- data/lib/stripe/services.rb +2 -0
- data/lib/stripe/stripe_event_notification_handler.rb +20 -0
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +61 -2
- data/rbi/stripe/resources/v2/core/event_base.rbi +11 -0
- data/rbi/stripe.rbi +1464 -72
- metadata +14 -2
|
@@ -80,9 +80,9 @@ module Stripe
|
|
|
80
80
|
|
|
81
81
|
class Card < ::Stripe::StripeObject
|
|
82
82
|
class Checks < ::Stripe::StripeObject
|
|
83
|
-
# If
|
|
83
|
+
# If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
|
|
84
84
|
attr_reader :address_line1_check
|
|
85
|
-
# If
|
|
85
|
+
# If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
|
|
86
86
|
attr_reader :address_postal_code_check
|
|
87
87
|
# If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
|
|
88
88
|
attr_reader :cvc_check
|
|
@@ -441,6 +441,33 @@ module Stripe
|
|
|
441
441
|
end
|
|
442
442
|
end
|
|
443
443
|
|
|
444
|
+
class ReferralFeeDetails < ::Stripe::StripeObject
|
|
445
|
+
class Rate < ::Stripe::StripeObject
|
|
446
|
+
# The percentage of the payment amount which will be calculated as a fee.
|
|
447
|
+
attr_reader :percentage
|
|
448
|
+
# The type of fee rate.
|
|
449
|
+
attr_reader :type
|
|
450
|
+
|
|
451
|
+
def self.inner_class_types
|
|
452
|
+
@inner_class_types = {}
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
def self.field_remappings
|
|
456
|
+
@field_remappings = {}
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
# Attribute for field rate
|
|
460
|
+
attr_reader :rate
|
|
461
|
+
|
|
462
|
+
def self.inner_class_types
|
|
463
|
+
@inner_class_types = { rate: Rate }
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
def self.field_remappings
|
|
467
|
+
@field_remappings = {}
|
|
468
|
+
end
|
|
469
|
+
end
|
|
470
|
+
|
|
444
471
|
class RiskDetails < ::Stripe::StripeObject
|
|
445
472
|
class Insights < ::Stripe::StripeObject
|
|
446
473
|
class Bot < ::Stripe::StripeObject
|
|
@@ -631,6 +658,8 @@ module Stripe
|
|
|
631
658
|
attr_reader :object
|
|
632
659
|
# Details of the PaymentMethod that was shared via this token.
|
|
633
660
|
attr_reader :payment_method_details
|
|
661
|
+
# Referral fees may be charged when a SharedPaymentGrantedToken is used. This behavior is controlled by the issuer of the token. This field provides details about the referral fee rate.
|
|
662
|
+
attr_reader :referral_fee_details
|
|
634
663
|
# Risk details of the SharedPaymentGrantedToken.
|
|
635
664
|
attr_reader :risk_details
|
|
636
665
|
# Metadata about the SharedPaymentGrantedToken.
|
|
@@ -685,6 +714,7 @@ module Stripe
|
|
|
685
714
|
@inner_class_types = {
|
|
686
715
|
agent_details: AgentDetails,
|
|
687
716
|
payment_method_details: PaymentMethodDetails,
|
|
717
|
+
referral_fee_details: ReferralFeeDetails,
|
|
688
718
|
risk_details: RiskDetails,
|
|
689
719
|
usage_details: UsageDetails,
|
|
690
720
|
usage_limits: UsageLimits,
|
|
@@ -56,6 +56,23 @@ module Stripe
|
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
class ReferralFeeDetails < ::Stripe::StripeObject
|
|
60
|
+
# The Customer to be invoiced for fees assessed.
|
|
61
|
+
attr_reader :customer
|
|
62
|
+
# The account to be invoiced for fees assessed.
|
|
63
|
+
attr_reader :customer_account
|
|
64
|
+
# The percentage of the payment charged as a referral fee.
|
|
65
|
+
attr_reader :referral_fee_percent
|
|
66
|
+
|
|
67
|
+
def self.inner_class_types
|
|
68
|
+
@inner_class_types = {}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def self.field_remappings
|
|
72
|
+
@field_remappings = {}
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
59
76
|
class RiskDetails < ::Stripe::StripeObject
|
|
60
77
|
class Insights < ::Stripe::StripeObject
|
|
61
78
|
class Bot < ::Stripe::StripeObject
|
|
@@ -261,6 +278,8 @@ module Stripe
|
|
|
261
278
|
attr_reader :object
|
|
262
279
|
# ID of an existing PaymentMethod.
|
|
263
280
|
attr_reader :payment_method
|
|
281
|
+
# Referral fee details of the SharedPaymentIssuedToken.
|
|
282
|
+
attr_reader :referral_fee_details
|
|
264
283
|
# If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
|
|
265
284
|
attr_reader :return_url
|
|
266
285
|
# Risk details of the SharedPaymentIssuedToken.
|
|
@@ -313,6 +332,7 @@ module Stripe
|
|
|
313
332
|
def self.inner_class_types
|
|
314
333
|
@inner_class_types = {
|
|
315
334
|
next_action: NextAction,
|
|
335
|
+
referral_fee_details: ReferralFeeDetails,
|
|
316
336
|
risk_details: RiskDetails,
|
|
317
337
|
seller_details: SellerDetails,
|
|
318
338
|
usage_details: UsageDetails,
|
|
@@ -704,10 +704,27 @@ module Stripe
|
|
|
704
704
|
@field_remappings = {}
|
|
705
705
|
end
|
|
706
706
|
end
|
|
707
|
+
|
|
708
|
+
class DeviceHealthDetail < ::Stripe::StripeObject
|
|
709
|
+
# The type of condition affecting the reader's device health.
|
|
710
|
+
attr_reader :type
|
|
711
|
+
|
|
712
|
+
def self.inner_class_types
|
|
713
|
+
@inner_class_types = {}
|
|
714
|
+
end
|
|
715
|
+
|
|
716
|
+
def self.field_remappings
|
|
717
|
+
@field_remappings = {}
|
|
718
|
+
end
|
|
719
|
+
end
|
|
707
720
|
# The most recent action performed by the reader.
|
|
708
721
|
attr_reader :action
|
|
709
722
|
# Always true for a deleted object
|
|
710
723
|
attr_reader :deleted
|
|
724
|
+
# The overall device health of the reader: `healthy` or `unhealthy`. Renamed to `no_issues_detected` and `needs_attention` respectively; see `device_health_details` for the specific conditions.
|
|
725
|
+
attr_reader :device_health
|
|
726
|
+
# The set of conditions affecting the reader's device health. Empty when there are no conditions.
|
|
727
|
+
attr_reader :device_health_details
|
|
711
728
|
# The current software version of the reader.
|
|
712
729
|
attr_reader :device_sw_version
|
|
713
730
|
# Device type of the reader.
|
|
@@ -1095,7 +1112,7 @@ module Stripe
|
|
|
1095
1112
|
end
|
|
1096
1113
|
|
|
1097
1114
|
def self.inner_class_types
|
|
1098
|
-
@inner_class_types = { action: Action }
|
|
1115
|
+
@inner_class_types = { action: Action, device_health_details: DeviceHealthDetail }
|
|
1099
1116
|
end
|
|
1100
1117
|
|
|
1101
1118
|
def self.field_remappings
|
|
@@ -6,7 +6,7 @@ module Stripe
|
|
|
6
6
|
module Core
|
|
7
7
|
# Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload.
|
|
8
8
|
# You can access events through the [Retrieve Event API](https://docs.stripe.com/api/v2/core/events/retrieve) for 30 days.
|
|
9
|
-
class Event <
|
|
9
|
+
class Event < EventBase
|
|
10
10
|
OBJECT_NAME = "v2.core.event"
|
|
11
11
|
def self.object_name
|
|
12
12
|
"v2.core.event"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stripe
|
|
4
|
+
module V2
|
|
5
|
+
module Core
|
|
6
|
+
class EventBase < APIResource
|
|
7
|
+
# internal use: a requestor scoped to this event's own Stripe-Context,
|
|
8
|
+
# discarding any Stripe-Account the configured requestor may carry.
|
|
9
|
+
# `context`, not account, is what routes a direct-retrieve `Event` (and
|
|
10
|
+
# requests made through #fetch_related_object) to the right account --
|
|
11
|
+
# mirrors how EventNotification#initialize scopes @client.
|
|
12
|
+
private def scoped_requestor
|
|
13
|
+
@scoped_requestor ||= begin
|
|
14
|
+
scoped_config = @requestor.config.reverse_duplicate_merge(
|
|
15
|
+
stripe_account: nil, stripe_context: context
|
|
16
|
+
)
|
|
17
|
+
APIRequestor.new(scoped_config)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Overridden so that every generated `fetch_related_object` (which calls
|
|
22
|
+
# this method) routes through #scoped_requestor. Still combines with this
|
|
23
|
+
# event's retained @opts so a retained api_key/stripe_version override
|
|
24
|
+
# survives, but with @opts's own stripe_account/stripe_context forced to
|
|
25
|
+
# the safe values first, since those are exactly what may be stale left
|
|
26
|
+
# over from how this Event itself was retrieved.
|
|
27
|
+
protected def _request(method:, path:, base_address:, params: {}, opts: {})
|
|
28
|
+
req_opts = RequestOptions.extract_opts_from_hash(opts)
|
|
29
|
+
safe_opts = @opts.merge(stripe_account: nil, stripe_context: context)
|
|
30
|
+
req_opts = RequestOptions.combine_opts(safe_opts, req_opts)
|
|
31
|
+
scoped_requestor.execute_request(method, path, base_address, params: params, opts: req_opts)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -197,11 +197,32 @@ module Stripe
|
|
|
197
197
|
@field_remappings = {}
|
|
198
198
|
end
|
|
199
199
|
end
|
|
200
|
+
|
|
201
|
+
class CheckSend < ::Stripe::StripeObject
|
|
202
|
+
# The ID of a file to include as an attachment with the check.
|
|
203
|
+
attr_reader :attachment_file
|
|
204
|
+
# Memo printed on the memo field of the check.
|
|
205
|
+
attr_reader :memo
|
|
206
|
+
# Open Enum. Shipping speed of the check. Defaults to standard.
|
|
207
|
+
attr_reader :shipping_speed
|
|
208
|
+
# Signature printed on the check.
|
|
209
|
+
attr_reader :signature
|
|
210
|
+
|
|
211
|
+
def self.inner_class_types
|
|
212
|
+
@inner_class_types = {}
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def self.field_remappings
|
|
216
|
+
@field_remappings = {}
|
|
217
|
+
end
|
|
218
|
+
end
|
|
200
219
|
# Options for bank account payout methods.
|
|
201
220
|
attr_reader :bank_account
|
|
221
|
+
# Options for check send payout methods.
|
|
222
|
+
attr_reader :check_send
|
|
202
223
|
|
|
203
224
|
def self.inner_class_types
|
|
204
|
-
@inner_class_types = { bank_account: BankAccount }
|
|
225
|
+
@inner_class_types = { bank_account: BankAccount, check_send: CheckSend }
|
|
205
226
|
end
|
|
206
227
|
|
|
207
228
|
def self.field_remappings
|
|
@@ -271,6 +292,55 @@ module Stripe
|
|
|
271
292
|
end
|
|
272
293
|
end
|
|
273
294
|
|
|
295
|
+
class CheckSend < ::Stripe::StripeObject
|
|
296
|
+
class MailingAddress < ::Stripe::StripeObject
|
|
297
|
+
# City, district, suburb, town, or village.
|
|
298
|
+
attr_reader :city
|
|
299
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
300
|
+
attr_reader :country
|
|
301
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
|
302
|
+
attr_reader :line1
|
|
303
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
|
304
|
+
attr_reader :line2
|
|
305
|
+
# ZIP or postal code.
|
|
306
|
+
attr_reader :postal_code
|
|
307
|
+
# State, county, province, or region.
|
|
308
|
+
attr_reader :state
|
|
309
|
+
|
|
310
|
+
def self.inner_class_types
|
|
311
|
+
@inner_class_types = {}
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
def self.field_remappings
|
|
315
|
+
@field_remappings = {}
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
# Open Enum. Carrier of the check.
|
|
319
|
+
attr_reader :carrier
|
|
320
|
+
# Check number.
|
|
321
|
+
attr_reader :check_number
|
|
322
|
+
# Postal code of the latest tracking update.
|
|
323
|
+
attr_reader :current_postal_code
|
|
324
|
+
# The ID of a file containing a preview image of the mailed check.
|
|
325
|
+
attr_reader :mailed_check_preview_file
|
|
326
|
+
# Mailing address of the check.
|
|
327
|
+
attr_reader :mailing_address
|
|
328
|
+
# Tracking number for the check.
|
|
329
|
+
attr_reader :tracking_number
|
|
330
|
+
# Open Enum. Tracking status of the check.
|
|
331
|
+
attr_reader :tracking_status
|
|
332
|
+
# When the tracking details were last updated.
|
|
333
|
+
attr_reader :updated_at
|
|
334
|
+
|
|
335
|
+
def self.inner_class_types
|
|
336
|
+
@inner_class_types = { mailing_address: MailingAddress }
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
def self.field_remappings
|
|
340
|
+
@field_remappings = {}
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
|
|
274
344
|
class CryptoWallet < ::Stripe::StripeObject
|
|
275
345
|
# A unique identifier that can be used to track this OutboundPayment with the recipient crypto wallet.
|
|
276
346
|
attr_reader :blockchain_transaction
|
|
@@ -334,6 +404,8 @@ module Stripe
|
|
|
334
404
|
attr_reader :bank_account
|
|
335
405
|
# Card tracking details.
|
|
336
406
|
attr_reader :card
|
|
407
|
+
# Check send tracking details.
|
|
408
|
+
attr_reader :check_send
|
|
337
409
|
# Crypto wallet tracking details.
|
|
338
410
|
attr_reader :crypto_wallet
|
|
339
411
|
# Paper check tracking details.
|
|
@@ -347,6 +419,7 @@ module Stripe
|
|
|
347
419
|
@inner_class_types = {
|
|
348
420
|
bank_account: BankAccount,
|
|
349
421
|
card: Card,
|
|
422
|
+
check_send: CheckSend,
|
|
350
423
|
crypto_wallet: CryptoWallet,
|
|
351
424
|
paper_check: PaperCheck,
|
|
352
425
|
}
|
|
@@ -324,11 +324,32 @@ module Stripe
|
|
|
324
324
|
@field_remappings = {}
|
|
325
325
|
end
|
|
326
326
|
end
|
|
327
|
+
|
|
328
|
+
class CheckSend < ::Stripe::StripeObject
|
|
329
|
+
# The ID of a file to include as an attachment with the check.
|
|
330
|
+
attr_reader :attachment_file
|
|
331
|
+
# Memo printed on the memo field of the check.
|
|
332
|
+
attr_reader :memo
|
|
333
|
+
# Open Enum. Shipping speed of the check. Defaults to standard.
|
|
334
|
+
attr_reader :shipping_speed
|
|
335
|
+
# Signature printed on the check.
|
|
336
|
+
attr_reader :signature
|
|
337
|
+
|
|
338
|
+
def self.inner_class_types
|
|
339
|
+
@inner_class_types = {}
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
def self.field_remappings
|
|
343
|
+
@field_remappings = {}
|
|
344
|
+
end
|
|
345
|
+
end
|
|
327
346
|
# Options for bank account payout methods.
|
|
328
347
|
attr_reader :bank_account
|
|
348
|
+
# Options for check send payout methods.
|
|
349
|
+
attr_reader :check_send
|
|
329
350
|
|
|
330
351
|
def self.inner_class_types
|
|
331
|
-
@inner_class_types = { bank_account: BankAccount }
|
|
352
|
+
@inner_class_types = { bank_account: BankAccount, check_send: CheckSend }
|
|
332
353
|
end
|
|
333
354
|
|
|
334
355
|
def self.field_remappings
|
|
@@ -106,6 +106,43 @@ module Stripe
|
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
+
class CheckSend < ::Stripe::StripeObject
|
|
110
|
+
class MailingAddress < ::Stripe::StripeObject
|
|
111
|
+
# City.
|
|
112
|
+
attr_reader :city
|
|
113
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
114
|
+
attr_reader :country
|
|
115
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
|
116
|
+
attr_reader :line1
|
|
117
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
|
118
|
+
attr_reader :line2
|
|
119
|
+
# ZIP or postal code.
|
|
120
|
+
attr_reader :postal_code
|
|
121
|
+
# State.
|
|
122
|
+
attr_reader :state
|
|
123
|
+
|
|
124
|
+
def self.inner_class_types
|
|
125
|
+
@inner_class_types = {}
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def self.field_remappings
|
|
129
|
+
@field_remappings = {}
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
# The US mailing address the check is sent to.
|
|
133
|
+
attr_reader :mailing_address
|
|
134
|
+
# The name printed on the check's payee line.
|
|
135
|
+
attr_reader :payee_name
|
|
136
|
+
|
|
137
|
+
def self.inner_class_types
|
|
138
|
+
@inner_class_types = { mailing_address: MailingAddress }
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def self.field_remappings
|
|
142
|
+
@field_remappings = {}
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
109
146
|
class CryptoWallet < ::Stripe::StripeObject
|
|
110
147
|
# Destination wallet address.
|
|
111
148
|
attr_reader :address
|
|
@@ -185,6 +222,8 @@ module Stripe
|
|
|
185
222
|
attr_reader :bank_account
|
|
186
223
|
# The PayoutMethodCard object details.
|
|
187
224
|
attr_reader :card
|
|
225
|
+
# The PayoutMethodCheckSend object details.
|
|
226
|
+
attr_reader :check_send
|
|
188
227
|
# Created timestamp.
|
|
189
228
|
attr_reader :created
|
|
190
229
|
# The PayoutMethodCryptoWallet object details.
|
|
@@ -215,6 +254,7 @@ module Stripe
|
|
|
215
254
|
apple_pay: ApplePay,
|
|
216
255
|
bank_account: BankAccount,
|
|
217
256
|
card: Card,
|
|
257
|
+
check_send: CheckSend,
|
|
218
258
|
crypto_wallet: CryptoWallet,
|
|
219
259
|
network_business_profile_wallet: NetworkBusinessProfileWallet,
|
|
220
260
|
pix: Pix,
|
|
@@ -39,6 +39,7 @@ module Stripe
|
|
|
39
39
|
# Open Enum. The bank network the debit was originated on.
|
|
40
40
|
attr_reader :network
|
|
41
41
|
# The ID of the mandate associated with this debit.
|
|
42
|
+
# Deprecated: use `bank_transfer.spending_mandate` instead.
|
|
42
43
|
attr_reader :received_debit_mandate
|
|
43
44
|
# The sort code of the bank that originated the debit.
|
|
44
45
|
attr_reader :sort_code
|
|
@@ -118,6 +119,8 @@ module Stripe
|
|
|
118
119
|
attr_reader :origin_type
|
|
119
120
|
# Open Enum. The type of the payment method used to originate the debit.
|
|
120
121
|
attr_reader :payment_method_type
|
|
122
|
+
# The ID of the SpendingMandate associated with this debit.
|
|
123
|
+
attr_reader :spending_mandate
|
|
121
124
|
# The statement descriptor set by the originator of the debit.
|
|
122
125
|
attr_reader :statement_descriptor
|
|
123
126
|
# Object containing details of the US Bank Account that originated the debit.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module V2
|
|
6
|
+
module MoneyManagement
|
|
7
|
+
# A SpendingMandate authorizes a counterparty to pull money from a Financial Account.
|
|
8
|
+
class SpendingMandate < APIResource
|
|
9
|
+
OBJECT_NAME = "v2.money_management.spending_mandate"
|
|
10
|
+
def self.object_name
|
|
11
|
+
"v2.money_management.spending_mandate"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class BankTransfer < ::Stripe::StripeObject
|
|
15
|
+
# The name of the account holder that initiated the debit.
|
|
16
|
+
attr_reader :account_holder_name
|
|
17
|
+
# The financial address associated with this mandate.
|
|
18
|
+
attr_reader :financial_address
|
|
19
|
+
# The bank transfer network for this mandate.
|
|
20
|
+
attr_reader :network
|
|
21
|
+
# The bank transfer reference provided by the bank. Only present when `network` is `bacs`.
|
|
22
|
+
attr_reader :reference
|
|
23
|
+
|
|
24
|
+
def self.inner_class_types
|
|
25
|
+
@inner_class_types = {}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.field_remappings
|
|
29
|
+
@field_remappings = {}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class StatusDetails < ::Stripe::StripeObject
|
|
34
|
+
class Canceled < ::Stripe::StripeObject
|
|
35
|
+
# The `canceled` status reason.
|
|
36
|
+
attr_reader :reason
|
|
37
|
+
|
|
38
|
+
def self.inner_class_types
|
|
39
|
+
@inner_class_types = {}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.field_remappings
|
|
43
|
+
@field_remappings = {}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
# If the mandate is canceled, this field provides more details on the cancellation reason.
|
|
47
|
+
attr_reader :canceled
|
|
48
|
+
|
|
49
|
+
def self.inner_class_types
|
|
50
|
+
@inner_class_types = { canceled: Canceled }
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.field_remappings
|
|
54
|
+
@field_remappings = {}
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class StatusTransitions < ::Stripe::StripeObject
|
|
59
|
+
# Timestamp describing when the SpendingMandate changed status to `active`.
|
|
60
|
+
# Represented as a RFC 3339 date & time UTC value in millisecond precision.
|
|
61
|
+
attr_reader :activated_at
|
|
62
|
+
# Timestamp describing when the SpendingMandate changed status to `canceled`.
|
|
63
|
+
# Represented as a RFC 3339 date & time UTC value in millisecond precision.
|
|
64
|
+
attr_reader :canceled_at
|
|
65
|
+
# Timestamp describing when the SpendingMandate was created.
|
|
66
|
+
# Represented as a RFC 3339 date & time UTC value in millisecond precision.
|
|
67
|
+
attr_reader :created_at
|
|
68
|
+
# Timestamp describing when the SpendingMandate changed status to `expired`.
|
|
69
|
+
# Represented as a RFC 3339 date & time UTC value in millisecond precision.
|
|
70
|
+
attr_reader :expired_at
|
|
71
|
+
# Timestamp describing when the SpendingMandate changed status to `pending_cancellation`.
|
|
72
|
+
# Represented as a RFC 3339 date & time UTC value in millisecond precision.
|
|
73
|
+
attr_reader :pending_cancellation_at
|
|
74
|
+
|
|
75
|
+
def self.inner_class_types
|
|
76
|
+
@inner_class_types = {}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def self.field_remappings
|
|
80
|
+
@field_remappings = {}
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
# Bank transfer details. Present if `type` is `bank_transfer`.
|
|
84
|
+
attr_reader :bank_transfer
|
|
85
|
+
# The time at which the SpendingMandate was created.
|
|
86
|
+
# Represented as a RFC 3339 date & time UTC value in millisecond precision.
|
|
87
|
+
attr_reader :created
|
|
88
|
+
# The currency in ISO 4217 format that debits will be collected in.
|
|
89
|
+
attr_reader :currency
|
|
90
|
+
# Financial account ID associated with this mandate.
|
|
91
|
+
attr_reader :financial_account
|
|
92
|
+
# The unique identifier for the SpendingMandate.
|
|
93
|
+
attr_reader :id
|
|
94
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
95
|
+
attr_reader :livemode
|
|
96
|
+
# String representing the object's type. Objects of the same type share the same value of the object field.
|
|
97
|
+
attr_reader :object
|
|
98
|
+
# The status of the SpendingMandate.
|
|
99
|
+
attr_reader :status
|
|
100
|
+
# Detailed information about the status of the SpendingMandate.
|
|
101
|
+
attr_reader :status_details
|
|
102
|
+
# Timestamps describing when the mandate changed status.
|
|
103
|
+
attr_reader :status_transitions
|
|
104
|
+
# The type of the SpendingMandate.
|
|
105
|
+
attr_reader :type
|
|
106
|
+
|
|
107
|
+
def self.inner_class_types
|
|
108
|
+
@inner_class_types = {
|
|
109
|
+
bank_transfer: BankTransfer,
|
|
110
|
+
status_details: StatusDetails,
|
|
111
|
+
status_transitions: StatusTransitions,
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def self.field_remappings
|
|
116
|
+
@field_remappings = {}
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
data/lib/stripe/resources.rb
CHANGED
|
@@ -1623,6 +1623,26 @@ module Stripe
|
|
|
1623
1623
|
"stripe/events/v2_money_management_reward_program_reward_reversed_event"
|
|
1624
1624
|
autoload :V2MoneyManagementRewardProgramRewardReversedEventNotification,
|
|
1625
1625
|
"stripe/events/v2_money_management_reward_program_reward_reversed_event"
|
|
1626
|
+
autoload :V2MoneyManagementSpendingMandateCanceledEvent,
|
|
1627
|
+
"stripe/events/v2_money_management_spending_mandate_canceled_event"
|
|
1628
|
+
autoload :V2MoneyManagementSpendingMandateCanceledEventNotification,
|
|
1629
|
+
"stripe/events/v2_money_management_spending_mandate_canceled_event"
|
|
1630
|
+
autoload :V2MoneyManagementSpendingMandateCreatedEvent,
|
|
1631
|
+
"stripe/events/v2_money_management_spending_mandate_created_event"
|
|
1632
|
+
autoload :V2MoneyManagementSpendingMandateCreatedEventNotification,
|
|
1633
|
+
"stripe/events/v2_money_management_spending_mandate_created_event"
|
|
1634
|
+
autoload :V2MoneyManagementSpendingMandateExpiredEvent,
|
|
1635
|
+
"stripe/events/v2_money_management_spending_mandate_expired_event"
|
|
1636
|
+
autoload :V2MoneyManagementSpendingMandateExpiredEventNotification,
|
|
1637
|
+
"stripe/events/v2_money_management_spending_mandate_expired_event"
|
|
1638
|
+
autoload :V2MoneyManagementSpendingMandatePendingCancellationEvent,
|
|
1639
|
+
"stripe/events/v2_money_management_spending_mandate_pending_cancellation_event"
|
|
1640
|
+
autoload :V2MoneyManagementSpendingMandatePendingCancellationEventNotification,
|
|
1641
|
+
"stripe/events/v2_money_management_spending_mandate_pending_cancellation_event"
|
|
1642
|
+
autoload :V2MoneyManagementSpendingMandateUpdatedEvent,
|
|
1643
|
+
"stripe/events/v2_money_management_spending_mandate_updated_event"
|
|
1644
|
+
autoload :V2MoneyManagementSpendingMandateUpdatedEventNotification,
|
|
1645
|
+
"stripe/events/v2_money_management_spending_mandate_updated_event"
|
|
1626
1646
|
autoload :V2MoneyManagementTransactionCreatedEvent, "stripe/events/v2_money_management_transaction_created_event"
|
|
1627
1647
|
autoload :V2MoneyManagementTransactionCreatedEventNotification,
|
|
1628
1648
|
"stripe/events/v2_money_management_transaction_created_event"
|
|
@@ -1940,6 +1960,7 @@ module Stripe
|
|
|
1940
1960
|
autoload :ClaimableSandbox, "stripe/resources/v2/core/claimable_sandbox"
|
|
1941
1961
|
autoload :ConnectionSession, "stripe/resources/v2/core/connection_session"
|
|
1942
1962
|
autoload :Event, "stripe/resources/v2/core/event"
|
|
1963
|
+
autoload :EventBase, "stripe/resources/v2/core/event_base"
|
|
1943
1964
|
autoload :EventDestination, "stripe/resources/v2/core/event_destination"
|
|
1944
1965
|
autoload :EventNotification, "stripe/resources/v2/core/event_notification"
|
|
1945
1966
|
autoload :EventReason, "stripe/resources/v2/core/event_notification"
|
|
@@ -2026,6 +2047,7 @@ module Stripe
|
|
|
2026
2047
|
autoload :RewardProgram, "stripe/resources/v2/money_management/reward_program"
|
|
2027
2048
|
autoload :RewardProgramEnrollment, "stripe/resources/v2/money_management/reward_program_enrollment"
|
|
2028
2049
|
autoload :RewardProgramRule, "stripe/resources/v2/money_management/reward_program_rule"
|
|
2050
|
+
autoload :SpendingMandate, "stripe/resources/v2/money_management/spending_mandate"
|
|
2029
2051
|
autoload :Transaction, "stripe/resources/v2/money_management/transaction"
|
|
2030
2052
|
autoload :TransactionEntry, "stripe/resources/v2/money_management/transaction_entry"
|
|
2031
2053
|
end
|
|
@@ -2085,6 +2107,7 @@ end
|
|
|
2085
2107
|
module Stripe
|
|
2086
2108
|
# rubocop:disable Metrics/CollectionLiteralLength
|
|
2087
2109
|
RESOURCE_FILES = %w[
|
|
2110
|
+
stripe/resources/v2/core/event_base
|
|
2088
2111
|
stripe/resources/v2/core/event_notification
|
|
2089
2112
|
stripe/resources/account
|
|
2090
2113
|
stripe/resources/account_link
|
|
@@ -2397,6 +2420,7 @@ module Stripe
|
|
|
2397
2420
|
stripe/resources/v2/money_management/reward_program
|
|
2398
2421
|
stripe/resources/v2/money_management/reward_program_enrollment
|
|
2399
2422
|
stripe/resources/v2/money_management/reward_program_rule
|
|
2423
|
+
stripe/resources/v2/money_management/spending_mandate
|
|
2400
2424
|
stripe/resources/v2/money_management/transaction
|
|
2401
2425
|
stripe/resources/v2/money_management/transaction_entry
|
|
2402
2426
|
stripe/resources/v2/network/business_profile
|
|
@@ -2939,6 +2963,11 @@ module Stripe
|
|
|
2939
2963
|
stripe/events/v2_money_management_recipient_verification_updated_event
|
|
2940
2964
|
stripe/events/v2_money_management_reward_program_reward_earned_event
|
|
2941
2965
|
stripe/events/v2_money_management_reward_program_reward_reversed_event
|
|
2966
|
+
stripe/events/v2_money_management_spending_mandate_canceled_event
|
|
2967
|
+
stripe/events/v2_money_management_spending_mandate_created_event
|
|
2968
|
+
stripe/events/v2_money_management_spending_mandate_expired_event
|
|
2969
|
+
stripe/events/v2_money_management_spending_mandate_pending_cancellation_event
|
|
2970
|
+
stripe/events/v2_money_management_spending_mandate_updated_event
|
|
2942
2971
|
stripe/events/v2_money_management_transaction_created_event
|
|
2943
2972
|
stripe/events/v2_money_management_transaction_updated_event
|
|
2944
2973
|
stripe/events/v2_orchestrated_commerce_agreement_confirmed_event
|
|
@@ -23,6 +23,8 @@ module Stripe
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# Creates a Checkout Session object.
|
|
26
|
+
#
|
|
27
|
+
# Validate requests on your server and protect your application's Session-creation endpoint with access controls and limits on repeated creation. See [Protect your Session-creation endpoint](https://docs.stripe.com/payments/accept-a-payment?payment-ui=elements&api-integration=checkout#protect-session-creation).
|
|
26
28
|
def create(params = {}, opts = {})
|
|
27
29
|
unless params.is_a?(Stripe::RequestParams)
|
|
28
30
|
params = ::Stripe::Checkout::SessionCreateParams.coerce_params(params)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module Reserve
|
|
6
6
|
class HoldService < StripeService
|
|
7
|
-
# Returns a list of ReserveHolds
|
|
7
|
+
# Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
|
|
8
8
|
def list(params = {}, opts = {})
|
|
9
9
|
request(
|
|
10
10
|
method: :get,
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# Retrieve a ReserveHold.
|
|
18
|
+
# Retrieve a ReserveHold on your account or on one of your connected accounts.
|
|
19
19
|
def retrieve(id, params = {}, opts = {})
|
|
20
20
|
request(
|
|
21
21
|
method: :get,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module Reserve
|
|
6
6
|
class PlanService < StripeService
|
|
7
|
-
# Returns a list of ReservePlans
|
|
7
|
+
# Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
|
|
8
8
|
def list(params = {}, opts = {})
|
|
9
9
|
request(
|
|
10
10
|
method: :get,
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# Retrieve a ReservePlan.
|
|
18
|
+
# Retrieve a ReservePlan on your account or on one of your connected accounts.
|
|
19
19
|
def retrieve(id, params = {}, opts = {})
|
|
20
20
|
request(
|
|
21
21
|
method: :get,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module Reserve
|
|
6
6
|
class ReleaseService < StripeService
|
|
7
|
-
# Returns a list of ReserveReleases
|
|
7
|
+
# Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
|
|
8
8
|
def list(params = {}, opts = {})
|
|
9
9
|
request(
|
|
10
10
|
method: :get,
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# Retrieve a ReserveRelease.
|
|
18
|
+
# Retrieve a ReserveRelease on your account or on one of your connected accounts.
|
|
19
19
|
def retrieve(id, params = {}, opts = {})
|
|
20
20
|
request(
|
|
21
21
|
method: :get,
|