Class: Pay::Stripe::Webhooks::PaymentMethodAttached
- Inherits:
-
Object
- Object
- Pay::Stripe::Webhooks::PaymentMethodAttached
- Defined in:
- lib/pay/stripe/webhooks/payment_method_attached.rb
Instance Method Summary collapse
Instance Method Details
#call(event) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/pay/stripe/webhooks/payment_method_attached.rb', line 5 def call(event) object = event.data.object pay_customer = Pay::Customer.find_by(processor: :stripe, processor_id: object.customer) return unless pay_customer pay_customer.save_payment_method(object, default: false) end |