Class: Svix::EndpointDeletedEventData
- Inherits:
-
Object
- Object
- Svix::EndpointDeletedEventData
- Defined in:
- lib/svix/models/endpoint_deleted_event_data.rb
Overview
Sent when an endpoint is created, updated, or deleted
Instance Attribute Summary collapse
-
#app_id ⇒ Object
The Application’s ID.
-
#app_uid ⇒ Object
The Application’s UID.
-
#endpoint_id ⇒ Object
The Endpoint’s ID.
-
#endpoint_uid ⇒ Object
The Endpoint’s UID.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ EndpointDeletedEventData
constructor
A new instance of EndpointDeletedEventData.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ EndpointDeletedEventData
Returns a new instance of EndpointDeletedEventData.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 20 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail( ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointDeletedEventData` new method" ) end attributes.each do |k, v| unless ALL_FIELD.include?(k.to_s) fail(ArgumentError, "The field #{k} is not part of Svix::EndpointDeletedEventData") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#app_id ⇒ Object
The Application’s ID.
9 10 11 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 9 def app_id @app_id end |
#app_uid ⇒ Object
The Application’s UID.
11 12 13 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 11 def app_uid @app_uid end |
#endpoint_id ⇒ Object
The Endpoint’s ID.
13 14 15 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 13 def endpoint_id @endpoint_id end |
#endpoint_uid ⇒ Object
The Endpoint’s UID.
15 16 17 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 15 def endpoint_uid @endpoint_uid end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 38 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["app_id"] = attributes["appId"] attrs["app_uid"] = attributes["appUid"] attrs["endpoint_id"] = attributes["endpointId"] attrs["endpoint_uid"] = attributes["endpointUid"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 48 def serialize out = Hash.new out["appId"] = Svix::serialize_primitive(@app_id) if @app_id out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id out["endpointUid"] = Svix::serialize_primitive(@endpoint_uid) if @endpoint_uid out end |
#to_json ⇒ Object
Serializes the object to a json string
59 60 61 |
# File 'lib/svix/models/endpoint_deleted_event_data.rb', line 59 def to_json JSON.dump(serialize) end |