Sha256: 350c8b7ea7bc1753e385a3503b362cc400d2490c4024b795ddef1943b439226c

Contents?: true

Size: 389 Bytes

Versions: 16

Compression:

Stored size: 389 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?

          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/customer_updated.rb
pay-2.6.0 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.5.0 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.4.4 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.4.3 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.4.2 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.4.0 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.3.1 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.3.0 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.2.2 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.2.1 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.2.0 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.1.3 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.1.2 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.1.1 lib/pay/stripe/webhooks/customer_updated.rb
pay-2.1.0 lib/pay/stripe/webhooks/customer_updated.rb