class Bandwidth::ModifyCallRequest

ModifyCallRequest Model.

Attributes

fallback_password[RW]

Required if state is 'active' @return [String]

fallback_username[RW]

Required if state is 'active' @return [String]

password[RW]

Required if state is 'active' @return [String]

redirect_fallback_method[RW]

Required if state is 'active' @return [RedirectFallbackMethodEnum]

redirect_fallback_url[RW]

Required if state is 'active' @return [String]

redirect_method[RW]

Required if state is 'active' @return [RedirectMethodEnum]

redirect_url[RW]

Required if state is 'active' @return [String]

state[RW]

TODO: Write general description for this method @return [StateEnum]

tag[RW]

Required if state is 'active' @return [String]

username[RW]

Required if state is 'active' @return [String]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/bandwidth/voice_lib/voice/models/modify_call_request.rb, line 88
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  state = hash['state'] ||= StateEnum::ACTIVE
  redirect_url = hash['redirectUrl']
  redirect_fallback_url = hash['redirectFallbackUrl']
  redirect_method = hash['redirectMethod']
  redirect_fallback_method = hash['redirectFallbackMethod']
  username = hash['username']
  password = hash['password']
  fallback_username = hash['fallbackUsername']
  fallback_password = hash['fallbackPassword']
  tag = hash['tag']

  # Create object from extracted values.
  ModifyCallRequest.new(state,
                        redirect_url,
                        redirect_fallback_url,
                        redirect_method,
                        redirect_fallback_method,
                        username,
                        password,
                        fallback_username,
                        fallback_password,
                        tag)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/bandwidth/voice_lib/voice/models/modify_call_request.rb, line 50
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['state'] = 'state'
  @_hash['redirect_url'] = 'redirectUrl'
  @_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
  @_hash['redirect_method'] = 'redirectMethod'
  @_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
  @_hash['username'] = 'username'
  @_hash['password'] = 'password'
  @_hash['fallback_username'] = 'fallbackUsername'
  @_hash['fallback_password'] = 'fallbackPassword'
  @_hash['tag'] = 'tag'
  @_hash
end
new(state = StateEnum::ACTIVE, redirect_url = nil, redirect_fallback_url = nil, redirect_method = nil, redirect_fallback_method = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, tag = nil) click to toggle source
# File lib/bandwidth/voice_lib/voice/models/modify_call_request.rb, line 65
def initialize(state = StateEnum::ACTIVE,
               redirect_url = nil,
               redirect_fallback_url = nil,
               redirect_method = nil,
               redirect_fallback_method = nil,
               username = nil,
               password = nil,
               fallback_username = nil,
               fallback_password = nil,
               tag = nil)
  @state = state
  @redirect_url = redirect_url
  @redirect_fallback_url = redirect_fallback_url
  @redirect_method = redirect_method
  @redirect_fallback_method = redirect_fallback_method
  @username = username
  @password = password
  @fallback_username = fallback_username
  @fallback_password = fallback_password
  @tag = tag
end