Skip to Content Skip to Search
Methods
C
E
N

Attributes

[R] event

Class Public methods

events()

# File app/lib/stripe/event_handlers/account_application_deauthorized.rb, line 7
def events
  ["account.application.deauthorized"]
end

new(event)

# File app/lib/stripe/event_handlers/account_application_deauthorized.rb, line 12
def initialize(event)
  @event = event
end

Instance Public methods

call()

# File app/lib/stripe/event_handlers/account_application_deauthorized.rb, line 16
def call
  return unless self.class.events.include?(event.type)

  sites.each do |site|
    if IntegrationProvider::Stripe.new(OpenStruct.new(site: site)).can_disconnect?
      site.update_attribute(:stripe, {})
    end
  end
end