mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-06 00:02:18 -04:00
42 lines
2.1 KiB
Ruby
42 lines
2.1 KiB
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
module V2
|
|
# Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload.
|
|
class Event < APIResource
|
|
OBJECT_NAME = "v2.core.event"
|
|
def self.object_name
|
|
"v2.core.event"
|
|
end
|
|
|
|
class Reason < Stripe::StripeObject
|
|
class Request < Stripe::StripeObject
|
|
# ID of the API request that caused the event.
|
|
attr_reader :id
|
|
# The idempotency key transmitted during the request.
|
|
attr_reader :idempotency_key
|
|
end
|
|
# Event reason type.
|
|
attr_reader :type
|
|
# Information on the API request that instigated the event.
|
|
attr_reader :request
|
|
end
|
|
# Authentication context needed to fetch the event or related object.
|
|
attr_reader :context
|
|
# Time at which the object was created.
|
|
attr_reader :created
|
|
# Unique identifier for the event.
|
|
attr_reader :id
|
|
# String representing the object's type. Objects of the same type share the same value of the object field.
|
|
attr_reader :object
|
|
# Reason for the event.
|
|
attr_reader :reason
|
|
# The type of the event.
|
|
attr_reader :type
|
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
attr_reader :livemode
|
|
end
|
|
end
|
|
end
|