V1InvoicePaymentSucceededEvent (events/v1_invoice_payment_succeeded_event.rb)

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

Stripe event for successful invoice payment, with related object fetching.

# 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 whenever an invoice payment attempt succeeds.
    class V1InvoicePaymentSucceededEvent < Stripe::V2::Core::Event
      def self.lookup_type
        "v1.invoice.payment_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)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key