Class: Retab::WorkflowEmailTrigger

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflows/workflow_email_trigger.rb

Constant Summary collapse

HASH_ATTRS =
{
  allowed_senders: :allowed_senders,
  allowed_domains: :allowed_domains
}.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) ⇒ WorkflowEmailTrigger

Returns a new instance of WorkflowEmailTrigger.



17
18
19
20
21
# File 'lib/retab/workflows/workflow_email_trigger.rb', line 17

def initialize(json)
  hash = self.class.normalize(json)
  @allowed_senders = (hash[:allowed_senders] || [])
  @allowed_domains = (hash[:allowed_domains] || [])
end

Instance Attribute Details

#allowed_domainsObject

Returns the value of attribute allowed_domains.



13
14
15
# File 'lib/retab/workflows/workflow_email_trigger.rb', line 13

def allowed_domains
  @allowed_domains
end

#allowed_sendersObject

Returns the value of attribute allowed_senders.



13
14
15
# File 'lib/retab/workflows/workflow_email_trigger.rb', line 13

def allowed_senders
  @allowed_senders
end