Class: Pay::Lago::Webhooks::SubscriptionStarted

Inherits:
Object
  • Object
show all
Defined in:
lib/pay/lago/webhooks/subscription_started.rb

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object



5
6
7
8
# File 'lib/pay/lago/webhooks/subscription_started.rb', line 5

def call(event)
  subscription = event.subscription
  Pay::Lago::Subscription.sync(subscription.external_customer_id, subscription.external_id, object: subscription)
end