module StripeWebhooks::Callbacks::ClassMethods

Attributes

callbacks[R]

Public Instance Methods

register_callback(label) click to toggle source

Add a callback to be ran whenever a new event is recorded

Example

StripeWebhooks.register_callback('my_callback')
# File lib/stripe_webhooks/callbacks.rb, line 17
def register_callback(label)
  @callbacks << label unless @callbacks.include?(label) || label == 'application'
end