bandwidth-sdk 2.1.1 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +85 -70
  4. data/lib/bandwidth.rb +31 -2
  5. data/lib/bandwidth/api_helper.rb +14 -9
  6. data/lib/bandwidth/client.rb +22 -2
  7. data/lib/bandwidth/configuration.rb +67 -12
  8. data/lib/bandwidth/http/api_response.rb +2 -0
  9. data/lib/bandwidth/http/auth/two_factor_auth_basic_auth.rb +22 -0
  10. data/lib/bandwidth/http/auth/web_rtc_basic_auth.rb +22 -0
  11. data/lib/bandwidth/http/faraday_client.rb +5 -2
  12. data/lib/bandwidth/messaging_lib/messaging.rb +5 -3
  13. data/lib/bandwidth/messaging_lib/messaging/client.rb +13 -2
  14. data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +191 -113
  15. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  16. data/lib/bandwidth/messaging_lib/messaging/exceptions/{generic_client_exception.rb → messaging_exception.rb} +2 -14
  17. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message.rb +23 -13
  18. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message_item.rb +125 -0
  19. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_messages_list.rb +60 -0
  20. data/lib/bandwidth/messaging_lib/messaging/models/media.rb +4 -4
  21. data/lib/bandwidth/messaging_lib/messaging/models/message_request.rb +21 -8
  22. data/lib/bandwidth/messaging_lib/messaging/models/page_info.rb +62 -0
  23. data/lib/bandwidth/messaging_lib/messaging/models/priority_enum.rb +19 -0
  24. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +22 -0
  25. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +51 -0
  26. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +49 -0
  27. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/mfa_controller.rb +209 -0
  28. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/error_with_request_exception.rb +34 -0
  29. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/forbidden_request_exception.rb +29 -0
  30. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/unauthorized_request_exception.rb +29 -0
  31. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb +88 -0
  32. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_messaging_response.rb +35 -0
  33. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_code_response.rb +35 -0
  34. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb +75 -0
  35. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_voice_response.rb +35 -0
  36. data/lib/bandwidth/utilities/file_wrapper.rb +17 -0
  37. data/lib/bandwidth/voice_lib/bxml/verbs/bridge.rb +28 -0
  38. data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +32 -0
  39. data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +13 -1
  40. data/lib/bandwidth/voice_lib/bxml/verbs/phone_number.rb +7 -1
  41. data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +9 -1
  42. data/lib/bandwidth/voice_lib/bxml/verbs/redirect.rb +5 -1
  43. data/lib/bandwidth/voice_lib/bxml/verbs/ring.rb +15 -0
  44. data/lib/bandwidth/voice_lib/bxml/verbs/send_dtmf.rb +4 -1
  45. data/lib/bandwidth/voice_lib/bxml/verbs/sip_uri.rb +25 -0
  46. data/lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb +20 -0
  47. data/lib/bandwidth/voice_lib/bxml/verbs/start_recording.rb +4 -1
  48. data/lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb +14 -0
  49. data/lib/bandwidth/voice_lib/bxml/verbs/tag.rb +13 -0
  50. data/lib/bandwidth/voice_lib/bxml/verbs/transfer.rb +14 -3
  51. data/lib/bandwidth/voice_lib/voice.rb +19 -4
  52. data/lib/bandwidth/voice_lib/voice/client.rb +13 -2
  53. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +1219 -133
  54. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  55. data/lib/bandwidth/voice_lib/voice/exceptions/{error_response_exception.rb → api_error_response_exception.rb} +3 -3
  56. data/lib/bandwidth/voice_lib/voice/models/answer_fallback_method_enum.rb +17 -0
  57. data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +56 -2
  58. data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +164 -0
  59. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +135 -12
  60. data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +37 -1
  61. data/lib/bandwidth/voice_lib/voice/models/api_modify_conference_request.rb +107 -0
  62. data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +80 -0
  63. data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +35 -0
  64. data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +108 -0
  65. data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +35 -0
  66. data/lib/bandwidth/voice_lib/voice/models/conference_member_detail.rb +80 -0
  67. data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +126 -0
  68. data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +47 -0
  69. data/lib/bandwidth/voice_lib/voice/models/modify_call_recording_state.rb +1 -1
  70. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +66 -28
  71. data/lib/bandwidth/voice_lib/voice/models/redirect_fallback_method_enum.rb +17 -0
  72. data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +4 -7
  73. data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +20 -0
  74. data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +7 -4
  75. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +29 -0
  76. data/lib/bandwidth/voice_lib/voice/models/status3_enum.rb +32 -0
  77. data/lib/bandwidth/voice_lib/voice/models/status_enum.rb +17 -0
  78. data/lib/bandwidth/{messaging_lib/messaging/models/field_error.rb → voice_lib/voice/models/transcript.rb} +15 -15
  79. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +62 -0
  80. data/lib/bandwidth/voice_lib/voice/models/transcription_response.rb +42 -0
  81. data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +13 -0
  82. data/lib/bandwidth/web_rtc_lib/web_rtc.rb +22 -0
  83. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +51 -0
  84. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +692 -0
  85. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +49 -0
  86. data/lib/bandwidth/{messaging_lib/messaging/exceptions/path_client_exception.rb → web_rtc_lib/web_rtc/exceptions/error_exception.rb} +4 -19
  87. data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +47 -0
  88. data/lib/bandwidth/web_rtc_lib/web_rtc/models/device_api_version_enum.rb +17 -0
  89. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +92 -0
  90. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +35 -0
  91. data/lib/bandwidth/web_rtc_lib/web_rtc/models/publish_permission_enum.rb +17 -0
  92. data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +44 -0
  93. data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +54 -0
  94. data/test/integration/test_integration.rb +570 -0
  95. metadata +132 -19
  96. data/lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb +0 -65
  97. data/lib/bandwidth/voice_lib/voice/models/transcription_status_enum.rb +0 -20
  98. data/lib/bandwidth/voice_lib/voice/models/type_enum.rb +0 -32
