Class: Bandwidth::ApiModifyCallRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb

Overview

ApiModifyCallRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(redirect_url = nil, state = nil, redirect_method = nil, username = nil, password = nil, tag = nil) ⇒ ApiModifyCallRequest

Returns a new instance of ApiModifyCallRequest.



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 45

def initialize(redirect_url = nil,
               state = nil,
               redirect_method = nil,
               username = nil,
               password = nil,
               tag = nil)
  @state = state
  @redirect_url = redirect_url
  @redirect_method = redirect_method
  @username = username
  @password = password
  @tag = tag
end

Instance Attribute Details

#passwordString

TODO: Write general description for this method

Returns:

  • (String)


27
28
29
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 27

def password
  @password
end

#redirect_methodRedirectMethodEnum

TODO: Write general description for this method

Returns:



19
20
21
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 19

def redirect_method
  @redirect_method
end

#redirect_urlString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 15

def redirect_url
  @redirect_url
end

#stateStateEnum

TODO: Write general description for this method

Returns:



11
12
13
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 11

def state
  @state
end

#tagString

TODO: Write general description for this method

Returns:

  • (String)


31
32
33
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 31

def tag
  @tag
end

#usernameString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 23

def username
  @username
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 60

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  redirect_url = hash['redirectUrl']
  state = hash['state']
  redirect_method = hash['redirectMethod']
  username = hash['username']
  password = hash['password']
  tag = hash['tag']

  # Create object from extracted values.
  ApiModifyCallRequest.new(redirect_url,
                           state,
                           redirect_method,
                           username,
                           password,
                           tag)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
39
40
41
42
43
# File 'lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb', line 34

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['state'] = 'state'
  @_hash['redirect_url'] = 'redirectUrl'
  @_hash['redirect_method'] = 'redirectMethod'
  @_hash['username'] = 'username'
  @_hash['password'] = 'password'
  @_hash['tag'] = 'tag'
  @_hash
end