Component evidence

V1SetupIntentSucceededEvent (events/v1_setup_intent_succeeded_event.rb)

stripe-ruby · lib/stripe/events/v1_setup_intent_succeeded_event.rb · ruby · MIT
payments

Stripe event class for successful SetupIntent, with API fetch for related object.

Source preview first 800 characters · full source over MCP
# Source: https://github.com/stripe/stripe-ruby | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
# Provided via justclaw.it.com; keep this notice with the code.
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  module Events
    # Occurs when a SetupIntent has successfully setup a payment method.
    class V1SetupIntentSucceededEvent < Stripe::V2::Core::Event
      def self.lookup_type
        "v1.setup_intent.succeeded"
      end

      # Retrieves the related object from the API. Makes an API request on every call.
      def fetch_related_object
        _request(
          method: :get,
          path: related_object.url,
          base_address: :api,
          opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }

... (truncated -- full source via MCP)