Class: HookSniff::EndpointEnabledEventData
- Inherits:
-
Object
- Object
- HookSniff::EndpointEnabledEventData
- Defined in:
- lib/hooksniff/webhook_event.rb,
lib/hooksniff/models/endpoint_enabled_event_data.rb
Overview
Sent when an endpoint has been enabled.
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 = {}) ⇒ EndpointEnabledEventData
constructor
A new instance of EndpointEnabledEventData.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ EndpointEnabledEventData
Returns a new instance of EndpointEnabledEventData.
43 44 45 46 47 |
# File 'lib/hooksniff/webhook_event.rb', line 43 def initialize(app_id:, endpoint_id:, app_uid: nil) @app_id = app_id @endpoint_id = endpoint_id @app_uid = app_uid end |
Instance Attribute Details
#app_id ⇒ Object
The Application’s ID.
9 10 11 |
# File 'lib/hooksniff/models/endpoint_enabled_event_data.rb', line 9 def app_id @app_id end |
#app_uid ⇒ Object
The Application’s UID.
11 12 13 |
# File 'lib/hooksniff/models/endpoint_enabled_event_data.rb', line 11 def app_uid @app_uid end |
#endpoint_id ⇒ Object
The Endpoint’s ID.
13 14 15 |
# File 'lib/hooksniff/models/endpoint_enabled_event_data.rb', line 13 def endpoint_id @endpoint_id end |
#endpoint_uid ⇒ Object
The Endpoint’s UID.
15 16 17 |
# File 'lib/hooksniff/models/endpoint_enabled_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/hooksniff/models/endpoint_enabled_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/hooksniff/models/endpoint_enabled_event_data.rb', line 48 def serialize out = Hash.new out["appId"] = HookSniff::serialize_primitive(@app_id) if @app_id out["appUid"] = HookSniff::serialize_primitive(@app_uid) if @app_uid out["endpointId"] = HookSniff::serialize_primitive(@endpoint_id) if @endpoint_id out["endpointUid"] = HookSniff::serialize_primitive(@endpoint_uid) if @endpoint_uid out end |
#to_json ⇒ Object
Serializes the object to a json string
59 60 61 |
# File 'lib/hooksniff/models/endpoint_enabled_event_data.rb', line 59 def to_json JSON.dump(serialize) end |