Class: Retab::WebhookTrigger

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_runs/webhook_trigger.rb

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  webhook_id: :webhook_id
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ WebhookTrigger

Returns a new instance of WebhookTrigger.



17
18
19
20
21
# File 'lib/retab/workflow_runs/webhook_trigger.rb', line 17

def initialize(json)
  hash = self.class.normalize(json)
  @type = hash[:type]
  @webhook_id = hash[:webhook_id]
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



13
14
15
# File 'lib/retab/workflow_runs/webhook_trigger.rb', line 13

def type
  @type
end

#webhook_idObject

Returns the value of attribute webhook_id.



13
14
15
# File 'lib/retab/workflow_runs/webhook_trigger.rb', line 13

def webhook_id
  @webhook_id
end