Methods
Included Modules
Attributes
| [R] | event |
Class Public methods
events() Link
Source: show
# File app/lib/stripe/event_handlers/invoice_paid.rb, line 9 def events ["invoice.paid"] end
new(event) Link
Source: show
# File app/lib/stripe/event_handlers/invoice_paid.rb, line 14 def initialize(event) @event = event end
Instance Public methods
call() Link
Source: show
# File app/lib/stripe/event_handlers/invoice_paid.rb, line 18 def call return unless self.class.events.include?(event.type) clear_pending_payment_intent_subscriptions if invoice.payment_intent ::Api::FailedPaymentRecorder.new(invoice).recover! ::Api::PaymentsUpdatorJob.set(wait: 1.minute).perform_later(subscription_id: invoice.subscription) ::Api::FreeInvoiceCreator.new(stripe_invoice: invoice).create end