Class: Pay::Braintree::Webhooks::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/pay/braintree/webhooks/subscription.rb

Overview

Every Braintree subscription event is handled the same way: sync the subscription

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object



6
7
8
9
10
11
# File 'lib/pay/braintree/webhooks/subscription.rb', line 6

def call(event)
  subscription = event.subscription
  return if subscription.nil?

  Pay::Braintree::Subscription.sync(subscription.id)
end