Sha256: c250be1e3c1ba8d252b2862cdd10338e3bacc90acdeb75cdea8b29c2b24222ab

Contents?: true

Size: 400 Bytes

Versions: 16

Compression:

Stored size: 400 Bytes

Contents

module Pay
  module Stripe
    module Webhooks
      class PaymentMethodUpdated
        def call(event)
          object = event.data.object
          billable = Pay.find_billable(processor: :stripe, processor_id: object.customer)

          # Couldn't find user, we can skip
          return unless billable.present?

          billable.sync_card_from_stripe
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pay-2.6.1 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.6.0 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.5.0 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.4.4 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.4.3 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.4.2 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.4.0 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.3.1 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.3.0 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.2.2 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.2.1 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.2.0 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.1.3 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.1.2 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.1.1 lib/pay/stripe/webhooks/payment_method_updated.rb
pay-2.1.0 lib/pay/stripe/webhooks/payment_method_updated.rb