Sha256: 298a425943fccc58ce5cb9f9614e84062eced329992b22a352bf249ca3a0eab8
Contents?: true
Size: 504 Bytes
Versions: 40
Compression:
Stored size: 504 Bytes
Contents
module Pay module Stripe module Webhooks class PaymentMethodUpdated def call(event) object = event.data.object if object.customer Pay::Stripe::PaymentMethod.sync(object.id, stripe_account: event.try(:account)) else # If customer was removed, we should delete the payment method if it exists Pay::PaymentMethod.find_by_processor_and_id(:stripe, object.id)&.destroy end end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems