Class: Vonage::Verify2::Workflow
- Inherits:
-
Object
- Object
- Vonage::Verify2::Workflow
- 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
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Class Method Summary collapse
Instance Method Summary collapse
- #<<(workflow) ⇒ Object
- #hashified_list ⇒ Object
-
#initialize ⇒ Workflow
constructor
A new instance of Workflow.
Constructor Details
#initialize ⇒ Workflow
Returns a new instance of Workflow.
27 28 29 |
# File 'lib/vonage/verify2/workflow.rb', line 27 def initialize @list = [] end |
Instance Attribute Details
#list ⇒ Object (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
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_list ⇒ Object
35 36 37 |
# File 'lib/vonage/verify2/workflow.rb', line 35 def hashified_list list.map(&:to_h) end |