Class: Stripe::V2::Core::EventDestination

Inherits:
APIResource show all
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](docs.stripe.com/webhooks) and [Amazon EventBridge](docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](docs.stripe.com/api/v2/events) and [snapshot events](docs.stripe.com/api/events).

Defined Under Namespace

Classes: AmazonEventbridge, StatusDetails, WebhookEndpoint

Constant Summary collapse

OBJECT_NAME =
"v2.core.event_destination"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

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

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #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_eventbridgeObject (readonly)

Amazon EventBridge configuration.



101
102
103
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 101

def amazon_eventbridge
  @amazon_eventbridge
end

#createdObject (readonly)

Time at which the object was created.



71
72
73
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 71

def created
  @created
end

#descriptionObject (readonly)

An optional description of what the event destination is used for.



73
74
75
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 73

def description
  @description
end

#enabled_eventsObject (readonly)

The list of events to enable for this endpoint.



75
76
77
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 75

def enabled_events
  @enabled_events
end

#event_payloadObject (readonly)

Payload type of events being subscribed to.



77
78
79
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 77

def event_payload
  @event_payload
end

#events_fromObject (readonly)

Where events should be routed from.



79
80
81
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 79

def events_from
  @events_from
end

#idObject (readonly)

Unique identifier for the object.



81
82
83
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 81

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



99
100
101
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 99

def livemode
  @livemode
end

#metadataObject (readonly)

Metadata.



83
84
85
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 83

def 
  @metadata
end

#nameObject (readonly)

Event destination name.



85
86
87
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 85

def name
  @name
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value of the object field.



87
88
89
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 87

def object
  @object
end

#snapshot_api_versionObject (readonly)

If using the snapshot event payload, the API version events are rendered as.



89
90
91
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 89

def snapshot_api_version
  @snapshot_api_version
end

#statusObject (readonly)

Status. It can be set to either enabled or disabled.



91
92
93
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 91

def status
  @status
end

#status_detailsObject (readonly)

Additional information about event destination status.



93
94
95
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 93

def status_details
  @status_details
end

#typeObject (readonly)

Event destination type.



95
96
97
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 95

def type
  @type
end

#updatedObject (readonly)

Time at which the object was last updated.



97
98
99
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 97

def updated
  @updated
end

#webhook_endpointObject (readonly)

Webhook endpoint configuration.



103
104
105
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 103

def webhook_endpoint
  @webhook_endpoint
end

Class Method Details

.field_remappingsObject



113
114
115
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 113

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



105
106
107
108
109
110
111
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 105

def self.inner_class_types
  @inner_class_types = {
    status_details: StatusDetails,
    amazon_eventbridge: AmazonEventbridge,
    webhook_endpoint: WebhookEndpoint,
  }
end

.object_nameObject



10
11
12
# File 'lib/stripe/resources/v2/core/event_destination.rb', line 10

def self.object_name
  "v2.core.event_destination"
end