@@ -13,7 +13,7 @@ module Bandwidth
13
13
  @http_call_back = http_call_back
14
14
 
15
15
  @global_headers = {
16
- 'user-agent' => 'APIMATIC 2.0'
16
+ 'user-agent' => 'ruby-sdk'
17
17
  }
18
18
  end
19
19
 
@@ -4,10 +4,10 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module Bandwidth
7
- # ErrorResponse class.
8
- class ErrorResponseException < APIException
7
+ # ApiErrorResponse class.
8
+ class ApiErrorResponseException < APIException
9
9
  # TODO: Write general description for this method
10
- # @return [TypeEnum]
10
+ # @return [String]
11
11
  attr_accessor :type
12
12
 
13
13
  # TODO: Write general description for this method
@@ -0,0 +1,17 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # AnswerFallbackMethod.
8
+ class AnswerFallbackMethodEnum
9
+ ANSWER_FALLBACK_METHOD_ENUM = [
10
+ # TODO: Write general description for POST
11
+ POST = 'POST'.freeze,
12
+
13
+ # TODO: Write general description for GET
14
+ GET = 'GET'.freeze
15
+ ].freeze
16
+ end
17
+ end
@@ -7,6 +7,10 @@ require 'date'
7
7
  module Bandwidth
8
8
  # ApiCallResponse Model.
9
9
  class ApiCallResponse < BaseModel
10
+ # TODO: Write general description for this method
11
+ # @return [String]
12
+ attr_accessor :account_id
13
+
10
14
  # TODO: Write general description for this method
11
15
  # @return [String]
12
16
  attr_accessor :call_id
@@ -35,6 +39,10 @@ module Bandwidth
35
39
  # @return [Float]
36
40
  attr_accessor :call_timeout
37
41
 
42
+ # TODO: Write general description for this method
43
+ # @return [Float]
44
+ attr_accessor :callback_timeout
45
+
38
46
  # TODO: Write general description for this method
39
47
  # @return [String]
40
48
  attr_accessor :answer_url
@@ -43,6 +51,14 @@ module Bandwidth
43
51
  # @return [AnswerMethodEnum]
44
52
  attr_accessor :answer_method
45
53
 
