Class: Stripe::V2::Core::EventDestination
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Core::EventDestination
- Defined in:
- lib/stripe/resources/v2/core/event_destination.rb
Overview
Set up an event destination to receive events from Stripe across multiple destination types, including webhook endpoints, Amazon EventBridge, and Azure Event Grid. Event destinations support receiving thin events and snapshot events.
Defined Under Namespace
Classes: AmazonEventbridge, AzureEventGrid, StatusDetails, WebhookEndpoint
Constant Summary collapse
- OBJECT_NAME =
"v2.core.event_destination"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amazon_eventbridge ⇒ Object
readonly
Configuration for delivering events through an Amazon EventBridge partner event source.
-
#azure_event_grid ⇒ Object
readonly
Configuration for delivering events through an Azure Event Grid partner topic.
-
#created ⇒ Object
readonly
The time when the destination was created.
-
#description ⇒ Object
readonly
An optional user-defined description of the destination's purpose.
-
#enabled_events ⇒ Object
readonly
The list of event types enabled for delivery to this destination.
-
#event_payload ⇒ Object
readonly
Whether to deliver as snapshot or thin events.
-
#events_from ⇒ Object
readonly
Specifies which accounts' events route to this destination.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value
trueif the object exists in live mode or the valuefalseif the object exists in test mode. -
#metadata ⇒ Object
readonly
User-defined key/value data for the destination; it has no effect on event matching or delivery.
-
#name ⇒ Object
readonly
A user-defined label for identifying the destination in Stripe.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#snapshot_api_version ⇒ Object
readonly
For snapshot events only, the Stripe API version used to render event objects.
-
#status ⇒ Object
readonly
Whether Stripe currently attempts delivery.
-
#status_details ⇒ Object
readonly
Additional lifecycle context for the destination status, when available.
-
#type ⇒ Object
readonly
The delivery transport.
-
#updated ⇒ Object
readonly
The time when the destination object was last updated.
-
#webhook_endpoint ⇒ Object
readonly
Configuration for delivering events to a webhook endpoint.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, #_get_union_variant_class, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, inner_class_union_variant_types, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#amazon_eventbridge ⇒ Object (readonly)
Configuration for delivering events through an Amazon EventBridge partner event source.
92 93 94 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 92 def amazon_eventbridge @amazon_eventbridge end |
#azure_event_grid ⇒ Object (readonly)
Configuration for delivering events through an Azure Event Grid partner topic.
94 95 96 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 94 def azure_event_grid @azure_event_grid end |
#created ⇒ Object (readonly)
The time when the destination was created.
96 97 98 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 96 def created @created end |
#description ⇒ Object (readonly)
An optional user-defined description of the destination's purpose.
98 99 100 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 98 def description @description end |
#enabled_events ⇒ Object (readonly)
The list of event types enabled for delivery to this destination.
100 101 102 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 100 def enabled_events @enabled_events end |
#event_payload ⇒ Object (readonly)
Whether to deliver as snapshot or thin events.
102 103 104 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 102 def event_payload @event_payload end |
#events_from ⇒ Object (readonly)
Specifies which accounts' events route to this destination.
@self: Receive events from the account that owns the event destination.
@accounts: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts.
@organization_members: Receive events from accounts directly linked to the organization.
@organization_members/@accounts: Receive events from all accounts connected to any platform accounts in the organization.
108 109 110 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 108 def events_from @events_from end |
#id ⇒ Object (readonly)
Unique identifier for the object.
110 111 112 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 110 def id @id end |
#livemode ⇒ Object (readonly)
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
112 113 114 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 112 def livemode @livemode end |
#metadata ⇒ Object (readonly)
User-defined key/value data for the destination; it has no effect on event matching or delivery.
114 115 116 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 114 def @metadata end |
#name ⇒ Object (readonly)
A user-defined label for identifying the destination in Stripe.
116 117 118 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 116 def name @name end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value of the object field.
118 119 120 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 118 def object @object end |
#snapshot_api_version ⇒ Object (readonly)
For snapshot events only, the Stripe API version used to render event objects. Thin events are not pinned to an API version.
120 121 122 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 120 def snapshot_api_version @snapshot_api_version end |
#status ⇒ Object (readonly)
Whether Stripe currently attempts delivery. Stripe attempts delivery to enabled destinations when their provider configuration is active; disabled destinations do not receive delivery attempts.
122 123 124 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 122 def status @status end |
#status_details ⇒ Object (readonly)
Additional lifecycle context for the destination status, when available.
124 125 126 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 124 def status_details @status_details end |
#type ⇒ Object (readonly)
The delivery transport. Chosen when the destination is created and cannot be changed by update.
126 127 128 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 126 def type @type end |
#updated ⇒ Object (readonly)
The time when the destination object was last updated.
128 129 130 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 128 def updated @updated end |
#webhook_endpoint ⇒ Object (readonly)
Configuration for delivering events to a webhook endpoint. Live mode requires HTTPS; sandbox mode also supports HTTP.
130 131 132 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 130 def webhook_endpoint @webhook_endpoint end |
Class Method Details
.field_remappings ⇒ Object
141 142 143 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 141 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
132 133 134 135 136 137 138 139 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 132 def self.inner_class_types @inner_class_types = { amazon_eventbridge: AmazonEventbridge, azure_event_grid: AzureEventGrid, status_details: StatusDetails, webhook_endpoint: WebhookEndpoint, } end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 10 def self.object_name "v2.core.event_destination" end |