Sha256: 27861553ec33a07a7aaa732b086342c636996d17a0bbbaf16e4bedf722155040

Contents?: true

Size: 416 Bytes

Versions: 14

Compression:

Stored size: 416 Bytes

Contents

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

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

          Pay::Stripe::Billable.new(billable).sync_card_from_stripe
        end
      end
    end
  end
end

Version data entries

14 entries across 13 versions & 1 rubygems

Version Path
pay-2.7.2 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.7.1 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.7.0 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.11 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.10 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.9 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.8 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.7 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.7 lib/pay/stripe_marketplace/webhooks/customer_updated.rb
pay-2.6.6 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.5 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.4 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.3 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.6.2 lib/pay/stripe/webhooks/customer_updated.rb