Class: Retab::EmailTrigger

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

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  sender: :sender,
  subject: :subject
}.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) ⇒ EmailTrigger

Returns a new instance of EmailTrigger.



19
20
21
22
23
24
# File 'lib/retab/workflow_runs/email_trigger.rb', line 19

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

Instance Attribute Details

#senderObject

Returns the value of attribute sender.



14
15
16
# File 'lib/retab/workflow_runs/email_trigger.rb', line 14

def sender
  @sender
end

#subjectObject

Returns the value of attribute subject.



14
15
16
# File 'lib/retab/workflow_runs/email_trigger.rb', line 14

def subject
  @subject
end

#typeObject

Returns the value of attribute type.



14
15
16
# File 'lib/retab/workflow_runs/email_trigger.rb', line 14

def type
  @type
end