stripe 19.4.0.pre.alpha.2 → 19.4.0.pre.alpha.4
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_requestor.rb +2 -27
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/error_object.rb +48 -19
- data/lib/stripe/event_types.rb +15 -0
- data/lib/stripe/events/v2_billing_contract_activated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_ended_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +0 -1
- data/lib/stripe/params/account_create_params.rb +2 -0
- data/lib/stripe/params/account_person_create_params.rb +6 -0
- data/lib/stripe/params/account_person_update_params.rb +6 -0
- data/lib/stripe/params/account_session_create_params.rb +0 -42
- data/lib/stripe/params/account_update_params.rb +2 -0
- data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
- data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
- data/lib/stripe/params/capital/financing_transaction_list_params.rb +2 -2
- data/lib/stripe/params/checkout/session_create_params.rb +1 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +2 -2
- data/lib/stripe/params/issuing/authorization_capture_params.rb +1 -1
- data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +1 -1
- data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +1 -1
- data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +1 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +10 -1
- data/lib/stripe/params/payment_intent_create_params.rb +10 -1
- data/lib/stripe/params/payment_intent_update_params.rb +10 -1
- data/lib/stripe/params/payment_record_create_params.rb +109 -0
- data/lib/stripe/params/promotion_code_create_params.rb +1 -1
- data/lib/stripe/params/promotion_code_update_params.rb +1 -1
- data/lib/stripe/params/refund_create_params.rb +4 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +138 -2
- data/lib/stripe/params/subscription_schedule_list_params.rb +1 -1
- data/lib/stripe/params/subscription_schedule_update_params.rb +139 -3
- data/lib/stripe/params/terminal/reader_activate_gift_card_params.rb +35 -0
- data/lib/stripe/params/terminal/reader_cashout_gift_card_params.rb +21 -0
- data/lib/stripe/params/terminal/reader_check_gift_card_balance_params.rb +21 -0
- data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +4 -0
- data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +4 -0
- data/lib/stripe/params/terminal/reader_reload_gift_card_params.rb +27 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +1 -1
- data/lib/stripe/params/token_create_params.rb +8 -0
- data/lib/stripe/params/v2/billing/contract_cancel_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +13 -175
- data/lib/stripe/params/v2/billing/contract_list_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_update_params.rb +48 -495
- data/lib/stripe/params/v2/core/account_list_params.rb +9 -1
- data/lib/stripe/params/v2/data/analytics/metric_query_create_params.rb +2 -2
- data/lib/stripe/params.rb +10 -8
- data/lib/stripe/resources/account.rb +55 -3
- data/lib/stripe/resources/account_session.rb +8 -0
- data/lib/stripe/resources/balance_transaction.rb +1 -1
- data/lib/stripe/resources/bank_account.rb +2 -2
- data/lib/stripe/resources/billing/alert_recovered.rb +17 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +1 -1
- data/lib/stripe/resources/capability.rb +2 -2
- data/lib/stripe/resources/capital/financing_transaction.rb +1 -1
- data/lib/stripe/resources/charge.rb +1 -1
- data/lib/stripe/resources/checkout/session.rb +23 -5
- data/lib/stripe/resources/confirmation_token.rb +1 -1
- data/lib/stripe/resources/dispute.rb +4 -2
- data/lib/stripe/resources/financial_connections/session.rb +5 -0
- data/lib/stripe/resources/invoice.rb +4 -1
- data/lib/stripe/resources/issuing/authorization.rb +52 -1
- data/lib/stripe/resources/issuing/card.rb +2 -0
- data/lib/stripe/resources/issuing/transaction.rb +48 -2
- data/lib/stripe/resources/order.rb +1 -1
- data/lib/stripe/resources/payment_attempt_record.rb +2 -2
- data/lib/stripe/resources/payment_intent.rb +28 -0
- data/lib/stripe/resources/payment_method.rb +3 -3
- data/lib/stripe/resources/payment_record.rb +14 -2
- data/lib/stripe/resources/person.rb +2 -2
- data/lib/stripe/resources/profile.rb +14 -14
- data/lib/stripe/resources/quote.rb +22 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +4 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +169 -2
- data/lib/stripe/resources/setup_attempt.rb +16 -0
- data/lib/stripe/resources/setup_intent.rb +3 -0
- data/lib/stripe/resources/shared_payment/granted_token.rb +1 -1
- data/lib/stripe/resources/shared_payment/issued_token.rb +18 -1
- data/lib/stripe/resources/subscription_schedule.rb +169 -2
- data/lib/stripe/resources/tax/calculation.rb +1 -1
- data/lib/stripe/resources/tax/registration.rb +32 -0
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/terminal/reader.rb +173 -0
- data/lib/stripe/resources/v2/billing/contract.rb +47 -330
- data/lib/stripe/resources/v2/billing/contract_pricing_line_quantity_change.rb +2 -2
- data/lib/stripe/resources/v2/core/account.rb +18 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +16 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +30 -0
- data/lib/stripe/resources/v2/signals/account_signal.rb +4 -1
- data/lib/stripe/resources.rb +15 -2
- data/lib/stripe/services/account_person_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +1 -1
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +1 -1
- data/lib/stripe/services/payment_record_service.rb +12 -0
- data/lib/stripe/services/terminal/reader_service.rb +44 -0
- data/lib/stripe/services/v1_services.rb +1 -2
- data/lib/stripe/services/v2/billing/contract_service.rb +7 -7
- data/lib/stripe/services/v2/signals/account_signal_service.rb +1 -1
- data/lib/stripe/services.rb +0 -2
- data/lib/stripe/stripe_event_notification_handler.rb +30 -0
- data/lib/stripe/telemetry_id.rb +65 -0
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +2 -0
- data/rbi/stripe.rbi +2023 -1531
- metadata +13 -8
- data/lib/stripe/params/fr_meal_vouchers_onboarding_create_params.rb +0 -25
- data/lib/stripe/params/fr_meal_vouchers_onboarding_list_params.rb +0 -22
- data/lib/stripe/params/fr_meal_vouchers_onboarding_retrieve_params.rb +0 -13
- data/lib/stripe/params/fr_meal_vouchers_onboarding_update_params.rb +0 -16
- data/lib/stripe/resources/fr_meal_vouchers_onboarding.rb +0 -153
- data/lib/stripe/services/fr_meal_vouchers_onboarding_service.rb +0 -57
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ec34b53e2090ab7a8af3f69f574820939b0bc23f8b1a8895b0c355f96abf37a
|
|
4
|
+
data.tar.gz: 28e37f5e79fef37fc7862e32a7df4e63ab030b01d0ca2b3e8435f8f150b1f2ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ad5a74aac25aa0a128959767d31b8edfcb9acd9d44ba7f860864459c59008fa930f594577982922da4adcdbb93d897b672c08ed7c26d6ed3e7b46519d813c13
|
|
7
|
+
data.tar.gz: 3f2430afb45d077ddbbc0669d9ea29b582589cd50e7f286fe66f6e4068181649e36c6d022f4190ec97f4bb30f813c52e813a8471d14f987310475145a7189407
|
data/lib/stripe/api_requestor.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "digest"
|
|
4
3
|
require "socket"
|
|
5
4
|
require "stripe/instrumentation"
|
|
6
5
|
|
|
@@ -1106,31 +1105,6 @@ module Stripe
|
|
|
1106
1105
|
# in so that we can generate a rich user agent header to help debug
|
|
1107
1106
|
# integrations.
|
|
1108
1107
|
class SystemProfiler
|
|
1109
|
-
UNAME_HASH = begin
|
|
1110
|
-
parts = []
|
|
1111
|
-
parts << if RUBY_PLATFORM.match?(/mswin|mingw|cygwin/)
|
|
1112
|
-
begin
|
|
1113
|
-
`ver 2>NUL`.strip
|
|
1114
|
-
rescue StandardError
|
|
1115
|
-
""
|
|
1116
|
-
end
|
|
1117
|
-
else
|
|
1118
|
-
begin
|
|
1119
|
-
`uname -a 2>/dev/null`.strip
|
|
1120
|
-
rescue StandardError
|
|
1121
|
-
""
|
|
1122
|
-
end
|
|
1123
|
-
end
|
|
1124
|
-
parts << begin
|
|
1125
|
-
Socket.gethostname
|
|
1126
|
-
rescue StandardError
|
|
1127
|
-
""
|
|
1128
|
-
end
|
|
1129
|
-
Digest::MD5.hexdigest(parts.join(" "))
|
|
1130
|
-
rescue StandardError
|
|
1131
|
-
""
|
|
1132
|
-
end
|
|
1133
|
-
|
|
1134
1108
|
AI_AGENTS = [
|
|
1135
1109
|
# aiAgents: The beginning of the section generated from our OpenAPI spec
|
|
1136
1110
|
%w[ANTIGRAVITY_CLI_ALIAS antigravity],
|
|
@@ -1168,7 +1142,8 @@ module Stripe
|
|
|
1168
1142
|
|
|
1169
1143
|
if Stripe.enable_telemetry?
|
|
1170
1144
|
ua[:platform] = RUBY_PLATFORM
|
|
1171
|
-
|
|
1145
|
+
tid = TelemetryId.get
|
|
1146
|
+
ua[:telemetry_id] = tid if tid
|
|
1172
1147
|
end
|
|
1173
1148
|
|
|
1174
1149
|
ai_agent = detect_ai_agent
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/error_object.rb
CHANGED
|
@@ -11,69 +11,98 @@ module Stripe
|
|
|
11
11
|
# methods would cause users to run into `NoMethodError` exceptions and
|
|
12
12
|
# get in the way of generic error handling.
|
|
13
13
|
|
|
14
|
+
# errorFields: The beginning of the section generated from our OpenAPI spec
|
|
15
|
+
# For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one.
|
|
16
|
+
def advice_code
|
|
17
|
+
@values[:advice_code]
|
|
18
|
+
end
|
|
19
|
+
|
|
14
20
|
# For card errors, the ID of the failed charge.
|
|
15
21
|
def charge
|
|
16
22
|
@values[:charge]
|
|
17
23
|
end
|
|
18
24
|
|
|
19
|
-
# For some errors that could be handled programmatically, a short string
|
|
20
|
-
# indicating the error code reported.
|
|
25
|
+
# For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.
|
|
21
26
|
def code
|
|
22
27
|
@values[:code]
|
|
23
28
|
end
|
|
24
29
|
|
|
25
|
-
# For card errors resulting from a card issuer decline, a short string
|
|
26
|
-
# indicating the card issuer's reason for the decline if they provide one.
|
|
30
|
+
# For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://docs.stripe.com/declines#issuer-declines) if they provide one.
|
|
27
31
|
def decline_code
|
|
28
32
|
@values[:decline_code]
|
|
29
33
|
end
|
|
30
34
|
|
|
31
|
-
# A URL to more information about the error code reported.
|
|
35
|
+
# A URL to more information about the [error code](https://docs.stripe.com/error-codes) reported.
|
|
32
36
|
def doc_url
|
|
33
37
|
@values[:doc_url]
|
|
34
38
|
end
|
|
35
39
|
|
|
36
|
-
#
|
|
37
|
-
|
|
40
|
+
# The GiftCardOperation object for errors returned on a request involving a GiftCardOperation.
|
|
41
|
+
def gift_card_operation
|
|
42
|
+
@values[:gift_card_operation]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
|
|
38
46
|
def message
|
|
39
47
|
@values[:message]
|
|
40
48
|
end
|
|
41
49
|
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
# For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
|
|
51
|
+
def network_advice_code
|
|
52
|
+
@values[:network_advice_code]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
|
|
56
|
+
def network_decline_code
|
|
57
|
+
@values[:network_decline_code]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
|
|
45
61
|
def param
|
|
46
62
|
@values[:param]
|
|
47
63
|
end
|
|
48
64
|
|
|
49
|
-
# The PaymentIntent object for errors returned on a request involving a
|
|
50
|
-
# PaymentIntent.
|
|
65
|
+
# The PaymentIntent object for errors returned on a request involving a PaymentIntent.
|
|
51
66
|
def payment_intent
|
|
52
67
|
@values[:payment_intent]
|
|
53
68
|
end
|
|
54
69
|
|
|
55
|
-
# The PaymentMethod object for errors returned on a request involving a
|
|
56
|
-
# PaymentMethod.
|
|
70
|
+
# The PaymentMethod object for errors returned on a request involving a PaymentMethod.
|
|
57
71
|
def payment_method
|
|
58
72
|
@values[:payment_method]
|
|
59
73
|
end
|
|
60
74
|
|
|
61
|
-
#
|
|
62
|
-
|
|
75
|
+
# If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
|
|
76
|
+
def payment_method_type
|
|
77
|
+
@values[:payment_method_type]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# A URL to the request log entry in your dashboard.
|
|
81
|
+
def request_log_url
|
|
82
|
+
@values[:request_log_url]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# The SetupIntent object for errors returned on a request involving a SetupIntent.
|
|
63
86
|
def setup_intent
|
|
64
87
|
@values[:setup_intent]
|
|
65
88
|
end
|
|
66
89
|
|
|
67
|
-
# The
|
|
90
|
+
# The PaymentSource object for errors returned on a request involving a PaymentSource.
|
|
68
91
|
def source
|
|
69
92
|
@values[:source]
|
|
70
93
|
end
|
|
71
94
|
|
|
72
|
-
# The type of error returned. One of `api_error`, `card_error`,
|
|
73
|
-
# `idempotency_error`, or `invalid_request_error`.
|
|
95
|
+
# The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
|
|
74
96
|
def type
|
|
75
97
|
@values[:type]
|
|
76
98
|
end
|
|
99
|
+
|
|
100
|
+
# The user message associated with the error.
|
|
101
|
+
def user_message
|
|
102
|
+
@values[:user_message]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# errorFields: The end of the section generated from our OpenAPI spec
|
|
77
106
|
end
|
|
78
107
|
|
|
79
108
|
# Represents on OAuth error returned by the OAuth API.
|
data/lib/stripe/event_types.rb
CHANGED
|
@@ -282,6 +282,11 @@ module Stripe
|
|
|
282
282
|
Events::V2BillingCadenceBilledEvent.lookup_type => Events::V2BillingCadenceBilledEvent,
|
|
283
283
|
Events::V2BillingCadenceCanceledEvent.lookup_type => Events::V2BillingCadenceCanceledEvent,
|
|
284
284
|
Events::V2BillingCadenceCreatedEvent.lookup_type => Events::V2BillingCadenceCreatedEvent,
|
|
285
|
+
Events::V2BillingContractActivatedEvent.lookup_type => Events::V2BillingContractActivatedEvent,
|
|
286
|
+
Events::V2BillingContractCanceledEvent.lookup_type => Events::V2BillingContractCanceledEvent,
|
|
287
|
+
Events::V2BillingContractCreatedEvent.lookup_type => Events::V2BillingContractCreatedEvent,
|
|
288
|
+
Events::V2BillingContractEndedEvent.lookup_type => Events::V2BillingContractEndedEvent,
|
|
289
|
+
Events::V2BillingContractUpdatedEvent.lookup_type => Events::V2BillingContractUpdatedEvent,
|
|
285
290
|
Events::V2BillingLicenseFeeCreatedEvent.lookup_type => Events::V2BillingLicenseFeeCreatedEvent,
|
|
286
291
|
Events::V2BillingLicenseFeeUpdatedEvent.lookup_type => Events::V2BillingLicenseFeeUpdatedEvent,
|
|
287
292
|
Events::V2BillingLicenseFeeVersionCreatedEvent.lookup_type =>
|
|
@@ -1013,6 +1018,16 @@ module Stripe
|
|
|
1013
1018
|
Events::V2BillingCadenceCanceledEventNotification,
|
|
1014
1019
|
Events::V2BillingCadenceCreatedEventNotification.lookup_type =>
|
|
1015
1020
|
Events::V2BillingCadenceCreatedEventNotification,
|
|
1021
|
+
Events::V2BillingContractActivatedEventNotification.lookup_type =>
|
|
1022
|
+
Events::V2BillingContractActivatedEventNotification,
|
|
1023
|
+
Events::V2BillingContractCanceledEventNotification.lookup_type =>
|
|
1024
|
+
Events::V2BillingContractCanceledEventNotification,
|
|
1025
|
+
Events::V2BillingContractCreatedEventNotification.lookup_type =>
|
|
1026
|
+
Events::V2BillingContractCreatedEventNotification,
|
|
1027
|
+
Events::V2BillingContractEndedEventNotification.lookup_type =>
|
|
1028
|
+
Events::V2BillingContractEndedEventNotification,
|
|
1029
|
+
Events::V2BillingContractUpdatedEventNotification.lookup_type =>
|
|
1030
|
+
Events::V2BillingContractUpdatedEventNotification,
|
|
1016
1031
|
Events::V2BillingLicenseFeeCreatedEventNotification.lookup_type =>
|
|
1017
1032
|
Events::V2BillingLicenseFeeCreatedEventNotification,
|
|
1018
1033
|
Events::V2BillingLicenseFeeUpdatedEventNotification.lookup_type =>
|
|
@@ -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 Contract transitions from Draft to Active.
|
|
7
|
+
class V2BillingContractActivatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.billing.contract.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 a Contract transitions from Draft to Active.
|
|
25
|
+
class V2BillingContractActivatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.billing.contract.activated"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the Contract 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 a Contract transitions to canceled.
|
|
7
|
+
class V2BillingContractCanceledEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.billing.contract.canceled"
|
|
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 Contract transitions to canceled.
|
|
25
|
+
class V2BillingContractCanceledEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.billing.contract.canceled"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the Contract 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 a Contract is created.
|
|
7
|
+
class V2BillingContractCreatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.billing.contract.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 a Contract is created.
|
|
25
|
+
class V2BillingContractCreatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.billing.contract.created"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the Contract 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 a Contract reaches the end of all its Pricing Lines and transitions to ended.
|
|
7
|
+
class V2BillingContractEndedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.billing.contract.ended"
|
|
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 Contract reaches the end of all its Pricing Lines and transitions to ended.
|
|
25
|
+
class V2BillingContractEndedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.billing.contract.ended"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the Contract 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 a Contract is updated.
|
|
7
|
+
class V2BillingContractUpdatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.billing.contract.updated"
|
|
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 Contract is updated.
|
|
25
|
+
class V2BillingContractUpdatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.billing.contract.updated"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the Contract 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
|
data/lib/stripe/object_types.rb
CHANGED
|
@@ -90,7 +90,6 @@ module Stripe
|
|
|
90
90
|
FinancialConnections::Session.object_name => FinancialConnections::Session,
|
|
91
91
|
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
|
|
92
92
|
Forwarding::Request.object_name => Forwarding::Request,
|
|
93
|
-
FrMealVouchersOnboarding.object_name => FrMealVouchersOnboarding,
|
|
94
93
|
FundingInstructions.object_name => FundingInstructions,
|
|
95
94
|
FxQuote.object_name => FxQuote,
|
|
96
95
|
GiftCard.object_name => GiftCard,
|
|
@@ -1508,6 +1508,8 @@ module Stripe
|
|
|
1508
1508
|
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
|
|
1509
1509
|
attr_accessor :structure
|
|
1510
1510
|
# The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
|
|
1511
|
+
#
|
|
1512
|
+
# Changing this value requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
1511
1513
|
attr_accessor :tax_id
|
|
1512
1514
|
# The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
|
|
1513
1515
|
attr_accessor :tax_id_registrar
|
|
@@ -388,8 +388,12 @@ module Stripe
|
|
|
388
388
|
# The person's gender (International regulations require either "male" or "female").
|
|
389
389
|
attr_accessor :gender
|
|
390
390
|
# The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
|
|
391
|
+
#
|
|
392
|
+
# Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
391
393
|
attr_accessor :id_number
|
|
392
394
|
# The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
|
|
395
|
+
#
|
|
396
|
+
# Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
393
397
|
attr_accessor :id_number_secondary
|
|
394
398
|
# The person's last name.
|
|
395
399
|
attr_accessor :last_name
|
|
@@ -418,6 +422,8 @@ module Stripe
|
|
|
418
422
|
# The credit applicant's self-reported monthly housing payment in minor units.
|
|
419
423
|
attr_accessor :self_reported_monthly_housing_payment
|
|
420
424
|
# The last four digits of the person's Social Security number (U.S. only).
|
|
425
|
+
#
|
|
426
|
+
# Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
421
427
|
attr_accessor :ssn_last_4
|
|
422
428
|
# Demographic data related to the person.
|
|
423
429
|
attr_accessor :us_cfpb_data
|
|
@@ -388,8 +388,12 @@ module Stripe
|
|
|
388
388
|
# The person's gender (International regulations require either "male" or "female").
|
|
389
389
|
attr_accessor :gender
|
|
390
390
|
# The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
|
|
391
|
+
#
|
|
392
|
+
# Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
391
393
|
attr_accessor :id_number
|
|
392
394
|
# The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
|
|
395
|
+
#
|
|
396
|
+
# Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
393
397
|
attr_accessor :id_number_secondary
|
|
394
398
|
# The person's last name.
|
|
395
399
|
attr_accessor :last_name
|
|
@@ -418,6 +422,8 @@ module Stripe
|
|
|
418
422
|
# The credit applicant's self-reported monthly housing payment in minor units.
|
|
419
423
|
attr_accessor :self_reported_monthly_housing_payment
|
|
420
424
|
# The last four digits of the person's Social Security number (U.S. only).
|
|
425
|
+
#
|
|
426
|
+
# Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
421
427
|
attr_accessor :ssn_last_4
|
|
422
428
|
# Demographic data related to the person.
|
|
423
429
|
attr_accessor :us_cfpb_data
|
|
@@ -340,26 +340,6 @@ module Stripe
|
|
|
340
340
|
end
|
|
341
341
|
end
|
|
342
342
|
|
|
343
|
-
class FinancialAccounts < ::Stripe::RequestParams
|
|
344
|
-
class Features < ::Stripe::RequestParams; end
|
|
345
|
-
# Attribute for param field features
|
|
346
|
-
attr_accessor :features
|
|
347
|
-
|
|
348
|
-
def initialize(features: nil)
|
|
349
|
-
@features = features
|
|
350
|
-
end
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
class FinancialAccountsTransactions < ::Stripe::RequestParams
|
|
354
|
-
class Features < ::Stripe::RequestParams; end
|
|
355
|
-
# Attribute for param field features
|
|
356
|
-
attr_accessor :features
|
|
357
|
-
|
|
358
|
-
def initialize(features: nil)
|
|
359
|
-
@features = features
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
|
-
|
|
363
343
|
class InstantPayoutsPromotion < ::Stripe::RequestParams
|
|
364
344
|
class Features < ::Stripe::RequestParams
|
|
365
345
|
# Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
|
|
@@ -706,16 +686,6 @@ module Stripe
|
|
|
706
686
|
end
|
|
707
687
|
end
|
|
708
688
|
|
|
709
|
-
class RecipientsList < ::Stripe::RequestParams
|
|
710
|
-
class Features < ::Stripe::RequestParams; end
|
|
711
|
-
# Attribute for param field features
|
|
712
|
-
attr_accessor :features
|
|
713
|
-
|
|
714
|
-
def initialize(features: nil)
|
|
715
|
-
@features = features
|
|
716
|
-
end
|
|
717
|
-
end
|
|
718
|
-
|
|
719
689
|
class ReportingChart < ::Stripe::RequestParams
|
|
720
690
|
class Features < ::Stripe::RequestParams; end
|
|
721
691
|
# Whether the embedded component is enabled.
|
|
@@ -827,10 +797,6 @@ module Stripe
|
|
|
827
797
|
attr_accessor :financial_account
|
|
828
798
|
# Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component.
|
|
829
799
|
attr_accessor :financial_account_transactions
|
|
830
|
-
# Configuration for the [financial accounts](/connect/supported-embedded-components/financial-accounts/) embedded component.
|
|
831
|
-
attr_accessor :financial_accounts
|
|
832
|
-
# Configuration for the [financial accounts transactions](/connect/supported-embedded-components/financial-accounts-transactions/) embedded component.
|
|
833
|
-
attr_accessor :financial_accounts_transactions
|
|
834
800
|
# Configuration for the [instant payouts promotion](/connect/supported-embedded-components/instant-payouts-promotion/) embedded component.
|
|
835
801
|
attr_accessor :instant_payouts_promotion
|
|
836
802
|
# Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component.
|
|
@@ -859,8 +825,6 @@ module Stripe
|
|
|
859
825
|
attr_accessor :product_tax_code_selector
|
|
860
826
|
# Configuration for the [recipients](/connect/supported-embedded-components/recipients/) embedded component.
|
|
861
827
|
attr_accessor :recipients
|
|
862
|
-
# Configuration for the [recipients list](/connect/supported-embedded-components/recipients-list/) embedded component.
|
|
863
|
-
attr_accessor :recipients_list
|
|
864
828
|
# Configuration for the [reporting chart](/connect/supported-embedded-components/reporting-chart/) embedded component.
|
|
865
829
|
attr_accessor :reporting_chart
|
|
866
830
|
# Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component.
|
|
@@ -892,8 +856,6 @@ module Stripe
|
|
|
892
856
|
export_tax_transactions: nil,
|
|
893
857
|
financial_account: nil,
|
|
894
858
|
financial_account_transactions: nil,
|
|
895
|
-
financial_accounts: nil,
|
|
896
|
-
financial_accounts_transactions: nil,
|
|
897
859
|
instant_payouts_promotion: nil,
|
|
898
860
|
issuing_card: nil,
|
|
899
861
|
issuing_cards_list: nil,
|
|
@@ -908,7 +870,6 @@ module Stripe
|
|
|
908
870
|
payouts_list: nil,
|
|
909
871
|
product_tax_code_selector: nil,
|
|
910
872
|
recipients: nil,
|
|
911
|
-
recipients_list: nil,
|
|
912
873
|
reporting_chart: nil,
|
|
913
874
|
tax_registrations: nil,
|
|
914
875
|
tax_settings: nil,
|
|
@@ -933,8 +894,6 @@ module Stripe
|
|
|
933
894
|
@export_tax_transactions = export_tax_transactions
|
|
934
895
|
@financial_account = financial_account
|
|
935
896
|
@financial_account_transactions = financial_account_transactions
|
|
936
|
-
@financial_accounts = financial_accounts
|
|
937
|
-
@financial_accounts_transactions = financial_accounts_transactions
|
|
938
897
|
@instant_payouts_promotion = instant_payouts_promotion
|
|
939
898
|
@issuing_card = issuing_card
|
|
940
899
|
@issuing_cards_list = issuing_cards_list
|
|
@@ -949,7 +908,6 @@ module Stripe
|
|
|
949
908
|
@payouts_list = payouts_list
|
|
950
909
|
@product_tax_code_selector = product_tax_code_selector
|
|
951
910
|
@recipients = recipients
|
|
952
|
-
@recipients_list = recipients_list
|
|
953
911
|
@reporting_chart = reporting_chart
|
|
954
912
|
@tax_registrations = tax_registrations
|
|
955
913
|
@tax_settings = tax_settings
|
|
@@ -1508,6 +1508,8 @@ module Stripe
|
|
|
1508
1508
|
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
|
|
1509
1509
|
attr_accessor :structure
|
|
1510
1510
|
# The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
|
|
1511
|
+
#
|
|
1512
|
+
# Changing this value requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
|
|
1511
1513
|
attr_accessor :tax_id
|
|
1512
1514
|
# The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
|
|
1513
1515
|
attr_accessor :tax_id_registrar
|
|
@@ -197,7 +197,7 @@ module Stripe
|
|
|
197
197
|
end
|
|
198
198
|
# The business information shown to customers in the portal.
|
|
199
199
|
attr_accessor :business_profile
|
|
200
|
-
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [
|
|
200
|
+
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overridden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
|
|
201
201
|
attr_accessor :default_return_url
|
|
202
202
|
# Specifies which fields in the response should be expanded.
|
|
203
203
|
attr_accessor :expand
|
|
@@ -201,7 +201,7 @@ module Stripe
|
|
|
201
201
|
attr_accessor :active
|
|
202
202
|
# The business information shown to customers in the portal.
|
|
203
203
|
attr_accessor :business_profile
|
|
204
|
-
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [
|
|
204
|
+
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overridden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
|
|
205
205
|
attr_accessor :default_return_url
|
|
206
206
|
# Specifies which fields in the response should be expanded.
|
|
207
207
|
attr_accessor :expand
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module Capital
|
|
6
6
|
class FinancingTransactionListParams < ::Stripe::RequestParams
|
|
7
|
-
# For transactions of type `
|
|
7
|
+
# For transactions of type `payment` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge.
|
|
8
8
|
attr_accessor :charge
|
|
9
9
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
|
10
10
|
attr_accessor :ending_before
|
|
@@ -18,7 +18,7 @@ module Stripe
|
|
|
18
18
|
attr_accessor :reversed_transaction
|
|
19
19
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
|
20
20
|
attr_accessor :starting_after
|
|
21
|
-
# For transactions of type `
|
|
21
|
+
# For transactions of type `payment` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction.
|
|
22
22
|
attr_accessor :treasury_transaction
|
|
23
23
|
|
|
24
24
|
def initialize(
|