Class: Pay::Stripe::Webhooks::AccountUpdated

Inherits:
Object
  • Object
show all
Defined in:
lib/pay/stripe/webhooks/account_updated.rb

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/pay/stripe/webhooks/account_updated.rb', line 5

def call(event)
  object = event.data.object

  merchant = Pay.find_merchant("stripe_connect_account_id", object.id)

  return unless merchant.present?

  merchant.update(onboarding_complete: object.charges_enabled)
end