Class: Stripe::Events::V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification

Inherits:
V2::Core::EventNotification show all
Defined in:
lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb

Overview

Sent when our internal scheduling system kicks off an attempt at authorization, whether it’s a retry or an initial authorization. This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility.

Instance Attribute Summary collapse

Attributes inherited from V2::Core::EventNotification

#context, #created, #id, #livemode, #reason, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from V2::Core::EventNotification

#fetch_event, #initialize

Constructor Details

This class inherits a constructor from Stripe::V2::Core::EventNotification

Instance Attribute Details

Returns the value of attribute related_object.



34
35
36
# File 'lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb', line 34

def related_object
  @related_object
end

Class Method Details

.lookup_typeObject



30
31
32
# File 'lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb', line 30

def self.lookup_type
  "v2.payments.off_session_payment.authorization_attempt_started"
end

Instance Method Details

Retrieves the OffSessionPayment related to this EventNotification from the Stripe API. Makes an API request on every call.



37
38
39
40
41
42
43
44
45
# File 'lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb', line 37

def fetch_related_object
  resp = @client.raw_request(
    :get,
    related_object.url,
    opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
    usage: ["fetch_related_object"]
  )
  @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
end