Class: Pay::Stripe::Webhooks::SubscriptionDeleted

Inherits:
Object
  • Object
show all
Defined in:
lib/pay/stripe/webhooks/subscription_deleted.rb

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object


5
6
7
8
# File 'lib/pay/stripe/webhooks/subscription_deleted.rb', line 5

def call(event)
  # Canceled subscriptions are still accessible via the API, so we can sync their details
  Pay::Stripe::Subscription.sync(event.data.object.id, stripe_account: event.try(:account))
end