Class: Pay::Stripe::Webhooks::PaymentMethodDetached

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

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object


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

def call(event)
  object = event.data.object
  Pay::PaymentMethod.find_by_processor_and_id(:stripe, object.id)&.destroy
end