Class: Stripe::Events::V2PaymentsSettlementAllocationIntentErroredEventNotification

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

Overview

Occurs when an error occurs in reconciling a SettlementAllocationIntent.

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.



51
52
53
# File 'lib/stripe/events/v2_payments_settlement_allocation_intent_errored_event.rb', line 51

def related_object
  @related_object
end

Class Method Details

.lookup_typeObject



47
48
49
# File 'lib/stripe/events/v2_payments_settlement_allocation_intent_errored_event.rb', line 47

def self.lookup_type
  "v2.payments.settlement_allocation_intent.errored"
end

Instance Method Details

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



54
55
56
57
58
59
60
61
62
# File 'lib/stripe/events/v2_payments_settlement_allocation_intent_errored_event.rb', line 54

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