Class: Stripe::StripeEventNotificationHandlerBase
- Inherits:
-
Object
- Object
- Stripe::StripeEventNotificationHandlerBase
show all
- Defined in:
- lib/stripe/stripe_event_notification_handler.rb
Overview
Shared internal registration and dispatch machinery for the two user-facing event handlers.
Instance Method Summary
collapse
Constructor Details
Returns a new instance of StripeEventNotificationHandlerBase.
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 14
def initialize(client, &fallback_callback)
raise ArgumentError, "You must pass a block to act as a fallback" if fallback_callback.nil?
@client = client
@fallback_callback = fallback_callback
@registered_handlers = {}
@has_handled_events = false
@pre_handle_callback = nil
end
|
Instance Method Details
#on_v1_billing_meter_error_report_triggered(&callback) ⇒ Object
event-handler-methods: The beginning of the section generated from our OpenAPI spec
86
87
88
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 86
def on_v1_billing_meter_error_report_triggered(&callback)
register("v1.billing.meter.error_report_triggered", &callback)
end
|
#on_v1_billing_meter_no_meter_found(&callback) ⇒ Object
90
91
92
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 90
def on_v1_billing_meter_no_meter_found(&callback)
register("v1.billing.meter.no_meter_found", &callback)
end
|
#on_v2_commerce_product_catalog_imports_failed(&callback) ⇒ Object
94
95
96
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 94
def on_v2_commerce_product_catalog_imports_failed(&callback)
register("v2.commerce.product_catalog.imports.failed", &callback)
end
|
#on_v2_commerce_product_catalog_imports_processing(&callback) ⇒ Object
98
99
100
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 98
def on_v2_commerce_product_catalog_imports_processing(&callback)
register("v2.commerce.product_catalog.imports.processing", &callback)
end
|
#on_v2_commerce_product_catalog_imports_succeeded(&callback) ⇒ Object
102
103
104
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 102
def on_v2_commerce_product_catalog_imports_succeeded(&callback)
register("v2.commerce.product_catalog.imports.succeeded", &callback)
end
|
#on_v2_commerce_product_catalog_imports_succeeded_with_errors(&callback) ⇒ Object
106
107
108
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 106
def on_v2_commerce_product_catalog_imports_succeeded_with_errors(&callback)
register("v2.commerce.product_catalog.imports.succeeded_with_errors", &callback)
end
|
#on_v2_core_account_closed(&callback) ⇒ Object
110
111
112
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 110
def on_v2_core_account_closed(&callback)
register("v2.core.account.closed", &callback)
end
|
#on_v2_core_account_created(&callback) ⇒ Object
114
115
116
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 114
def on_v2_core_account_created(&callback)
register("v2.core.account.created", &callback)
end
|
#on_v2_core_account_including_configuration_customer_capability_status_updated(&callback) ⇒ Object
122
123
124
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 122
def on_v2_core_account_including_configuration_customer_capability_status_updated(&callback)
register("v2.core.account[configuration.customer].capability_status_updated", &callback)
end
|
#on_v2_core_account_including_configuration_customer_updated(&callback) ⇒ Object
126
127
128
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 126
def on_v2_core_account_including_configuration_customer_updated(&callback)
register("v2.core.account[configuration.customer].updated", &callback)
end
|
#on_v2_core_account_including_configuration_merchant_capability_status_updated(&callback) ⇒ Object
130
131
132
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 130
def on_v2_core_account_including_configuration_merchant_capability_status_updated(&callback)
register("v2.core.account[configuration.merchant].capability_status_updated", &callback)
end
|
#on_v2_core_account_including_configuration_merchant_updated(&callback) ⇒ Object
134
135
136
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 134
def on_v2_core_account_including_configuration_merchant_updated(&callback)
register("v2.core.account[configuration.merchant].updated", &callback)
end
|
#on_v2_core_account_including_configuration_money_manager_capability_status_updated(&callback) ⇒ Object
138
139
140
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 138
def on_v2_core_account_including_configuration_money_manager_capability_status_updated(&callback)
register("v2.core.account[configuration.money_manager].capability_status_updated", &callback)
end
|
#on_v2_core_account_including_configuration_money_manager_updated(&callback) ⇒ Object
142
143
144
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 142
def on_v2_core_account_including_configuration_money_manager_updated(&callback)
register("v2.core.account[configuration.money_manager].updated", &callback)
end
|
#on_v2_core_account_including_configuration_recipient_capability_status_updated(&callback) ⇒ Object
146
147
148
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 146
def on_v2_core_account_including_configuration_recipient_capability_status_updated(&callback)
register("v2.core.account[configuration.recipient].capability_status_updated", &callback)
end
|
#on_v2_core_account_including_configuration_recipient_updated(&callback) ⇒ Object
150
151
152
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 150
def on_v2_core_account_including_configuration_recipient_updated(&callback)
register("v2.core.account[configuration.recipient].updated", &callback)
end
|
#on_v2_core_account_including_defaults_updated(&callback) ⇒ Object
154
155
156
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 154
def on_v2_core_account_including_defaults_updated(&callback)
register("v2.core.account[defaults].updated", &callback)
end
|
#on_v2_core_account_including_future_requirements_updated(&callback) ⇒ Object
158
159
160
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 158
def on_v2_core_account_including_future_requirements_updated(&callback)
register("v2.core.account[future_requirements].updated", &callback)
end
|
#on_v2_core_account_including_identity_updated(&callback) ⇒ Object
162
163
164
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 162
def on_v2_core_account_including_identity_updated(&callback)
register("v2.core.account[identity].updated", &callback)
end
|
#on_v2_core_account_including_requirements_updated(&callback) ⇒ Object
166
167
168
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 166
def on_v2_core_account_including_requirements_updated(&callback)
register("v2.core.account[requirements].updated", &callback)
end
|
#on_v2_core_account_link_returned(&callback) ⇒ Object
170
171
172
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 170
def on_v2_core_account_link_returned(&callback)
register("v2.core.account_link.returned", &callback)
end
|
#on_v2_core_account_person_created(&callback) ⇒ Object
174
175
176
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 174
def on_v2_core_account_person_created(&callback)
register("v2.core.account_person.created", &callback)
end
|
#on_v2_core_account_person_deleted(&callback) ⇒ Object
178
179
180
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 178
def on_v2_core_account_person_deleted(&callback)
register("v2.core.account_person.deleted", &callback)
end
|
#on_v2_core_account_person_updated(&callback) ⇒ Object
182
183
184
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 182
def on_v2_core_account_person_updated(&callback)
register("v2.core.account_person.updated", &callback)
end
|
#on_v2_core_account_updated(&callback) ⇒ Object
118
119
120
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 118
def on_v2_core_account_updated(&callback)
register("v2.core.account.updated", &callback)
end
|
#on_v2_core_approval_request_approved(&callback) ⇒ Object
186
187
188
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 186
def on_v2_core_approval_request_approved(&callback)
register("v2.core.approval_request.approved", &callback)
end
|
#on_v2_core_approval_request_canceled(&callback) ⇒ Object
190
191
192
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 190
def on_v2_core_approval_request_canceled(&callback)
register("v2.core.approval_request.canceled", &callback)
end
|
#on_v2_core_approval_request_created(&callback) ⇒ Object
194
195
196
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 194
def on_v2_core_approval_request_created(&callback)
register("v2.core.approval_request.created", &callback)
end
|
#on_v2_core_approval_request_expired(&callback) ⇒ Object
198
199
200
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 198
def on_v2_core_approval_request_expired(&callback)
register("v2.core.approval_request.expired", &callback)
end
|
#on_v2_core_approval_request_failed(&callback) ⇒ Object
202
203
204
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 202
def on_v2_core_approval_request_failed(&callback)
register("v2.core.approval_request.failed", &callback)
end
|
#on_v2_core_approval_request_rejected(&callback) ⇒ Object
206
207
208
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 206
def on_v2_core_approval_request_rejected(&callback)
register("v2.core.approval_request.rejected", &callback)
end
|
#on_v2_core_approval_request_succeeded(&callback) ⇒ Object
210
211
212
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 210
def on_v2_core_approval_request_succeeded(&callback)
register("v2.core.approval_request.succeeded", &callback)
end
|
#on_v2_core_batch_job_batch_failed(&callback) ⇒ Object
214
215
216
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 214
def on_v2_core_batch_job_batch_failed(&callback)
register("v2.core.batch_job.batch_failed", &callback)
end
|
#on_v2_core_batch_job_canceled(&callback) ⇒ Object
218
219
220
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 218
def on_v2_core_batch_job_canceled(&callback)
register("v2.core.batch_job.canceled", &callback)
end
|
#on_v2_core_batch_job_completed(&callback) ⇒ Object
222
223
224
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 222
def on_v2_core_batch_job_completed(&callback)
register("v2.core.batch_job.completed", &callback)
end
|
#on_v2_core_batch_job_created(&callback) ⇒ Object
226
227
228
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 226
def on_v2_core_batch_job_created(&callback)
register("v2.core.batch_job.created", &callback)
end
|
#on_v2_core_batch_job_ready_for_upload(&callback) ⇒ Object
230
231
232
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 230
def on_v2_core_batch_job_ready_for_upload(&callback)
register("v2.core.batch_job.ready_for_upload", &callback)
end
|
#on_v2_core_batch_job_timeout(&callback) ⇒ Object
234
235
236
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 234
def on_v2_core_batch_job_timeout(&callback)
register("v2.core.batch_job.timeout", &callback)
end
|
#on_v2_core_batch_job_updated(&callback) ⇒ Object
238
239
240
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 238
def on_v2_core_batch_job_updated(&callback)
register("v2.core.batch_job.updated", &callback)
end
|
#on_v2_core_batch_job_upload_timeout(&callback) ⇒ Object
242
243
244
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 242
def on_v2_core_batch_job_upload_timeout(&callback)
register("v2.core.batch_job.upload_timeout", &callback)
end
|
#on_v2_core_batch_job_validating(&callback) ⇒ Object
246
247
248
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 246
def on_v2_core_batch_job_validating(&callback)
register("v2.core.batch_job.validating", &callback)
end
|
#on_v2_core_batch_job_validation_failed(&callback) ⇒ Object
250
251
252
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 250
def on_v2_core_batch_job_validation_failed(&callback)
register("v2.core.batch_job.validation_failed", &callback)
end
|
#on_v2_core_event_destination_ping(&callback) ⇒ Object
254
255
256
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 254
def on_v2_core_event_destination_ping(&callback)
register("v2.core.event_destination.ping", &callback)
end
|
#on_v2_core_health_event_generation_failure_resolved(&callback) ⇒ Object
258
259
260
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 258
def on_v2_core_health_event_generation_failure_resolved(&callback)
register("v2.core.health.event_generation_failure.resolved", &callback)
end
|
#on_v2_data_reporting_query_run_created(&callback) ⇒ Object
262
263
264
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 262
def on_v2_data_reporting_query_run_created(&callback)
register("v2.data.reporting.query_run.created", &callback)
end
|
#on_v2_data_reporting_query_run_failed(&callback) ⇒ Object
266
267
268
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 266
def on_v2_data_reporting_query_run_failed(&callback)
register("v2.data.reporting.query_run.failed", &callback)
end
|
#on_v2_data_reporting_query_run_succeeded(&callback) ⇒ Object
270
271
272
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 270
def on_v2_data_reporting_query_run_succeeded(&callback)
register("v2.data.reporting.query_run.succeeded", &callback)
end
|
#on_v2_data_reporting_query_run_updated(&callback) ⇒ Object
274
275
276
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 274
def on_v2_data_reporting_query_run_updated(&callback)
register("v2.data.reporting.query_run.updated", &callback)
end
|
#on_v2_extend_workflow_run_failed(&callback) ⇒ Object
278
279
280
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 278
def on_v2_extend_workflow_run_failed(&callback)
register("v2.extend.workflow_run.failed", &callback)
end
|
#on_v2_extend_workflow_run_started(&callback) ⇒ Object
282
283
284
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 282
def on_v2_extend_workflow_run_started(&callback)
register("v2.extend.workflow_run.started", &callback)
end
|
#on_v2_extend_workflow_run_succeeded(&callback) ⇒ Object
286
287
288
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 286
def on_v2_extend_workflow_run_succeeded(&callback)
register("v2.extend.workflow_run.succeeded", &callback)
end
|
#on_v2_money_management_adjustment_created(&callback) ⇒ Object
290
291
292
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 290
def on_v2_money_management_adjustment_created(&callback)
register("v2.money_management.adjustment.created", &callback)
end
|
#on_v2_money_management_financial_account_created(&callback) ⇒ Object
294
295
296
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 294
def on_v2_money_management_financial_account_created(&callback)
register("v2.money_management.financial_account.created", &callback)
end
|
#on_v2_money_management_financial_account_updated(&callback) ⇒ Object
298
299
300
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 298
def on_v2_money_management_financial_account_updated(&callback)
register("v2.money_management.financial_account.updated", &callback)
end
|
#on_v2_money_management_financial_address_activated(&callback) ⇒ Object
302
303
304
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 302
def on_v2_money_management_financial_address_activated(&callback)
register("v2.money_management.financial_address.activated", &callback)
end
|
#on_v2_money_management_financial_address_failed(&callback) ⇒ Object
306
307
308
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 306
def on_v2_money_management_financial_address_failed(&callback)
register("v2.money_management.financial_address.failed", &callback)
end
|
#on_v2_money_management_inbound_transfer_available(&callback) ⇒ Object
310
311
312
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 310
def on_v2_money_management_inbound_transfer_available(&callback)
register("v2.money_management.inbound_transfer.available", &callback)
end
|
#on_v2_money_management_inbound_transfer_bank_debit_failed(&callback) ⇒ Object
314
315
316
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 314
def on_v2_money_management_inbound_transfer_bank_debit_failed(&callback)
register("v2.money_management.inbound_transfer.bank_debit_failed", &callback)
end
|
#on_v2_money_management_inbound_transfer_bank_debit_processing(&callback) ⇒ Object
318
319
320
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 318
def on_v2_money_management_inbound_transfer_bank_debit_processing(&callback)
register("v2.money_management.inbound_transfer.bank_debit_processing", &callback)
end
|
#on_v2_money_management_inbound_transfer_bank_debit_queued(&callback) ⇒ Object
322
323
324
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 322
def on_v2_money_management_inbound_transfer_bank_debit_queued(&callback)
register("v2.money_management.inbound_transfer.bank_debit_queued", &callback)
end
|
#on_v2_money_management_inbound_transfer_bank_debit_returned(&callback) ⇒ Object
326
327
328
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 326
def on_v2_money_management_inbound_transfer_bank_debit_returned(&callback)
register("v2.money_management.inbound_transfer.bank_debit_returned", &callback)
end
|
#on_v2_money_management_inbound_transfer_bank_debit_succeeded(&callback) ⇒ Object
330
331
332
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 330
def on_v2_money_management_inbound_transfer_bank_debit_succeeded(&callback)
register("v2.money_management.inbound_transfer.bank_debit_succeeded", &callback)
end
|
#on_v2_money_management_outbound_payment_canceled(&callback) ⇒ Object
334
335
336
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 334
def on_v2_money_management_outbound_payment_canceled(&callback)
register("v2.money_management.outbound_payment.canceled", &callback)
end
|
#on_v2_money_management_outbound_payment_created(&callback) ⇒ Object
338
339
340
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 338
def on_v2_money_management_outbound_payment_created(&callback)
register("v2.money_management.outbound_payment.created", &callback)
end
|
#on_v2_money_management_outbound_payment_failed(&callback) ⇒ Object
342
343
344
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 342
def on_v2_money_management_outbound_payment_failed(&callback)
register("v2.money_management.outbound_payment.failed", &callback)
end
|
#on_v2_money_management_outbound_payment_posted(&callback) ⇒ Object
346
347
348
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 346
def on_v2_money_management_outbound_payment_posted(&callback)
register("v2.money_management.outbound_payment.posted", &callback)
end
|
#on_v2_money_management_outbound_payment_returned(&callback) ⇒ Object
350
351
352
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 350
def on_v2_money_management_outbound_payment_returned(&callback)
register("v2.money_management.outbound_payment.returned", &callback)
end
|
#on_v2_money_management_outbound_payment_under_review(&callback) ⇒ Object
354
355
356
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 354
def on_v2_money_management_outbound_payment_under_review(&callback)
register("v2.money_management.outbound_payment.under_review", &callback)
end
|
#on_v2_money_management_outbound_payment_updated(&callback) ⇒ Object
358
359
360
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 358
def on_v2_money_management_outbound_payment_updated(&callback)
register("v2.money_management.outbound_payment.updated", &callback)
end
|
#on_v2_money_management_outbound_transfer_canceled(&callback) ⇒ Object
362
363
364
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 362
def on_v2_money_management_outbound_transfer_canceled(&callback)
register("v2.money_management.outbound_transfer.canceled", &callback)
end
|
#on_v2_money_management_outbound_transfer_created(&callback) ⇒ Object
366
367
368
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 366
def on_v2_money_management_outbound_transfer_created(&callback)
register("v2.money_management.outbound_transfer.created", &callback)
end
|
#on_v2_money_management_outbound_transfer_failed(&callback) ⇒ Object
370
371
372
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 370
def on_v2_money_management_outbound_transfer_failed(&callback)
register("v2.money_management.outbound_transfer.failed", &callback)
end
|
#on_v2_money_management_outbound_transfer_posted(&callback) ⇒ Object
374
375
376
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 374
def on_v2_money_management_outbound_transfer_posted(&callback)
register("v2.money_management.outbound_transfer.posted", &callback)
end
|
#on_v2_money_management_outbound_transfer_returned(&callback) ⇒ Object
378
379
380
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 378
def on_v2_money_management_outbound_transfer_returned(&callback)
register("v2.money_management.outbound_transfer.returned", &callback)
end
|
#on_v2_money_management_outbound_transfer_under_review(&callback) ⇒ Object
382
383
384
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 382
def on_v2_money_management_outbound_transfer_under_review(&callback)
register("v2.money_management.outbound_transfer.under_review", &callback)
end
|
#on_v2_money_management_outbound_transfer_updated(&callback) ⇒ Object
386
387
388
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 386
def on_v2_money_management_outbound_transfer_updated(&callback)
register("v2.money_management.outbound_transfer.updated", &callback)
end
|
#on_v2_money_management_payout_method_created(&callback) ⇒ Object
390
391
392
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 390
def on_v2_money_management_payout_method_created(&callback)
register("v2.money_management.payout_method.created", &callback)
end
|
#on_v2_money_management_payout_method_updated(&callback) ⇒ Object
394
395
396
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 394
def on_v2_money_management_payout_method_updated(&callback)
register("v2.money_management.payout_method.updated", &callback)
end
|
#on_v2_money_management_received_credit_available(&callback) ⇒ Object
398
399
400
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 398
def on_v2_money_management_received_credit_available(&callback)
register("v2.money_management.received_credit.available", &callback)
end
|
#on_v2_money_management_received_credit_failed(&callback) ⇒ Object
402
403
404
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 402
def on_v2_money_management_received_credit_failed(&callback)
register("v2.money_management.received_credit.failed", &callback)
end
|
#on_v2_money_management_received_credit_returned(&callback) ⇒ Object
406
407
408
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 406
def on_v2_money_management_received_credit_returned(&callback)
register("v2.money_management.received_credit.returned", &callback)
end
|
#on_v2_money_management_received_credit_succeeded(&callback) ⇒ Object
410
411
412
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 410
def on_v2_money_management_received_credit_succeeded(&callback)
register("v2.money_management.received_credit.succeeded", &callback)
end
|
#on_v2_money_management_received_debit_canceled(&callback) ⇒ Object
414
415
416
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 414
def on_v2_money_management_received_debit_canceled(&callback)
register("v2.money_management.received_debit.canceled", &callback)
end
|
#on_v2_money_management_received_debit_failed(&callback) ⇒ Object
418
419
420
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 418
def on_v2_money_management_received_debit_failed(&callback)
register("v2.money_management.received_debit.failed", &callback)
end
|
#on_v2_money_management_received_debit_pending(&callback) ⇒ Object
422
423
424
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 422
def on_v2_money_management_received_debit_pending(&callback)
register("v2.money_management.received_debit.pending", &callback)
end
|
#on_v2_money_management_received_debit_succeeded(&callback) ⇒ Object
426
427
428
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 426
def on_v2_money_management_received_debit_succeeded(&callback)
register("v2.money_management.received_debit.succeeded", &callback)
end
|
#on_v2_money_management_received_debit_updated(&callback) ⇒ Object
430
431
432
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 430
def on_v2_money_management_received_debit_updated(&callback)
register("v2.money_management.received_debit.updated", &callback)
end
|
#on_v2_money_management_transaction_created(&callback) ⇒ Object
434
435
436
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 434
def on_v2_money_management_transaction_created(&callback)
register("v2.money_management.transaction.created", &callback)
end
|
#on_v2_money_management_transaction_updated(&callback) ⇒ Object
438
439
440
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 438
def on_v2_money_management_transaction_updated(&callback)
register("v2.money_management.transaction.updated", &callback)
end
|
#on_v2_orchestrated_commerce_agreement_confirmed(&callback) ⇒ Object
442
443
444
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 442
def on_v2_orchestrated_commerce_agreement_confirmed(&callback)
register("v2.orchestrated_commerce.agreement.confirmed", &callback)
end
|
#on_v2_orchestrated_commerce_agreement_created(&callback) ⇒ Object
446
447
448
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 446
def on_v2_orchestrated_commerce_agreement_created(&callback)
register("v2.orchestrated_commerce.agreement.created", &callback)
end
|
#on_v2_orchestrated_commerce_agreement_partially_confirmed(&callback) ⇒ Object
450
451
452
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 450
def on_v2_orchestrated_commerce_agreement_partially_confirmed(&callback)
register("v2.orchestrated_commerce.agreement.partially_confirmed", &callback)
end
|
#on_v2_orchestrated_commerce_agreement_terminated(&callback) ⇒ Object
454
455
456
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 454
def on_v2_orchestrated_commerce_agreement_terminated(&callback)
register("v2.orchestrated_commerce.agreement.terminated", &callback)
end
|
#on_v2_signals_account_evaluation_complete(&callback) ⇒ Object
458
459
460
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 458
def on_v2_signals_account_evaluation_complete(&callback)
register("v2.signals.account_evaluation.complete", &callback)
end
|
#pre_handle(&hook) ⇒ Object
Registers a function that will be run before any event-specific callbacks. A useful
place to store event-agnostic logic, such as logging or checking for
duplicate event deliveries.
Returning true causes handling to continue as normal; returning false returns from
.handle() immediately, so neither the registered callback nor the fallback callback
are called.
36
37
38
39
40
41
42
43
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 36
def pre_handle(&hook)
assert_callback_given(hook)
assert_hasnt_handled_events
raise ArgumentError, "A pre_handle callback is already registered" if @pre_handle_callback
@pre_handle_callback = hook
end
|
#registered_event_types ⇒ Object
25
26
27
|
# File 'lib/stripe/stripe_event_notification_handler.rb', line 25
def registered_event_types
@registered_handlers.keys.sort
end
|