class Vonage::Voice::Ncco

Constants

ACTIONS

Public Class Methods

create(*actions) click to toggle source

Create an NCCO

@example

talk = Vonage::Voice::Ncco.talk(text: 'This is sample text')
input = Vonage::Voice::Ncco.input(type: ['dtmf'])
ncco = Vonage::Voice::Ncco.create(talk, input)

@option actions [Vonage::Voice::Ncco]

@return [Array]

@see developer.nexmo.com/voice/voice-api/ncco-reference

# File lib/vonage/voice/ncco.rb, line 38
def self.create(*actions)
  actions.flatten!
end
method_missing(method) click to toggle source
# File lib/vonage/voice/ncco.rb, line 22
def self.method_missing(method)
  raise ClientError.new("NCCO action must be one of the valid options. Please refer to https://developer.nexmo.com/voice/voice-api/ncco-reference#ncco-actions for a complete list.")
end