Skip to Content Skip to Search
Methods
C
E
N

Attributes

[R] event

Class Public methods

events()

# File app/lib/stripe/event_handlers/payment_intent_canceled.rb, line 7
def events
  ["payment_intent.canceled"]
end

new(event)

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

Instance Public methods

call()

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

  DB::Subscription.where(pending_intent_id: payment_intent.id)
    .update_all(pending_intent_id: nil)
end