stripe 20.1.0.pre.alpha.1 → 20.1.0.pre.alpha.2
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/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +20 -0
- data/lib/stripe/events/v1_invoice_upcoming_event.rb +20 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_mandate_activated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_mandate_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_mandate_expired_event.rb +46 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_mandate_refused_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_mandate_revoked_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_requires_capture_event.rb +2 -2
- data/lib/stripe/object_types.rb +4 -0
- data/lib/stripe/params/account_update_params.rb +8 -1
- data/lib/stripe/params/charge_capture_params.rb +1 -1
- data/lib/stripe/params/charge_create_params.rb +1 -1
- data/lib/stripe/params/checkout/session_create_params.rb +141 -2
- data/lib/stripe/params/checkout/session_update_params.rb +1 -0
- data/lib/stripe/params/invoice_create_params.rb +1 -1
- data/lib/stripe/params/invoice_update_params.rb +1 -1
- data/lib/stripe/params/payment_attempt_record_report_failed_params.rb +13 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +34 -4
- data/lib/stripe/params/payment_intent_create_params.rb +34 -4
- data/lib/stripe/params/payment_intent_update_params.rb +33 -3
- data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +13 -1
- data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +20 -1
- data/lib/stripe/params/payment_record_report_payment_params.rb +20 -1
- data/lib/stripe/params/radar/payment_evaluation_create_params.rb +16 -1
- data/lib/stripe/params/setup_intent_confirm_params.rb +1 -1
- data/lib/stripe/params/setup_intent_create_params.rb +1 -1
- data/lib/stripe/params/setup_intent_update_params.rb +1 -1
- data/lib/stripe/params/subscription_create_params.rb +1 -1
- data/lib/stripe/params/subscription_update_params.rb +1 -1
- data/lib/stripe/params/tax/registration_create_params.rb +1 -1
- data/lib/stripe/params/terminal/reader_activate_gift_card_params.rb +10 -1
- data/lib/stripe/params/terminal/reader_cashout_gift_card_params.rb +4 -1
- data/lib/stripe/params/terminal/reader_check_gift_card_balance_params.rb +4 -1
- data/lib/stripe/params/terminal/reader_reload_gift_card_params.rb +11 -1
- data/lib/stripe/params/v2/core/account_create_params.rb +1527 -94
- data/lib/stripe/params/v2/core/account_update_params.rb +1527 -94
- data/lib/stripe/params/v2/data/query_run_retrieve_params.rb +1 -1
- data/lib/stripe/params/v2/data/report_list_params.rb +2 -2
- data/lib/stripe/params/v2/data/report_retrieve_params.rb +1 -1
- data/lib/stripe/params/v2/data/reporting/query_run_retrieve_params.rb +1 -1
- data/lib/stripe/params/v2/data/schema_list_params.rb +1 -1
- data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +6 -2
- data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +4 -1
- data/lib/stripe/params/v2/money_management/funding_session_create_params.rb +51 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +29 -1
- data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_create_params.rb +85 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_list_params.rb +26 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +18 -0
- data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +1 -1
- data/lib/stripe/params/v2/reporting/report_run_retrieve_params.rb +1 -1
- data/lib/stripe/params/v2/risk/inquiry_list_params.rb +1 -4
- data/lib/stripe/params/v2/tax/integration_configuration_update_params.rb +13 -1
- data/lib/stripe/params.rb +14 -0
- data/lib/stripe/resources/account.rb +2 -0
- data/lib/stripe/resources/application_fee.rb +5 -0
- data/lib/stripe/resources/capital/financing_summary.rb +1 -1
- data/lib/stripe/resources/charge.rb +5 -17
- data/lib/stripe/resources/checkout/session.rb +153 -1
- data/lib/stripe/resources/invoice.rb +1 -1
- data/lib/stripe/resources/issuing/authorization.rb +34 -0
- data/lib/stripe/resources/issuing/transaction.rb +57 -0
- data/lib/stripe/resources/payment_attempt_record.rb +4 -0
- data/lib/stripe/resources/payment_intent.rb +41 -3
- data/lib/stripe/resources/payment_record.rb +4 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +64 -2
- data/lib/stripe/resources/radar/payment_evaluation.rb +56 -1
- data/lib/stripe/resources/radar/rule.rb +30 -0
- data/lib/stripe/resources/subscription.rb +33 -2
- data/lib/stripe/resources/subscription_schedule.rb +64 -2
- data/lib/stripe/resources/tax/registration.rb +16 -0
- data/lib/stripe/resources/v2/core/account.rb +11831 -2484
- data/lib/stripe/resources/v2/core/event.rb +1 -1
- data/lib/stripe/resources/v2/money_management/financial_address.rb +33 -17
- data/lib/stripe/resources/v2/money_management/funding_session.rb +69 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +36 -2
- data/lib/stripe/resources/v2/money_management/inbound_transfer_mandate.rb +159 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +23 -1
- data/lib/stripe/resources/v2/money_management/received_credit.rb +31 -1
- data/lib/stripe/resources/v2/provisioning/payment_method_request.rb +1 -1
- data/lib/stripe/resources/v2/provisioning/provider_service_detail.rb +24 -24
- data/lib/stripe/resources/v2/provisioning/resource.rb +13 -13
- data/lib/stripe/resources/v2/tax/integration_configuration.rb +16 -1
- data/lib/stripe/resources/v2/tax/operations_resolve_address_result.rb +1 -1
- data/lib/stripe/resources.rb +31 -0
- data/lib/stripe/services/v2/money_management/funding_session_service.rb +21 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_mandate_service.rb +59 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +8 -6
- data/lib/stripe/services/v2/money_management_service.rb +4 -1
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +1 -1
- data/lib/stripe/services/v2/signals/account_evaluation_service.rb +1 -1
- data/lib/stripe/services/v2/signals/account_signal_service.rb +2 -2
- data/lib/stripe/services.rb +4 -0
- data/lib/stripe/singleton_api_resource.rb +6 -0
- data/lib/stripe/stripe_event_notification_handler.rb +20 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +15924 -821
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46373e53926671934bb55ac696fde661e2c3a5a746237207e6192bcf7204fac7
|
|
4
|
+
data.tar.gz: 8122ca92668b2753bd9cfa0178e5dfe9227fe8b38f192cefc9b8958ffa818d45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00a6aed992407f9643b2b3b131d7ae913836de9855e29d2a11f4c636121903049f168efad19680cfba7d68a800679672c3c9a2d163999a520d7a50ad30f6d3a0
|
|
7
|
+
data.tar.gz: a5ee0238a58417d360dd388245dbc923fd73a4bc9c4a4a6bf9dc7757def057731b272b16421de9d1258a632e3a46424ac6e3aa714c53f1fa1a965473ba40bd65
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/event_types.rb
CHANGED
|
@@ -595,6 +595,16 @@ module Stripe
|
|
|
595
595
|
Events::V2MoneyManagementInboundTransferBankDebitReturnedEvent,
|
|
596
596
|
Events::V2MoneyManagementInboundTransferBankDebitSucceededEvent.lookup_type =>
|
|
597
597
|
Events::V2MoneyManagementInboundTransferBankDebitSucceededEvent,
|
|
598
|
+
Events::V2MoneyManagementInboundTransferMandateActivatedEvent.lookup_type =>
|
|
599
|
+
Events::V2MoneyManagementInboundTransferMandateActivatedEvent,
|
|
600
|
+
Events::V2MoneyManagementInboundTransferMandateCreatedEvent.lookup_type =>
|
|
601
|
+
Events::V2MoneyManagementInboundTransferMandateCreatedEvent,
|
|
602
|
+
Events::V2MoneyManagementInboundTransferMandateExpiredEvent.lookup_type =>
|
|
603
|
+
Events::V2MoneyManagementInboundTransferMandateExpiredEvent,
|
|
604
|
+
Events::V2MoneyManagementInboundTransferMandateRefusedEvent.lookup_type =>
|
|
605
|
+
Events::V2MoneyManagementInboundTransferMandateRefusedEvent,
|
|
606
|
+
Events::V2MoneyManagementInboundTransferMandateRevokedEvent.lookup_type =>
|
|
607
|
+
Events::V2MoneyManagementInboundTransferMandateRevokedEvent,
|
|
598
608
|
Events::V2MoneyManagementOutboundPaymentCanceledEvent.lookup_type =>
|
|
599
609
|
Events::V2MoneyManagementOutboundPaymentCanceledEvent,
|
|
600
610
|
Events::V2MoneyManagementOutboundPaymentCreatedEvent.lookup_type =>
|
|
@@ -1485,6 +1495,16 @@ module Stripe
|
|
|
1485
1495
|
Events::V2MoneyManagementInboundTransferBankDebitReturnedEventNotification,
|
|
1486
1496
|
Events::V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.lookup_type =>
|
|
1487
1497
|
Events::V2MoneyManagementInboundTransferBankDebitSucceededEventNotification,
|
|
1498
|
+
Events::V2MoneyManagementInboundTransferMandateActivatedEventNotification.lookup_type =>
|
|
1499
|
+
Events::V2MoneyManagementInboundTransferMandateActivatedEventNotification,
|
|
1500
|
+
Events::V2MoneyManagementInboundTransferMandateCreatedEventNotification.lookup_type =>
|
|
1501
|
+
Events::V2MoneyManagementInboundTransferMandateCreatedEventNotification,
|
|
1502
|
+
Events::V2MoneyManagementInboundTransferMandateExpiredEventNotification.lookup_type =>
|
|
1503
|
+
Events::V2MoneyManagementInboundTransferMandateExpiredEventNotification,
|
|
1504
|
+
Events::V2MoneyManagementInboundTransferMandateRefusedEventNotification.lookup_type =>
|
|
1505
|
+
Events::V2MoneyManagementInboundTransferMandateRefusedEventNotification,
|
|
1506
|
+
Events::V2MoneyManagementInboundTransferMandateRevokedEventNotification.lookup_type =>
|
|
1507
|
+
Events::V2MoneyManagementInboundTransferMandateRevokedEventNotification,
|
|
1488
1508
|
Events::V2MoneyManagementOutboundPaymentCanceledEventNotification.lookup_type =>
|
|
1489
1509
|
Events::V2MoneyManagementOutboundPaymentCanceledEventNotification,
|
|
1490
1510
|
Events::V2MoneyManagementOutboundPaymentCreatedEventNotification.lookup_type =>
|
|
@@ -8,6 +8,26 @@ module Stripe
|
|
|
8
8
|
def self.lookup_type
|
|
9
9
|
"v1.invoice.upcoming"
|
|
10
10
|
end
|
|
11
|
+
|
|
12
|
+
class V1InvoiceUpcomingEventData < ::Stripe::StripeObject
|
|
13
|
+
# The ID of the customer this upcoming invoice is associated with.
|
|
14
|
+
attr_reader :customer
|
|
15
|
+
# The ID of the subscription, if any.
|
|
16
|
+
attr_reader :subscription
|
|
17
|
+
|
|
18
|
+
def self.inner_class_types
|
|
19
|
+
@inner_class_types = {}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.field_remappings
|
|
23
|
+
@field_remappings = {}
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.inner_class_types
|
|
28
|
+
@inner_class_types = { data: V1InvoiceUpcomingEventData }
|
|
29
|
+
end
|
|
30
|
+
attr_reader :data
|
|
11
31
|
end
|
|
12
32
|
|
|
13
33
|
# Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). Note: The received `Invoice` object will not have an invoice ID.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Events
|
|
6
|
+
# Occurs when an InboundTransferMandate is activated by its banking network.
|
|
7
|
+
class V2MoneyManagementInboundTransferMandateActivatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.money_management.inbound_transfer_mandate.activated"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Retrieves the related object from the API. Makes an API request on every call.
|
|
13
|
+
def fetch_related_object
|
|
14
|
+
_request(
|
|
15
|
+
method: :get,
|
|
16
|
+
path: related_object.url,
|
|
17
|
+
base_address: :api,
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
attr_reader :related_object
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Occurs when an InboundTransferMandate is activated by its banking network.
|
|
25
|
+
class V2MoneyManagementInboundTransferMandateActivatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.money_management.inbound_transfer_mandate.activated"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the InboundTransferMandate related to this EventNotification from the Stripe API. Makes an API request on every call.
|
|
33
|
+
def fetch_related_object
|
|
34
|
+
resp = @client.raw_request(
|
|
35
|
+
:get,
|
|
36
|
+
related_object.url,
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
|
+
usage: ["fetch_related_object"]
|
|
39
|
+
)
|
|
40
|
+
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Events
|
|
6
|
+
# Occurs when an InboundTransferMandate is created.
|
|
7
|
+
class V2MoneyManagementInboundTransferMandateCreatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.money_management.inbound_transfer_mandate.created"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Retrieves the related object from the API. Makes an API request on every call.
|
|
13
|
+
def fetch_related_object
|
|
14
|
+
_request(
|
|
15
|
+
method: :get,
|
|
16
|
+
path: related_object.url,
|
|
17
|
+
base_address: :api,
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
attr_reader :related_object
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Occurs when an InboundTransferMandate is created.
|
|
25
|
+
class V2MoneyManagementInboundTransferMandateCreatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.money_management.inbound_transfer_mandate.created"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the InboundTransferMandate related to this EventNotification from the Stripe API. Makes an API request on every call.
|
|
33
|
+
def fetch_related_object
|
|
34
|
+
resp = @client.raw_request(
|
|
35
|
+
:get,
|
|
36
|
+
related_object.url,
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
|
+
usage: ["fetch_related_object"]
|
|
39
|
+
)
|
|
40
|
+
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Events
|
|
6
|
+
# Occurs when an active InboundTransferMandate expires because its banking network did not
|
|
7
|
+
# complete it within the allowed window.
|
|
8
|
+
class V2MoneyManagementInboundTransferMandateExpiredEvent < Stripe::V2::Core::Event
|
|
9
|
+
def self.lookup_type
|
|
10
|
+
"v2.money_management.inbound_transfer_mandate.expired"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Retrieves the related object from the API. Makes an API request on every call.
|
|
14
|
+
def fetch_related_object
|
|
15
|
+
_request(
|
|
16
|
+
method: :get,
|
|
17
|
+
path: related_object.url,
|
|
18
|
+
base_address: :api,
|
|
19
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_reader :related_object
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Occurs when an active InboundTransferMandate expires because its banking network did not
|
|
26
|
+
# complete it within the allowed window.
|
|
27
|
+
class V2MoneyManagementInboundTransferMandateExpiredEventNotification < Stripe::V2::Core::EventNotification
|
|
28
|
+
def self.lookup_type
|
|
29
|
+
"v2.money_management.inbound_transfer_mandate.expired"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
attr_reader :related_object
|
|
33
|
+
|
|
34
|
+
# Retrieves the InboundTransferMandate related to this EventNotification from the Stripe API. Makes an API request on every call.
|
|
35
|
+
def fetch_related_object
|
|
36
|
+
resp = @client.raw_request(
|
|
37
|
+
:get,
|
|
38
|
+
related_object.url,
|
|
39
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
40
|
+
usage: ["fetch_related_object"]
|
|
41
|
+
)
|
|
42
|
+
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Events
|
|
6
|
+
# Occurs when a boarding request for an InboundTransferMandate is refused by its banking network.
|
|
7
|
+
class V2MoneyManagementInboundTransferMandateRefusedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.money_management.inbound_transfer_mandate.refused"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Retrieves the related object from the API. Makes an API request on every call.
|
|
13
|
+
def fetch_related_object
|
|
14
|
+
_request(
|
|
15
|
+
method: :get,
|
|
16
|
+
path: related_object.url,
|
|
17
|
+
base_address: :api,
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
attr_reader :related_object
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Occurs when a boarding request for an InboundTransferMandate is refused by its banking network.
|
|
25
|
+
class V2MoneyManagementInboundTransferMandateRefusedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.money_management.inbound_transfer_mandate.refused"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the InboundTransferMandate related to this EventNotification from the Stripe API. Makes an API request on every call.
|
|
33
|
+
def fetch_related_object
|
|
34
|
+
resp = @client.raw_request(
|
|
35
|
+
:get,
|
|
36
|
+
related_object.url,
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
|
+
usage: ["fetch_related_object"]
|
|
39
|
+
)
|
|
40
|
+
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Events
|
|
6
|
+
# Occurs when an InboundTransferMandate is revoked by its banking network.
|
|
7
|
+
class V2MoneyManagementInboundTransferMandateRevokedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.money_management.inbound_transfer_mandate.revoked"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Retrieves the related object from the API. Makes an API request on every call.
|
|
13
|
+
def fetch_related_object
|
|
14
|
+
_request(
|
|
15
|
+
method: :get,
|
|
16
|
+
path: related_object.url,
|
|
17
|
+
base_address: :api,
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
attr_reader :related_object
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Occurs when an InboundTransferMandate is revoked by its banking network.
|
|
25
|
+
class V2MoneyManagementInboundTransferMandateRevokedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.money_management.inbound_transfer_mandate.revoked"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the InboundTransferMandate related to this EventNotification from the Stripe API. Makes an API request on every call.
|
|
33
|
+
def fetch_related_object
|
|
34
|
+
resp = @client.raw_request(
|
|
35
|
+
:get,
|
|
36
|
+
related_object.url,
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
|
+
usage: ["fetch_related_object"]
|
|
39
|
+
)
|
|
40
|
+
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module Events
|
|
6
|
-
# Sent when the off-session payment becomes available for capture.
|
|
6
|
+
# Deprecated. Sent when the off-session payment becomes available for capture.
|
|
7
7
|
class V2PaymentsOffSessionPaymentRequiresCaptureEvent < Stripe::V2::Core::Event
|
|
8
8
|
def self.lookup_type
|
|
9
9
|
"v2.payments.off_session_payment.requires_capture"
|
|
@@ -21,7 +21,7 @@ module Stripe
|
|
|
21
21
|
attr_reader :related_object
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
# Sent when the off-session payment becomes available for capture.
|
|
24
|
+
# Deprecated. Sent when the off-session payment becomes available for capture.
|
|
25
25
|
class V2PaymentsOffSessionPaymentRequiresCaptureEventNotification < Stripe::V2::Core::EventNotification
|
|
26
26
|
def self.lookup_type
|
|
27
27
|
"v2.payments.off_session_payment.requires_capture"
|
data/lib/stripe/object_types.rb
CHANGED
|
@@ -160,6 +160,7 @@ module Stripe
|
|
|
160
160
|
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
|
|
161
161
|
Radar::IssuingAuthorizationEvaluation.object_name => Radar::IssuingAuthorizationEvaluation,
|
|
162
162
|
Radar::PaymentEvaluation.object_name => Radar::PaymentEvaluation,
|
|
163
|
+
Radar::Rule.object_name => Radar::Rule,
|
|
163
164
|
Radar::ValueList.object_name => Radar::ValueList,
|
|
164
165
|
Radar::ValueListItem.object_name => Radar::ValueListItem,
|
|
165
166
|
Refund.object_name => Refund,
|
|
@@ -313,7 +314,10 @@ module Stripe
|
|
|
313
314
|
V2::MoneyManagement::FinancialAddressDebitSimulation,
|
|
314
315
|
V2::MoneyManagement::FinancialAddressGeneratedMicrodeposits.object_name =>
|
|
315
316
|
V2::MoneyManagement::FinancialAddressGeneratedMicrodeposits,
|
|
317
|
+
V2::MoneyManagement::FundingSession.object_name => V2::MoneyManagement::FundingSession,
|
|
316
318
|
V2::MoneyManagement::InboundTransfer.object_name => V2::MoneyManagement::InboundTransfer,
|
|
319
|
+
V2::MoneyManagement::InboundTransferMandate.object_name =>
|
|
320
|
+
V2::MoneyManagement::InboundTransferMandate,
|
|
317
321
|
V2::MoneyManagement::OutboundPayment.object_name => V2::MoneyManagement::OutboundPayment,
|
|
318
322
|
V2::MoneyManagement::OutboundPaymentQuote.object_name => V2::MoneyManagement::OutboundPaymentQuote,
|
|
319
323
|
V2::MoneyManagement::OutboundSetupIntent.object_name => V2::MoneyManagement::OutboundSetupIntent,
|
|
@@ -2265,12 +2265,19 @@ module Stripe
|
|
|
2265
2265
|
end
|
|
2266
2266
|
|
|
2267
2267
|
class Capital < ::Stripe::RequestParams
|
|
2268
|
+
# The payout destinations excluded from Capital financing payouts.
|
|
2269
|
+
attr_accessor :excluded_payout_destinations
|
|
2268
2270
|
# Per-currency mapping of user-selected destination accounts used to pay out loans.
|
|
2269
2271
|
attr_accessor :payout_destination
|
|
2270
2272
|
# Per-currency mapping of all destination accounts eligible to receive Capital financing payouts.
|
|
2271
2273
|
attr_accessor :payout_destination_selector
|
|
2272
2274
|
|
|
2273
|
-
def initialize(
|
|
2275
|
+
def initialize(
|
|
2276
|
+
excluded_payout_destinations: nil,
|
|
2277
|
+
payout_destination: nil,
|
|
2278
|
+
payout_destination_selector: nil
|
|
2279
|
+
)
|
|
2280
|
+
@excluded_payout_destinations = excluded_payout_destinations
|
|
2274
2281
|
@payout_destination = payout_destination
|
|
2275
2282
|
@payout_destination_selector = payout_destination_selector
|
|
2276
2283
|
end
|
|
@@ -1760,7 +1760,7 @@ module Stripe
|
|
|
1760
1760
|
attr_accessor :expand
|
|
1761
1761
|
# Provides industry-specific information about the charge.
|
|
1762
1762
|
attr_accessor :payment_details
|
|
1763
|
-
# The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts
|
|
1763
|
+
# The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts are only sent for payments in live mode.
|
|
1764
1764
|
attr_accessor :receipt_email
|
|
1765
1765
|
# For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
|
|
1766
1766
|
#
|
|
@@ -113,7 +113,7 @@ module Stripe
|
|
|
113
113
|
attr_accessor :on_behalf_of
|
|
114
114
|
# Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.
|
|
115
115
|
attr_accessor :radar_options
|
|
116
|
-
# The email address to which this charge's [receipt](https://docs.stripe.com/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and
|
|
116
|
+
# The email address to which this charge's [receipt](https://docs.stripe.com/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and receipts are only sent for payments in live mode. If this charge is for a [Customer](https://docs.stripe.com/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
|
|
117
117
|
attr_accessor :receipt_email
|
|
118
118
|
# Shipping information for the charge. Helps prevent fraud on charges for physical goods.
|
|
119
119
|
attr_accessor :shipping
|
|
@@ -2112,7 +2112,7 @@ module Stripe
|
|
|
2112
2112
|
end
|
|
2113
2113
|
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
2114
2114
|
attr_accessor :amount_includes_iof
|
|
2115
|
-
# The number of seconds (between
|
|
2115
|
+
# The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours).
|
|
2116
2116
|
attr_accessor :expires_after_seconds
|
|
2117
2117
|
# Additional fields for mandate creation.
|
|
2118
2118
|
attr_accessor :mandate_options
|
|
@@ -2590,6 +2590,129 @@ module Stripe
|
|
|
2590
2590
|
end
|
|
2591
2591
|
end
|
|
2592
2592
|
|
|
2593
|
+
class PaymentSettings < ::Stripe::RequestParams
|
|
2594
|
+
class ApplicationFeeData < ::Stripe::RequestParams
|
|
2595
|
+
# The amount of the application fee, in the currency's smallest unit, to apply to the initial payment and transfer to the application owner's Stripe account. The application fee is capped at the total amount captured.
|
|
2596
|
+
attr_accessor :initial_amount
|
|
2597
|
+
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of each payment total that will be transferred to the application owner's Stripe account.
|
|
2598
|
+
attr_accessor :percentage_decimal
|
|
2599
|
+
|
|
2600
|
+
def initialize(initial_amount: nil, percentage_decimal: nil)
|
|
2601
|
+
@initial_amount = initial_amount
|
|
2602
|
+
@percentage_decimal = percentage_decimal
|
|
2603
|
+
end
|
|
2604
|
+
|
|
2605
|
+
def self.field_encodings
|
|
2606
|
+
@field_encodings = { percentage_decimal: :decimal_string }
|
|
2607
|
+
end
|
|
2608
|
+
end
|
|
2609
|
+
|
|
2610
|
+
class TransferData < ::Stripe::RequestParams
|
|
2611
|
+
class TransferAmount < ::Stripe::RequestParams
|
|
2612
|
+
# The amount, in the currency's smallest unit, that will be transferred to the destination account when the initial payment succeeds.
|
|
2613
|
+
attr_accessor :initial_amount
|
|
2614
|
+
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of each payment total that will be transferred to the destination account.
|
|
2615
|
+
attr_accessor :percentage_decimal
|
|
2616
|
+
|
|
2617
|
+
def initialize(initial_amount: nil, percentage_decimal: nil)
|
|
2618
|
+
@initial_amount = initial_amount
|
|
2619
|
+
@percentage_decimal = percentage_decimal
|
|
2620
|
+
end
|
|
2621
|
+
|
|
2622
|
+
def self.field_encodings
|
|
2623
|
+
@field_encodings = { percentage_decimal: :decimal_string }
|
|
2624
|
+
end
|
|
2625
|
+
end
|
|
2626
|
+
# If specified, successful charges will be attributed to the destination
|
|
2627
|
+
# account for tax reporting, and the funds from charges will be transferred
|
|
2628
|
+
# to the destination account. The ID of the resulting transfer will be
|
|
2629
|
+
# returned on the successful charge's `transfer` field.
|
|
2630
|
+
attr_accessor :destination
|
|
2631
|
+
# Configures how much of each payment is transferred to the destination account. If omitted, the entire amount is transferred.
|
|
2632
|
+
attr_accessor :transfer_amount
|
|
2633
|
+
|
|
2634
|
+
def initialize(destination: nil, transfer_amount: nil)
|
|
2635
|
+
@destination = destination
|
|
2636
|
+
@transfer_amount = transfer_amount
|
|
2637
|
+
end
|
|
2638
|
+
|
|
2639
|
+
def self.field_encodings
|
|
2640
|
+
@field_encodings = {
|
|
2641
|
+
transfer_amount: { kind: :object, fields: { percentage_decimal: :decimal_string } },
|
|
2642
|
+
}
|
|
2643
|
+
end
|
|
2644
|
+
end
|
|
2645
|
+
# Configures an application fee transferred to the application owner's Stripe account.
|
|
2646
|
+
attr_accessor :application_fee_data
|
|
2647
|
+
# Controls when the funds will be captured from the customer's account.
|
|
2648
|
+
attr_accessor :capture_method
|
|
2649
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
|
2650
|
+
attr_accessor :description
|
|
2651
|
+
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
2652
|
+
attr_accessor :metadata
|
|
2653
|
+
# Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment
|
|
2654
|
+
# method collected by this Checkout Session.
|
|
2655
|
+
#
|
|
2656
|
+
# When setting this to `on_session`, Checkout will show a notice to the
|
|
2657
|
+
# customer that their payment details will be saved.
|
|
2658
|
+
#
|
|
2659
|
+
# When setting this to `off_session`, Checkout will show a notice to the
|
|
2660
|
+
# customer that their payment details will be saved and used for future
|
|
2661
|
+
# payments.
|
|
2662
|
+
#
|
|
2663
|
+
# If a Customer has been provided or Checkout creates a new Customer,
|
|
2664
|
+
# Checkout will attach the payment method to the Customer.
|
|
2665
|
+
#
|
|
2666
|
+
# If Checkout does not create a Customer, the payment method is not attached
|
|
2667
|
+
# to a Customer. To reuse the payment method, you can retrieve it from the
|
|
2668
|
+
# Checkout Session's PaymentIntent.
|
|
2669
|
+
#
|
|
2670
|
+
# When processing card payments, Checkout also uses `setup_future_usage`
|
|
2671
|
+
# to dynamically optimize your payment flow and comply with regional
|
|
2672
|
+
# legislation and network rules, such as SCA.
|
|
2673
|
+
attr_accessor :setup_future_usage
|
|
2674
|
+
# Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
|
|
2675
|
+
#
|
|
2676
|
+
# Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
|
|
2677
|
+
attr_accessor :statement_descriptor
|
|
2678
|
+
# Configures automatic transfers to a connected account when payments succeed.
|
|
2679
|
+
attr_accessor :transfer_data
|
|
2680
|
+
# A string that identifies the initial payment as part of a group.
|
|
2681
|
+
attr_accessor :transfer_group
|
|
2682
|
+
|
|
2683
|
+
def initialize(
|
|
2684
|
+
application_fee_data: nil,
|
|
2685
|
+
capture_method: nil,
|
|
2686
|
+
description: nil,
|
|
2687
|
+
metadata: nil,
|
|
2688
|
+
setup_future_usage: nil,
|
|
2689
|
+
statement_descriptor: nil,
|
|
2690
|
+
transfer_data: nil,
|
|
2691
|
+
transfer_group: nil
|
|
2692
|
+
)
|
|
2693
|
+
@application_fee_data = application_fee_data
|
|
2694
|
+
@capture_method = capture_method
|
|
2695
|
+
@description = description
|
|
2696
|
+
@metadata = metadata
|
|
2697
|
+
@setup_future_usage = setup_future_usage
|
|
2698
|
+
@statement_descriptor = statement_descriptor
|
|
2699
|
+
@transfer_data = transfer_data
|
|
2700
|
+
@transfer_group = transfer_group
|
|
2701
|
+
end
|
|
2702
|
+
|
|
2703
|
+
def self.field_encodings
|
|
2704
|
+
@field_encodings = {
|
|
2705
|
+
application_fee_data: { kind: :object, fields: { percentage_decimal: :decimal_string } },
|
|
2706
|
+
transfer_data: {
|
|
2707
|
+
kind: :object,
|
|
2708
|
+
fields: {
|
|
2709
|
+
transfer_amount: { kind: :object, fields: { percentage_decimal: :decimal_string } },
|
|
2710
|
+
},
|
|
2711
|
+
},
|
|
2712
|
+
}
|
|
2713
|
+
end
|
|
2714
|
+
end
|
|
2715
|
+
|
|
2593
2716
|
class Permissions < ::Stripe::RequestParams
|
|
2594
2717
|
class Update < ::Stripe::RequestParams
|
|
2595
2718
|
# Determines which entity is allowed to update the line items.
|
|
@@ -3029,7 +3152,7 @@ module Stripe
|
|
|
3029
3152
|
#
|
|
3030
3153
|
# Default is `auto`, when the customer's attempt to pay is approved automatically with no action required on your server.
|
|
3031
3154
|
#
|
|
3032
|
-
# When set to `manual`, you must approve the customer's attempt to pay by calling [approve](api/checkout/sessions/approve) from your server.
|
|
3155
|
+
# When set to `manual`, you must approve the customer's attempt to pay by calling [approve](/api/checkout/sessions/approve) from your server.
|
|
3033
3156
|
attr_accessor :approval_method
|
|
3034
3157
|
# Settings for automatic surcharge calculation for this session.
|
|
3035
3158
|
attr_accessor :automatic_surcharge
|
|
@@ -3154,6 +3277,8 @@ module Stripe
|
|
|
3154
3277
|
attr_accessor :payment_method_data
|
|
3155
3278
|
# Payment-method-specific configuration.
|
|
3156
3279
|
attr_accessor :payment_method_options
|
|
3280
|
+
# A subset of parameters to configure the payment for this Checkout Session.
|
|
3281
|
+
attr_accessor :payment_settings
|
|
3157
3282
|
# This property is used to set up permissions for various actions (for example, update) on the CheckoutSession object. Can only be set when creating `embedded_page` or `elements` sessions.
|
|
3158
3283
|
#
|
|
3159
3284
|
# For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
|
|
@@ -3243,6 +3368,7 @@ module Stripe
|
|
|
3243
3368
|
payment_method_configuration: nil,
|
|
3244
3369
|
payment_method_data: nil,
|
|
3245
3370
|
payment_method_options: nil,
|
|
3371
|
+
payment_settings: nil,
|
|
3246
3372
|
permissions: nil,
|
|
3247
3373
|
phone_number_collection: nil,
|
|
3248
3374
|
redirect_on_completion: nil,
|
|
@@ -3301,6 +3427,7 @@ module Stripe
|
|
|
3301
3427
|
@payment_method_configuration = payment_method_configuration
|
|
3302
3428
|
@payment_method_data = payment_method_data
|
|
3303
3429
|
@payment_method_options = payment_method_options
|
|
3430
|
+
@payment_settings = payment_settings
|
|
3304
3431
|
@permissions = permissions
|
|
3305
3432
|
@phone_number_collection = phone_number_collection
|
|
3306
3433
|
@redirect_on_completion = redirect_on_completion
|
|
@@ -3352,6 +3479,18 @@ module Stripe
|
|
|
3352
3479
|
fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } },
|
|
3353
3480
|
},
|
|
3354
3481
|
},
|
|
3482
|
+
payment_settings: {
|
|
3483
|
+
kind: :object,
|
|
3484
|
+
fields: {
|
|
3485
|
+
application_fee_data: { kind: :object, fields: { percentage_decimal: :decimal_string } },
|
|
3486
|
+
transfer_data: {
|
|
3487
|
+
kind: :object,
|
|
3488
|
+
fields: {
|
|
3489
|
+
transfer_amount: { kind: :object, fields: { percentage_decimal: :decimal_string } },
|
|
3490
|
+
},
|
|
3491
|
+
},
|
|
3492
|
+
},
|
|
3493
|
+
},
|
|
3355
3494
|
}
|
|
3356
3495
|
end
|
|
3357
3496
|
end
|
|
@@ -314,6 +314,7 @@ module Stripe
|
|
|
314
314
|
#
|
|
315
315
|
# When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
|
|
316
316
|
#
|
|
317
|
+
# You must wrap any Checkout Session update that mutates `setup_future_usage` in [`runServerUpdate`](/js/custom_checkout/run_server_update) and await it before continuing with the payment.
|
|
317
318
|
# Pass an empty string to remove a previously supplied configuration.
|
|
318
319
|
attr_accessor :setup_future_usage
|
|
319
320
|
# Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
|
|
@@ -346,7 +346,7 @@ module Stripe
|
|
|
346
346
|
class Pix < ::Stripe::RequestParams
|
|
347
347
|
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
348
348
|
attr_accessor :amount_includes_iof
|
|
349
|
-
# The number of seconds (between
|
|
349
|
+
# The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours).
|
|
350
350
|
attr_accessor :expires_after_seconds
|
|
351
351
|
|
|
352
352
|
def initialize(amount_includes_iof: nil, expires_after_seconds: nil)
|
|
@@ -325,7 +325,7 @@ module Stripe
|
|
|
325
325
|
class Pix < ::Stripe::RequestParams
|
|
326
326
|
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
|
327
327
|
attr_accessor :amount_includes_iof
|
|
328
|
-
# The number of seconds (between
|
|
328
|
+
# The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours).
|
|
329
329
|
attr_accessor :expires_after_seconds
|
|
330
330
|
|
|
331
331
|
def initialize(amount_includes_iof: nil, expires_after_seconds: nil)
|
|
@@ -29,14 +29,26 @@ module Stripe
|
|
|
29
29
|
@network_decline_code = network_decline_code
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
|
+
|
|
33
|
+
class UsBankAccount < ::Stripe::RequestParams
|
|
34
|
+
# NACHA ACH return code for a failed US bank account payment.
|
|
35
|
+
attr_accessor :return_code
|
|
36
|
+
|
|
37
|
+
def initialize(return_code: nil)
|
|
38
|
+
@return_code = return_code
|
|
39
|
+
end
|
|
40
|
+
end
|
|
32
41
|
# Information about the card payment method used to make this payment.
|
|
33
42
|
attr_accessor :card
|
|
34
43
|
# The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type.
|
|
35
44
|
attr_accessor :type
|
|
45
|
+
# Details about the US bank account payment method.
|
|
46
|
+
attr_accessor :us_bank_account
|
|
36
47
|
|
|
37
|
-
def initialize(card: nil, type: nil)
|
|
48
|
+
def initialize(card: nil, type: nil, us_bank_account: nil)
|
|
38
49
|
@card = card
|
|
39
50
|
@type = type
|
|
51
|
+
@us_bank_account = us_bank_account
|
|
40
52
|
end
|
|
41
53
|
end
|
|
42
54
|
|