54
+ # TODO: Write general description for this method
55
+ # @return [String]
56
+ attr_accessor :answer_fallback_url
57
+
58
+ # TODO: Write general description for this method
59
+ # @return [AnswerFallbackMethodEnum]
60
+ attr_accessor :answer_fallback_method
61
+
46
62
  # TODO: Write general description for this method
47
63
  # @return [String]
48
64
  attr_accessor :disconnect_url
@@ -59,6 +75,14 @@ module Bandwidth
59
75
  # @return [String]
60
76
  attr_accessor :password
61
77
 
78
+ # TODO: Write general description for this method
79
+ # @return [String]
80
+ attr_accessor :fallback_username
81
+
82
+ # TODO: Write general description for this method
83
+ # @return [String]
84
+ attr_accessor :fallback_password
85
+
62
86
  # TODO: Write general description for this method
63
87
  # @return [String]
64
88
  attr_accessor :tag
@@ -66,6 +90,7 @@ module Bandwidth
66
90
  # A mapping from model property names to API property names.
67
91
  def self.names
68
92
  @_hash = {} if @_hash.nil?
93
+ @_hash['account_id'] = 'accountId'
69
94
  @_hash['call_id'] = 'callId'
70
95
  @_hash['application_id'] = 'applicationId'
71
96
  @_hash['to'] = 'to'
@@ -73,17 +98,23 @@ module Bandwidth
73
98
  @_hash['start_time'] = 'startTime'
74
99
  @_hash['call_url'] = 'callUrl'
75
100
  @_hash['call_timeout'] = 'callTimeout'
101
+ @_hash['callback_timeout'] = 'callbackTimeout'
76
102
  @_hash['answer_url'] = 'answerUrl'
77
103
  @_hash['answer_method'] = 'answerMethod'
104
+ @_hash['answer_fallback_url'] = 'answerFallbackUrl'
105
+ @_hash['answer_fallback_method'] = 'answerFallbackMethod'
78
106
  @_hash['disconnect_url'] = 'disconnectUrl'
79
107
  @_hash['disconnect_method'] = 'disconnectMethod'
80
108
  @_hash['username'] = 'username'
81
109
  @_hash['password'] = 'password'
110
+ @_hash['fallback_username'] = 'fallbackUsername'
111
+ @_hash['fallback_password'] = 'fallbackPassword'
82
112
  @_hash['tag'] = 'tag'
83
113
  @_hash
84
114
  end
85
115
 
