Module: StripeWebhooks::Callbacks::ClassMethods
- Defined in:
- lib/stripe_webhooks/callbacks.rb
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
Instance Method Summary collapse
-
#register_callback(label) ⇒ Object
Add a callback to be ran whenever a new event is recorded.
Instance Attribute Details
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
10 11 12 |
# File 'lib/stripe_webhooks/callbacks.rb', line 10 def callbacks @callbacks end |
Instance Method Details
#register_callback(label) ⇒ Object
Add a callback to be ran whenever a new event is recorded
Example
StripeWebhooks.register_callback('my_callback')
18 19 20 |
# File 'lib/stripe_webhooks/callbacks.rb', line 18 def register_callback(label) @callbacks << label end |