Class: Vonage::Verify2::Workflow

Inherits:
Object
  • Object
show all
Defined in:
lib/vonage/verify2/workflow.rb

Constant Summary collapse

CHANNELS =
{
  sms: Verify2::Channels::SMS,
  whatsapp: Verify2::Channels::WhatsApp,
  whatsapp_interactive: Verify2::Channels::WhatsAppInteractive,
  voice: Verify2::Channels::Voice,
  email: Verify2::Channels::Email,
  silent_auth: Verify2::Channels::SilentAuth
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorkflow

Returns a new instance of Workflow.



27
28
29
# File 'lib/vonage/verify2/workflow.rb', line 27

def initialize
  @list = []
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



25
26
27
# File 'lib/vonage/verify2/workflow.rb', line 25

def list
  @list
end

Class Method Details

.method_missing(method) ⇒ Object

Raises:



21
22
23
# File 'lib/vonage/verify2/workflow.rb', line 21

def self.method_missing(method)
  raise ClientError.new("Workflow channel must be one of the valid options. Please refer to https://developer.vonage.com/en/api/verify.v2#newRequest for a complete list.")
end

Instance Method Details

#<<(workflow) ⇒ Object



31
32
33
# File 'lib/vonage/verify2/workflow.rb', line 31

def <<(workflow)
  list << workflow
end

#hashified_listObject



35
36
37
# File 'lib/vonage/verify2/workflow.rb', line 35

def hashified_list
  list.map(&:to_h)
end