86
- def initialize(call_id = nil,
116
+ def initialize(account_id = nil,
117
+ call_id = nil,
87
118
  application_id = nil,
88
119
  to = nil,
89
120
  from = nil,
@@ -93,10 +124,16 @@ module Bandwidth
93
124
  disconnect_method = nil,
94
125
  start_time = nil,
95
126
  call_timeout = nil,
127
+ callback_timeout = nil,
128
+ answer_fallback_url = nil,
129
+ answer_fallback_method = nil,
96
130
  disconnect_url = nil,
97
131
  username = nil,
98
132
  password = nil,
133
+ fallback_username = nil,
134
+ fallback_password = nil,
99
135
  tag = nil)
136
+ @account_id = account_id
100
137
  @call_id = call_id
101
138
  @application_id = application_id
102
139
  @to = to
@@ -104,12 +141,17 @@ module Bandwidth
104
141
  @start_time = start_time
105
142
  @call_url = call_url
106
143
  @call_timeout = call_timeout
144
+ @callback_timeout = callback_timeout
107
145
  @answer_url = answer_url
108
146
  @answer_method = answer_method
147
+ @answer_fallback_url = answer_fallback_url
148
+ @answer_fallback_method = answer_fallback_method
109
149
  @disconnect_url = disconnect_url
110
150
  @disconnect_method = disconnect_method
111
151
  @username = username
112
152
  @password = password
153
+ @fallback_username = fallback_username
154
+ @fallback_password = fallback_password
113
155
  @tag = tag
114
156
  end
115
157
 
@@ -118,6 +160,7 @@ module Bandwidth
118
160
  return nil unless hash
119
161
 
120
162
  # Extract variables from the hash.
163
+ account_id = hash['accountId']
121
164
  call_id = hash['callId']
122
165
  application_id = hash['applicationId']
123
166
  to = hash['to']
@@ -128,13 +171,19 @@ module Bandwidth
128
171
  disconnect_method = hash['disconnectMethod']
129
172
  start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
130
173
  call_timeout = hash['callTimeout']
174
+ callback_timeout = hash['callbackTimeout']
175
+ answer_fallback_url = hash['answerFallbackUrl']
176
+ answer_fallback_method = hash['answerFallbackMethod']
131
177
  disconnect_url = hash['disconnectUrl']
132
178
  username = hash['username']
133
179
  password = hash['password']
180
+ fallback_username = hash['fallbackUsername']
181
+ fallback_password = hash['fallbackPassword']
134
182
  tag = hash['tag']
135
183
 
136
184
  # Create object from extracted values.
137
- ApiCallResponse.new(call_id,
185
+ ApiCallResponse.new(account_id,
186
+ call_id,
138
187
  application_id,
139
188
  to,
140
189
  from,
@@ -144,9 +193,14 @@ module Bandwidth
144
193
  disconnect_method,
145
194
  start_time,
146
195
  call_timeout,
196
+ callback_timeout,
197
+ answer_fallback_url,
198
+ answer_fallback_method,
147
199
  disconnect_url,
148
200
  username,
149
201
  password,
202
+ fallback_username,
203
+ fallback_password,
150
204
  tag)
151
205
  end
152
206
  end
@@ -0,0 +1,164 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require 'date'
7
+ module Bandwidth
8
+ # ApiCallStateResponse Model.
9
+ class ApiCallStateResponse < BaseModel
10
+ # TODO: Write general description for this method
11
+ # @return [String]
12
+ attr_accessor :call_id
13
+
14
+ # TODO: Write general description for this method
15
+ # @return [String]
16
+ attr_accessor :parent_call_id
17
+
18
+ # TODO: Write general description for this method
19
+ # @return [String]
20
+ attr_accessor :application_id
21
+
22
+ # TODO: Write general description for this method
23
+ # @return [String]
24
+ attr_accessor :account_id
25
+
26
+ # TODO: Write general description for this method
27
+ # @return [String]
28
+ attr_accessor :to
29
+
30
+ # TODO: Write general description for this method
31
+ # @return [String]
32
+ attr_accessor :from
33
+
34
+ # TODO: Write general description for this method
35
+ # @return [String]
36
+ attr_accessor :direction
37
+
38
+ # TODO: Write general description for this method
39
+ # @return [StateEnum]
40
+ attr_accessor :state
41
+
42
+ # TODO: Write general description for this method
43
+ # @return [DateTime]
44
+ attr_accessor :start_time
45
+
46
+ # TODO: Write general description for this method
47
+ # @return [DateTime]
48
+ attr_accessor :answer_time
49
+
50
+ # TODO: Write general description for this method
51
+ # @return [DateTime]
52
+ attr_accessor :end_time
53
+
54
+ # TODO: Write general description for this method
55
+ # @return [DisconnectCauseEnum]
56
+ attr_accessor :disconnect_cause
57
+
58
+ # TODO: Write general description for this method
59
+ # @return [String]
60
+ attr_accessor :error_message
61
+
62
+ # TODO: Write general description for this method
63
+ # @return [String]
64
+ attr_accessor :error_id
65
+
66
+ # TODO: Write general description for this method
67
+ # @return [DateTime]
68
+ attr_accessor :last_update
69
+
70
+ # A mapping from model property names to API property names.
71
+ def self.names
72
+ @_hash = {} if @_hash.nil?
73
+ @_hash['call_id'] = 'callId'
74
+ @_hash['parent_call_id'] = 'parentCallId'
75
+ @_hash['application_id'] = 'applicationId'
76
+ @_hash['account_id'] = 'accountId'
77
+ @_hash['to'] = 'to'
78
+ @_hash['from'] = 'from'
79
+ @_hash['direction'] = 'direction'
80
+ @_hash['state'] = 'state'
81
+ @_hash['start_time'] = 'startTime'
82
+ @_hash['answer_time'] = 'answerTime'
83
+ @_hash['end_time'] = 'endTime'
84
+ @_hash['disconnect_cause'] = 'disconnectCause'
85
+ @_hash['error_message'] = 'errorMessage'
86
+ @_hash['error_id'] = 'errorId'
87
+ @_hash['last_update'] = 'lastUpdate'
88
+ @_hash
89
+ end
90
+
91
+ def initialize(call_id = nil,
92
+ parent_call_id = nil,
93
+ application_id = nil,
94
+ account_id = nil,
95
+ to = nil,
96
+ from = nil,
97
+ direction = nil,
98
+ state = nil,
99
+ start_time = nil,
100
+ answer_time = nil,
101
+ end_time = nil,
102
+ disconnect_cause = nil,
103
+ error_message = nil,
104
+ error_id = nil,
105
+ last_update = nil)
106
+ @call_id = call_id
107
+ @parent_call_id = parent_call_id
108
+ @application_id = application_id
109
+ @account_id = account_id
110
+ @to = to
111
+ @from = from
112
+ @direction = direction
113
+ @state = state
114
+ @start_time = start_time
115
+ @answer_time = answer_time
116
+ @end_time = end_time
117
+ @disconnect_cause = disconnect_cause
118
+ @error_message = error_message
119
+ @error_id = error_id
120
+ @last_update = last_update
121
+ end
122
+
123
+ # Creates an instance of the object from a hash.
124
+ def self.from_hash(hash)
125
+ return nil unless hash
126
+
127
+ # Extract variables from the hash.
128
+ call_id = hash['callId']
129
+ parent_call_id = hash['parentCallId']
130
+ application_id = hash['applicationId']
131
+ account_id = hash['accountId']
132
+ to = hash['to']
133
+ from = hash['from']
134
+ direction = hash['direction']
135
+ state = hash['state']
136
+ start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
137
+ answer_time = APIHelper.rfc3339(hash['answerTime']) if
138
+ hash['answerTime']
139
+ end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime']
140
+ disconnect_cause = hash['disconnectCause']
141
+ error_message = hash['errorMessage']
142
+ error_id = hash['errorId']
143
+ last_update = APIHelper.rfc3339(hash['lastUpdate']) if
144
+ hash['lastUpdate']
145
+
146
+ # Create object from extracted values.
147
+ ApiCallStateResponse.new(call_id,
148
+ parent_call_id,
149
+ application_id,
150
+ account_id,
151
+ to,
152
+ from,
153
+ direction,
154
+ state,
155
+ start_time,
156
+ answer_time,
157
+ end_time,
158
+ disconnect_cause,
159
+ error_message,
160
+ error_id,
161
+ last_update)
162
+ end
163
+ end
164
+ end
@@ -10,60 +10,151 @@ module Bandwidth
10
10
  # @return [String]
11
11
  attr_accessor :from
12
12
 
13
- # Format is E164
13
+ # Format is E164 or SIP URI
14
14
  # @return [String]
15
15
  attr_accessor :to
16
16
 
17
- # Format is E164
17
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
18
+ # within the initial INVITE. An 'encoding' parameter must be specified as
19
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
20
+ # exceed 256 characters, including the encoding parameter.
21
+ # @return [String]
22
+ attr_accessor :uui
23
+
24
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
25
+ # within the initial INVITE. An 'encoding' parameter must be specified as
26
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
27
+ # exceed 256 characters, including the encoding parameter.
18
28
  # @return [Float]
19
29
  attr_accessor :call_timeout
20
30
 
21
- # Format is E164
31
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
32
+ # within the initial INVITE. An 'encoding' parameter must be specified as
33
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
34
+ # exceed 256 characters, including the encoding parameter.
35
+ # @return [Float]
36
+ attr_accessor :callback_timeout
37
+
38
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
39
+ # within the initial INVITE. An 'encoding' parameter must be specified as
40
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
41
+ # exceed 256 characters, including the encoding parameter.
22
42
  # @return [String]
23
43
  attr_accessor :answer_url
24
44
 
25
- # Format is E164
45
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
46
+ # within the initial INVITE. An 'encoding' parameter must be specified as
47
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
48
+ # exceed 256 characters, including the encoding parameter.
49
+ # @return [String]
50
+ attr_accessor :answer_fallback_url
51
+
52
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
53
+ # within the initial INVITE. An 'encoding' parameter must be specified as
54
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
55
+ # exceed 256 characters, including the encoding parameter.
26
56
  # @return [String]
27
57
  attr_accessor :username
28
58
 
29
- # Format is E164
59
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
60
+ # within the initial INVITE. An 'encoding' parameter must be specified as
61
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
62
+ # exceed 256 characters, including the encoding parameter.
30
63
  # @return [String]
31
64
  attr_accessor :password
32
65
 
33
- # Format is E164
66
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
67
+ # within the initial INVITE. An 'encoding' parameter must be specified as
68
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
69
+ # exceed 256 characters, including the encoding parameter.
70
+ # @return [String]
71
+ attr_accessor :fallback_username
72
+
73
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
74
+ # within the initial INVITE. An 'encoding' parameter must be specified as
75
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
76
+ # exceed 256 characters, including the encoding parameter.
77
+ # @return [String]
78
+ attr_accessor :fallback_password
79
+
80
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
81
+ # within the initial INVITE. An 'encoding' parameter must be specified as
82
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
83
+ # exceed 256 characters, including the encoding parameter.
34
84
  # @return [AnswerMethodEnum]
35
85
  attr_accessor :answer_method
36
86
 
37
- # Format is E164
87
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
88
+ # within the initial INVITE. An 'encoding' parameter must be specified as
89
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
90
+ # exceed 256 characters, including the encoding parameter.
91
+ # @return [AnswerFallbackMethodEnum]
92
+ attr_accessor :answer_fallback_method
93
+
94
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
95
+ # within the initial INVITE. An 'encoding' parameter must be specified as
96
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
97
+ # exceed 256 characters, including the encoding parameter.
38
98
  # @return [String]
39
99
  attr_accessor :disconnect_url
40
100
 
41
- # Format is E164
101
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
102
+ # within the initial INVITE. An 'encoding' parameter must be specified as
103
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
104
+ # exceed 256 characters, including the encoding parameter.
42
105
  # @return [DisconnectMethodEnum]
43
106
  attr_accessor :disconnect_method
44
107
 
45
- # Format is E164
108
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
109
+ # within the initial INVITE. An 'encoding' parameter must be specified as
110
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
111
+ # exceed 256 characters, including the encoding parameter.
46
112
  # @return [String]
47
113
  attr_accessor :tag
48
114
 
49
- # Format is E164
115
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
116
+ # within the initial INVITE. An 'encoding' parameter must be specified as
117
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
118
+ # exceed 256 characters, including the encoding parameter.
50
119
  # @return [String]
51
120
  attr_accessor :application_id
52
121
 
122
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
123
+ # within the initial INVITE. An 'encoding' parameter must be specified as
124
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
125
+ # exceed 256 characters, including the encoding parameter.
126
+ # @return [String]
127
+ attr_accessor :obfuscated_to
128
+
129
+ # When calling a SIP URI, this will be sent as the 'User-To-User' header
130
+ # within the initial INVITE. An 'encoding' parameter must be specified as
131
+ # described in https://tools.ietf.org/html/rfc7433. This header cannot
132
+ # exceed 256 characters, including the encoding parameter.
133
+ # @return [String]
134
+ attr_accessor :obfuscated_from
135
+
53
136
  # A mapping from model property names to API property names.
54
137
  def self.names
55
138
  @_hash = {} if @_hash.nil?
56
139
  @_hash['from'] = 'from'
57
140
  @_hash['to'] = 'to'
141
+ @_hash['uui'] = 'uui'
58
142
  @_hash['call_timeout'] = 'callTimeout'
143
+ @_hash['callback_timeout'] = 'callbackTimeout'
59
144
  @_hash['answer_url'] = 'answerUrl'
145
+ @_hash['answer_fallback_url'] = 'answerFallbackUrl'
60
146
  @_hash['username'] = 'username'
61
147
  @_hash['password'] = 'password'
148
+ @_hash['fallback_username'] = 'fallbackUsername'
149
+ @_hash['fallback_password'] = 'fallbackPassword'
62
150
  @_hash['answer_method'] = 'answerMethod'
151
+ @_hash['answer_fallback_method'] = 'answerFallbackMethod'
63
152
  @_hash['disconnect_url'] = 'disconnectUrl'
64
153
  @_hash['disconnect_method'] = 'disconnectMethod'
65
154
  @_hash['tag'] = 'tag'
66
155
  @_hash['application_id'] = 'applicationId'
156
+ @_hash['obfuscated_to'] = 'obfuscatedTo'
157
+ @_hash['obfuscated_from'] = 'obfuscatedFrom'
67
158
  @_hash
68
159
  end
69
160
 
@@ -71,24 +162,40 @@ module Bandwidth
71
162
  to = nil,
72
163
  answer_url = nil,
73
164
  application_id = nil,
165
+ uui = nil,
74
166
  call_timeout = nil,
167
+ callback_timeout = nil,
168
+ answer_fallback_url = nil,
75
169
  username = nil,
76
170
  password = nil,
171
+ fallback_username = nil,
172
+ fallback_password = nil,
77
173
  answer_method = nil,
174
+ answer_fallback_method = nil,
78
175
  disconnect_url = nil,
79
176
  disconnect_method = nil,
80
- tag = nil)
177
+ tag = nil,
178
+ obfuscated_to = nil,
179
+ obfuscated_from = nil)
81
180
  @from = from
