Skip to Content Skip to Search
Methods
C
E
N
Included Modules

Attributes

[R] event

Class Public methods

events()

# File app/lib/stripe/event_handlers/invoice_voided.rb, line 9
def events
  ["invoice.voided"]
end

new(event)

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

Instance Public methods

call()

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

  ::Api::FailedPaymentRecorder.new(invoice).void_or_uncollectable
  ::Api::PaymentsUpdatorJob.set(wait: 1.minute).perform_later(subscription_id: invoice.subscription)
end