Skip to Content Skip to Search
Methods
C
E
N
S

Attributes

[R] event

Class Public methods

events()

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

new(event)

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

stripe_processing_delay_in_seconds()

# File app/lib/stripe/event_handlers/payment_intent_succeeded.rb, line 11
def stripe_processing_delay_in_seconds
  15.seconds
end

Instance Public methods

call()

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

  ::Api::StripeJob::Webhook::PaymentIntent::Succeeded
    .set(wait: self.class.stripe_processing_delay_in_seconds)
    .perform_later(event)
end