82
181
  @to = to
182
+ @uui = uui
83
183
  @call_timeout = call_timeout
184
+ @callback_timeout = callback_timeout
84
185
  @answer_url = answer_url
186
+ @answer_fallback_url = answer_fallback_url
85
187
  @username = username
86
188
  @password = password
189
+ @fallback_username = fallback_username
190
+ @fallback_password = fallback_password
87
191
  @answer_method = answer_method
192
+ @answer_fallback_method = answer_fallback_method
88
193
  @disconnect_url = disconnect_url
89
194
  @disconnect_method = disconnect_method
90
195
  @tag = tag
91
196
  @application_id = application_id
197
+ @obfuscated_to = obfuscated_to
198
+ @obfuscated_from = obfuscated_from
92
199
  end
93
200
 
94
201
  # Creates an instance of the object from a hash.
@@ -100,26 +207,42 @@ module Bandwidth
100
207
  to = hash['to']
101
208
  answer_url = hash['answerUrl']
102
209
  application_id = hash['applicationId']
210
+ uui = hash['uui']
103
211
  call_timeout = hash['callTimeout']
212
+ callback_timeout = hash['callbackTimeout']
213
+ answer_fallback_url = hash['answerFallbackUrl']
104
214
  username = hash['username']
105
215
  password = hash['password']
216
+ fallback_username = hash['fallbackUsername']
217
+ fallback_password = hash['fallbackPassword']
106
218
  answer_method = hash['answerMethod']
219
+ answer_fallback_method = hash['answerFallbackMethod']
107
220
  disconnect_url = hash['disconnectUrl']
108
221
  disconnect_method = hash['disconnectMethod']
109
222
  tag = hash['tag']
223
+ obfuscated_to = hash['obfuscatedTo']
224
+ obfuscated_from = hash['obfuscatedFrom']
110
225
 
111
226
  # Create object from extracted values.
112
227
  ApiCreateCallRequest.new(from,
113
228
  to,
114
229
  answer_url,
115
230
  application_id,
231
+ uui,
116
232
  call_timeout,
233
+ callback_timeout,
234
+ answer_fallback_url,
117
235
  username,
118
236
  password,
237
+ fallback_username,
238
+ fallback_password,
119
239
  answer_method,
240
+ answer_fallback_method,
120
241
  disconnect_url,
121
242
  disconnect_method,
122
- tag)
243
+ tag,
244
+ obfuscated_to,
245
+ obfuscated_from)
123
246
  end
124
247
  end
125
248
  end