stripe 19.2.0.pre.beta.1 → 19.2.0.pre.beta.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_requestor.rb +2 -0
- data/lib/stripe/errors.rb +24 -0
- data/lib/stripe/event_types.rb +57 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_failed_event.rb +44 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_processing_event.rb +44 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_with_errors_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_created_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_failed_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_updated_event.rb +44 -0
- data/lib/stripe/events/v2_extend_workflow_run_failed_event.rb +75 -0
- data/lib/stripe/events/v2_extend_workflow_run_started_event.rb +44 -0
- data/lib/stripe/events/v2_extend_workflow_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +2 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_confirmed_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_created_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_partially_confirmed_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_terminated_event.rb +97 -0
- data/lib/stripe/object_types.rb +7 -0
- data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +3 -3
- data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +4 -4
- data/lib/stripe/params/v2/billing/cadence_create_params.rb +16 -16
- data/lib/stripe/params/v2/billing/cadence_update_params.rb +5 -5
- data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +6 -3
- data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +7 -4
- data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +2 -2
- data/lib/stripe/params/v2/billing/profile_list_params.rb +1 -1
- data/lib/stripe/params/v2/commerce/product_catalog/import_create_params.rb +25 -0
- data/lib/stripe/params/v2/commerce/product_catalog/import_list_params.rb +54 -0
- data/lib/stripe/params/v2/commerce/product_catalog/import_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/batch_job_create_params.rb +1 -1
- data/lib/stripe/params/v2/data/reporting/query_run_create_params.rb +31 -0
- data/lib/stripe/params/v2/data/reporting/query_run_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/extend/workflow_invoke_params.rb +17 -0
- data/lib/stripe/params/v2/extend/workflow_list_params.rb +21 -0
- data/lib/stripe/params/v2/extend/workflow_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/extend/workflow_run_list_params.rb +23 -0
- data/lib/stripe/params/v2/extend/workflow_run_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/iam/activity_log_list_params.rb +23 -0
- data/lib/stripe/params/v2/network/business_profile_me_params.rb +10 -0
- data/lib/stripe/params/v2/network/business_profile_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_confirm_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_create_params.rb +17 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_list_params.rb +20 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_terminate_params.rb +10 -0
- data/lib/stripe/params.rb +18 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +5 -5
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +3 -3
- data/lib/stripe/resources/v2/billing/cadence.rb +32 -10
- data/lib/stripe/resources/v2/billing/collection_setting.rb +27 -5
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +25 -3
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +3 -3
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +3 -3
- data/lib/stripe/resources/v2/commerce/product_catalog_import.rb +274 -0
- data/lib/stripe/resources/v2/core/batch_job.rb +21 -21
- data/lib/stripe/resources/v2/data/reporting/query_run.rb +142 -0
- data/lib/stripe/resources/v2/extend/workflow.rb +80 -0
- data/lib/stripe/resources/v2/extend/workflow_run.rb +158 -0
- data/lib/stripe/resources/v2/iam/activity_log.rb +187 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +33 -0
- data/lib/stripe/resources/v2/network/business_profile.rb +84 -0
- data/lib/stripe/resources/v2/orchestrated_commerce/agreement.rb +93 -0
- data/lib/stripe/resources.rb +22 -0
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -1
- data/lib/stripe/services/v2/commerce/product_catalog/import_service.rb +45 -0
- data/lib/stripe/services/v2/commerce/product_catalog_service.rb +17 -0
- data/lib/stripe/services/v2/commerce_service.rb +15 -0
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
- data/lib/stripe/services/v2/data/reporting/query_run_service.rb +35 -0
- data/lib/stripe/services/v2/data/reporting_service.rb +17 -0
- data/lib/stripe/services/v2/datum_service.rb +15 -0
- data/lib/stripe/services/v2/extend/workflow_run_service.rb +32 -0
- data/lib/stripe/services/v2/extend/workflow_service.rb +45 -0
- data/lib/stripe/services/v2/extend_service.rb +16 -0
- data/lib/stripe/services/v2/iam/activity_log_service.rb +21 -0
- data/lib/stripe/services/v2/iam_service.rb +15 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +1 -0
- data/lib/stripe/services/v2/network/business_profile_service.rb +32 -0
- data/lib/stripe/services/v2/network_service.rb +15 -0
- data/lib/stripe/services/v2/orchestrated_commerce/agreement_service.rb +65 -0
- data/lib/stripe/services/v2/orchestrated_commerce_service.rb +15 -0
- data/lib/stripe/services/v2_services.rb +7 -1
- data/lib/stripe/services.rb +15 -0
- data/lib/stripe/stripe_event_notification_handler.rb +90 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +1715 -113
- metadata +56 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 77a49af6b0c719362fe15a8161741b6c199526d43c257ad970d08896da44a440
|
|
4
|
+
data.tar.gz: ecfc17d7a9ed00a9cce52fc11fcdedcaf2a4ecba88a479a26e0ee8def713ab18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f68341f16e26c7e59d601ad47cb9da429c8f5af9e709abbe7067a3f4b86957bd314b429249131142f3077bc25810a6bb38c38b0cd3cf96f2a3cbc80b40719395
|
|
7
|
+
data.tar.gz: f33c1a3d8d0acd00de6d13c29745650126d438c93d160036104916f9a22e65c4223c635871bc0690a9c6d3d8bc8905aecea03e9a90feab6af87dd2b79d7d600d
|
data/lib/stripe/api_requestor.rb
CHANGED
|
@@ -859,6 +859,8 @@ module Stripe
|
|
|
859
859
|
AlreadyExistsError.new(error_data[:message], **opts)
|
|
860
860
|
when "blocked_by_stripe"
|
|
861
861
|
BlockedByStripeError.new(error_data[:message], **opts)
|
|
862
|
+
when "cannot_proceed"
|
|
863
|
+
CannotProceedError.new(error_data[:message], **opts, reason: error_data[:reason])
|
|
862
864
|
when "controlled_by_alternate_resource"
|
|
863
865
|
ControlledByAlternateResourceError.new(error_data[:message], **opts)
|
|
864
866
|
when "controlled_by_dashboard"
|
data/lib/stripe/errors.rb
CHANGED
|
@@ -171,6 +171,30 @@ module Stripe
|
|
|
171
171
|
class BlockedByStripeError < StripeError
|
|
172
172
|
end
|
|
173
173
|
|
|
174
|
+
class CannotProceedError < StripeError
|
|
175
|
+
attr_reader :reason
|
|
176
|
+
|
|
177
|
+
def initialize(
|
|
178
|
+
message = nil,
|
|
179
|
+
http_body: nil,
|
|
180
|
+
http_status: nil,
|
|
181
|
+
json_body: nil,
|
|
182
|
+
http_headers: nil,
|
|
183
|
+
code: nil,
|
|
184
|
+
reason: nil
|
|
185
|
+
)
|
|
186
|
+
super(
|
|
187
|
+
message,
|
|
188
|
+
http_body: http_body,
|
|
189
|
+
http_status: http_status,
|
|
190
|
+
json_body: json_body,
|
|
191
|
+
http_headers: http_headers,
|
|
192
|
+
code: code,
|
|
193
|
+
)
|
|
194
|
+
@reason = reason
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
174
198
|
class ControlledByAlternateResourceError < StripeError
|
|
175
199
|
end
|
|
176
200
|
|
data/lib/stripe/event_types.rb
CHANGED
|
@@ -8,6 +8,14 @@ module Stripe
|
|
|
8
8
|
Events::V1BillingMeterErrorReportTriggeredEvent.lookup_type =>
|
|
9
9
|
Events::V1BillingMeterErrorReportTriggeredEvent,
|
|
10
10
|
Events::V1BillingMeterNoMeterFoundEvent.lookup_type => Events::V1BillingMeterNoMeterFoundEvent,
|
|
11
|
+
Events::V2CommerceProductCatalogImportsFailedEvent.lookup_type =>
|
|
12
|
+
Events::V2CommerceProductCatalogImportsFailedEvent,
|
|
13
|
+
Events::V2CommerceProductCatalogImportsProcessingEvent.lookup_type =>
|
|
14
|
+
Events::V2CommerceProductCatalogImportsProcessingEvent,
|
|
15
|
+
Events::V2CommerceProductCatalogImportsSucceededEvent.lookup_type =>
|
|
16
|
+
Events::V2CommerceProductCatalogImportsSucceededEvent,
|
|
17
|
+
Events::V2CommerceProductCatalogImportsSucceededWithErrorsEvent.lookup_type =>
|
|
18
|
+
Events::V2CommerceProductCatalogImportsSucceededWithErrorsEvent,
|
|
11
19
|
Events::V2CoreAccountClosedEvent.lookup_type => Events::V2CoreAccountClosedEvent,
|
|
12
20
|
Events::V2CoreAccountCreatedEvent.lookup_type => Events::V2CoreAccountCreatedEvent,
|
|
13
21
|
Events::V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.lookup_type =>
|
|
@@ -53,6 +61,17 @@ module Stripe
|
|
|
53
61
|
Events::V2CoreEventDestinationPingEvent.lookup_type => Events::V2CoreEventDestinationPingEvent,
|
|
54
62
|
Events::V2CoreHealthEventGenerationFailureResolvedEvent.lookup_type =>
|
|
55
63
|
Events::V2CoreHealthEventGenerationFailureResolvedEvent,
|
|
64
|
+
Events::V2DataReportingQueryRunCreatedEvent.lookup_type =>
|
|
65
|
+
Events::V2DataReportingQueryRunCreatedEvent,
|
|
66
|
+
Events::V2DataReportingQueryRunFailedEvent.lookup_type =>
|
|
67
|
+
Events::V2DataReportingQueryRunFailedEvent,
|
|
68
|
+
Events::V2DataReportingQueryRunSucceededEvent.lookup_type =>
|
|
69
|
+
Events::V2DataReportingQueryRunSucceededEvent,
|
|
70
|
+
Events::V2DataReportingQueryRunUpdatedEvent.lookup_type =>
|
|
71
|
+
Events::V2DataReportingQueryRunUpdatedEvent,
|
|
72
|
+
Events::V2ExtendWorkflowRunFailedEvent.lookup_type => Events::V2ExtendWorkflowRunFailedEvent,
|
|
73
|
+
Events::V2ExtendWorkflowRunStartedEvent.lookup_type => Events::V2ExtendWorkflowRunStartedEvent,
|
|
74
|
+
Events::V2ExtendWorkflowRunSucceededEvent.lookup_type => Events::V2ExtendWorkflowRunSucceededEvent,
|
|
56
75
|
Events::V2MoneyManagementAdjustmentCreatedEvent.lookup_type =>
|
|
57
76
|
Events::V2MoneyManagementAdjustmentCreatedEvent,
|
|
58
77
|
Events::V2MoneyManagementFinancialAccountCreatedEvent.lookup_type =>
|
|
@@ -125,6 +144,14 @@ module Stripe
|
|
|
125
144
|
Events::V2MoneyManagementTransactionCreatedEvent,
|
|
126
145
|
Events::V2MoneyManagementTransactionUpdatedEvent.lookup_type =>
|
|
127
146
|
Events::V2MoneyManagementTransactionUpdatedEvent,
|
|
147
|
+
Events::V2OrchestratedCommerceAgreementConfirmedEvent.lookup_type =>
|
|
148
|
+
Events::V2OrchestratedCommerceAgreementConfirmedEvent,
|
|
149
|
+
Events::V2OrchestratedCommerceAgreementCreatedEvent.lookup_type =>
|
|
150
|
+
Events::V2OrchestratedCommerceAgreementCreatedEvent,
|
|
151
|
+
Events::V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.lookup_type =>
|
|
152
|
+
Events::V2OrchestratedCommerceAgreementPartiallyConfirmedEvent,
|
|
153
|
+
Events::V2OrchestratedCommerceAgreementTerminatedEvent.lookup_type =>
|
|
154
|
+
Events::V2OrchestratedCommerceAgreementTerminatedEvent,
|
|
128
155
|
# v2 event types: The end of the section generated from our OpenAPI spec
|
|
129
156
|
}
|
|
130
157
|
end
|
|
@@ -136,6 +163,14 @@ module Stripe
|
|
|
136
163
|
Events::V1BillingMeterErrorReportTriggeredEventNotification,
|
|
137
164
|
Events::V1BillingMeterNoMeterFoundEventNotification.lookup_type =>
|
|
138
165
|
Events::V1BillingMeterNoMeterFoundEventNotification,
|
|
166
|
+
Events::V2CommerceProductCatalogImportsFailedEventNotification.lookup_type =>
|
|
167
|
+
Events::V2CommerceProductCatalogImportsFailedEventNotification,
|
|
168
|
+
Events::V2CommerceProductCatalogImportsProcessingEventNotification.lookup_type =>
|
|
169
|
+
Events::V2CommerceProductCatalogImportsProcessingEventNotification,
|
|
170
|
+
Events::V2CommerceProductCatalogImportsSucceededEventNotification.lookup_type =>
|
|
171
|
+
Events::V2CommerceProductCatalogImportsSucceededEventNotification,
|
|
172
|
+
Events::V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.lookup_type =>
|
|
173
|
+
Events::V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification,
|
|
139
174
|
Events::V2CoreAccountClosedEventNotification.lookup_type =>
|
|
140
175
|
Events::V2CoreAccountClosedEventNotification,
|
|
141
176
|
Events::V2CoreAccountCreatedEventNotification.lookup_type =>
|
|
@@ -198,6 +233,20 @@ module Stripe
|
|
|
198
233
|
Events::V2CoreEventDestinationPingEventNotification,
|
|
199
234
|
Events::V2CoreHealthEventGenerationFailureResolvedEventNotification.lookup_type =>
|
|
200
235
|
Events::V2CoreHealthEventGenerationFailureResolvedEventNotification,
|
|
236
|
+
Events::V2DataReportingQueryRunCreatedEventNotification.lookup_type =>
|
|
237
|
+
Events::V2DataReportingQueryRunCreatedEventNotification,
|
|
238
|
+
Events::V2DataReportingQueryRunFailedEventNotification.lookup_type =>
|
|
239
|
+
Events::V2DataReportingQueryRunFailedEventNotification,
|
|
240
|
+
Events::V2DataReportingQueryRunSucceededEventNotification.lookup_type =>
|
|
241
|
+
Events::V2DataReportingQueryRunSucceededEventNotification,
|
|
242
|
+
Events::V2DataReportingQueryRunUpdatedEventNotification.lookup_type =>
|
|
243
|
+
Events::V2DataReportingQueryRunUpdatedEventNotification,
|
|
244
|
+
Events::V2ExtendWorkflowRunFailedEventNotification.lookup_type =>
|
|
245
|
+
Events::V2ExtendWorkflowRunFailedEventNotification,
|
|
246
|
+
Events::V2ExtendWorkflowRunStartedEventNotification.lookup_type =>
|
|
247
|
+
Events::V2ExtendWorkflowRunStartedEventNotification,
|
|
248
|
+
Events::V2ExtendWorkflowRunSucceededEventNotification.lookup_type =>
|
|
249
|
+
Events::V2ExtendWorkflowRunSucceededEventNotification,
|
|
201
250
|
Events::V2MoneyManagementAdjustmentCreatedEventNotification.lookup_type =>
|
|
202
251
|
Events::V2MoneyManagementAdjustmentCreatedEventNotification,
|
|
203
252
|
Events::V2MoneyManagementFinancialAccountCreatedEventNotification.lookup_type =>
|
|
@@ -270,6 +319,14 @@ module Stripe
|
|
|
270
319
|
Events::V2MoneyManagementTransactionCreatedEventNotification,
|
|
271
320
|
Events::V2MoneyManagementTransactionUpdatedEventNotification.lookup_type =>
|
|
272
321
|
Events::V2MoneyManagementTransactionUpdatedEventNotification,
|
|
322
|
+
Events::V2OrchestratedCommerceAgreementConfirmedEventNotification.lookup_type =>
|
|
323
|
+
Events::V2OrchestratedCommerceAgreementConfirmedEventNotification,
|
|
324
|
+
Events::V2OrchestratedCommerceAgreementCreatedEventNotification.lookup_type =>
|
|
325
|
+
Events::V2OrchestratedCommerceAgreementCreatedEventNotification,
|
|
326
|
+
Events::V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.lookup_type =>
|
|
327
|
+
Events::V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification,
|
|
328
|
+
Events::V2OrchestratedCommerceAgreementTerminatedEventNotification.lookup_type =>
|
|
329
|
+
Events::V2OrchestratedCommerceAgreementTerminatedEventNotification,
|
|
273
330
|
# event notification types: The end of the section generated from our OpenAPI spec
|
|
274
331
|
}
|
|
275
332
|
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 product catalog import cannot be processed or if processing fails unexpectedly.
|
|
7
|
+
class V2CommerceProductCatalogImportsFailedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.commerce.product_catalog.imports.failed"
|
|
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 product catalog import cannot be processed or if processing fails unexpectedly.
|
|
25
|
+
class V2CommerceProductCatalogImportsFailedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.commerce.product_catalog.imports.failed"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the ProductCatalogImport 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 product catalog import file has been uploaded and has started processing.
|
|
7
|
+
class V2CommerceProductCatalogImportsProcessingEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.commerce.product_catalog.imports.processing"
|
|
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 product catalog import file has been uploaded and has started processing.
|
|
25
|
+
class V2CommerceProductCatalogImportsProcessingEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.commerce.product_catalog.imports.processing"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the ProductCatalogImport 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 product catalog file has been uploaded successfully and passed validation.
|
|
7
|
+
class V2CommerceProductCatalogImportsSucceededEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.commerce.product_catalog.imports.succeeded"
|
|
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 product catalog file has been uploaded successfully and passed validation.
|
|
25
|
+
class V2CommerceProductCatalogImportsSucceededEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.commerce.product_catalog.imports.succeeded"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the ProductCatalogImport 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 product catalog file has been successfully processed but some rows failed validation.
|
|
7
|
+
class V2CommerceProductCatalogImportsSucceededWithErrorsEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.commerce.product_catalog.imports.succeeded_with_errors"
|
|
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 product catalog file has been successfully processed but some rows failed validation.
|
|
25
|
+
class V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.commerce.product_catalog.imports.succeeded_with_errors"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the ProductCatalogImport 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 QueryRun is created.
|
|
7
|
+
class V2DataReportingQueryRunCreatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.data.reporting.query_run.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 QueryRun is created.
|
|
25
|
+
class V2DataReportingQueryRunCreatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.data.reporting.query_run.created"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the QueryRun 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 QueryRun has failed to complete.
|
|
7
|
+
class V2DataReportingQueryRunFailedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.data.reporting.query_run.failed"
|
|
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 QueryRun has failed to complete.
|
|
25
|
+
class V2DataReportingQueryRunFailedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.data.reporting.query_run.failed"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the QueryRun 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 QueryRun has successfully completed.
|
|
7
|
+
class V2DataReportingQueryRunSucceededEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.data.reporting.query_run.succeeded"
|
|
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 QueryRun has successfully completed.
|
|
25
|
+
class V2DataReportingQueryRunSucceededEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.data.reporting.query_run.succeeded"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the QueryRun 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 QueryRun is updated.
|
|
7
|
+
class V2DataReportingQueryRunUpdatedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.data.reporting.query_run.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 QueryRun is updated.
|
|
25
|
+
class V2DataReportingQueryRunUpdatedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.data.reporting.query_run.updated"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the QueryRun 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,75 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Events
|
|
6
|
+
# Occurs when a Workflow Run fails.
|
|
7
|
+
class V2ExtendWorkflowRunFailedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.extend.workflow_run.failed"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class V2ExtendWorkflowRunFailedEventData < ::Stripe::StripeObject
|
|
13
|
+
class FailureDetails < ::Stripe::StripeObject
|
|
14
|
+
# Optional details about the failure result.
|
|
15
|
+
attr_reader :error_message
|
|
16
|
+
|
|
17
|
+
def self.inner_class_types
|
|
18
|
+
@inner_class_types = {}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.field_remappings
|
|
22
|
+
@field_remappings = {}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
# A Stripe dashboard URL with more information about the Workflow Run failure.
|
|
26
|
+
attr_reader :dashboard_url
|
|
27
|
+
# Details about the Workflow Run's transition into the FAILED state.
|
|
28
|
+
attr_reader :failure_details
|
|
29
|
+
|
|
30
|
+
def self.inner_class_types
|
|
31
|
+
@inner_class_types = { failure_details: FailureDetails }
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.field_remappings
|
|
35
|
+
@field_remappings = {}
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.inner_class_types
|
|
40
|
+
@inner_class_types = { data: V2ExtendWorkflowRunFailedEventData }
|
|
41
|
+
end
|
|
42
|
+
attr_reader :data, :related_object
|
|
43
|
+
|
|
44
|
+
# Retrieves the related object from the API. Makes an API request on every call.
|
|
45
|
+
def fetch_related_object
|
|
46
|
+
_request(
|
|
47
|
+
method: :get,
|
|
48
|
+
path: related_object.url,
|
|
49
|
+
base_address: :api,
|
|
50
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Occurs when a Workflow Run fails.
|
|
56
|
+
class V2ExtendWorkflowRunFailedEventNotification < Stripe::V2::Core::EventNotification
|
|
57
|
+
def self.lookup_type
|
|
58
|
+
"v2.extend.workflow_run.failed"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
attr_reader :related_object
|
|
62
|
+
|
|
63
|
+
# Retrieves the WorkflowRun related to this EventNotification from the Stripe API. Makes an API request on every call.
|
|
64
|
+
def fetch_related_object
|
|
65
|
+
resp = @client.raw_request(
|
|
66
|
+
:get,
|
|
67
|
+
related_object.url,
|
|
68
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
69
|
+
usage: ["fetch_related_object"]
|
|
70
|
+
)
|
|
71
|
+
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
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 Workflow Run starts.
|
|
7
|
+
class V2ExtendWorkflowRunStartedEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.extend.workflow_run.started"
|
|
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 Workflow Run starts.
|
|
25
|
+
class V2ExtendWorkflowRunStartedEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.extend.workflow_run.started"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the WorkflowRun 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 Workflow Run succeeds.
|
|
7
|
+
class V2ExtendWorkflowRunSucceededEvent < Stripe::V2::Core::Event
|
|
8
|
+
def self.lookup_type
|
|
9
|
+
"v2.extend.workflow_run.succeeded"
|
|
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 Workflow Run succeeds.
|
|
25
|
+
class V2ExtendWorkflowRunSucceededEventNotification < Stripe::V2::Core::EventNotification
|
|
26
|
+
def self.lookup_type
|
|
27
|
+
"v2.extend.workflow_run.succeeded"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :related_object
|
|
31
|
+
|
|
32
|
+
# Retrieves the WorkflowRun 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
|