bandwidth-sdk 3.9.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/bandwidth/client.rb +2 -0
  4. data/lib/bandwidth/configuration.rb +23 -4
  5. data/lib/bandwidth/http/api_response.rb +2 -0
  6. data/lib/bandwidth/http/faraday_client.rb +9 -2
  7. data/lib/bandwidth/messaging_lib/messaging/client.rb +2 -0
  8. data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +8 -8
  9. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  10. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +2 -0
  11. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/api_controller.rb +3 -3
  12. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +1 -1
  13. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb +0 -19
  14. data/lib/bandwidth/voice_lib/bxml/verbs/bridge.rb +7 -1
  15. data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +5 -1
  16. data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +5 -1
  17. data/lib/bandwidth/voice_lib/bxml/verbs/phone_number.rb +5 -1
  18. data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +5 -1
  19. data/lib/bandwidth/voice_lib/bxml/verbs/redirect.rb +5 -1
  20. data/lib/bandwidth/voice_lib/bxml/verbs/ring.rb +15 -0
  21. data/lib/bandwidth/voice_lib/bxml/verbs/sip_uri.rb +25 -0
  22. data/lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb +20 -0
  23. data/lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb +14 -0
  24. data/lib/bandwidth/voice_lib/bxml/verbs/tag.rb +13 -0
  25. data/lib/bandwidth/voice_lib/bxml/verbs/transfer.rb +14 -3
  26. data/lib/bandwidth/voice_lib/voice/client.rb +2 -0
  27. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +51 -52
  28. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  29. data/lib/bandwidth/voice_lib/voice/models/answer_fallback_method_enum.rb +17 -0
  30. data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +45 -0
  31. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +117 -12
  32. data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +36 -0
  33. data/lib/bandwidth/voice_lib/voice/models/api_modify_conference_request.rb +107 -0
  34. data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +11 -2
  35. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +38 -2
  36. data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +7 -4
  37. data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +5 -4
  38. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +5 -4
  39. data/lib/bandwidth/voice_lib/voice/models/redirect_fallback_method_enum.rb +17 -0
  40. data/lib/bandwidth/voice_lib/voice.rb +3 -1
  41. data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +13 -0
  42. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +2 -0
  43. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +24 -24
  44. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +1 -1
  45. data/lib/bandwidth.rb +24 -1
  46. metadata +13 -4
@@ -22,7 +22,7 @@ module Voice
22
22
  _query_builder << '/api/v2/accounts/{accountId}/calls'
23
23
  _query_builder = APIHelper.append_url_with_template_parameters(
24
24
  _query_builder,
25
- 'accountId' => { 'value' => account_id, 'encode' => true }
25
+ 'accountId' => { 'value' => account_id, 'encode' => false }
26
26
  )
27
27
  _query_url = APIHelper.clean_url _query_builder
28
28
 
@@ -102,8 +102,8 @@ module Voice
102
102
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}'
103
103
  _query_builder = APIHelper.append_url_with_template_parameters(
104
104
  _query_builder,
105
- 'accountId' => { 'value' => account_id, 'encode' => true },
106
- 'callId' => { 'value' => call_id, 'encode' => true }
105
+ 'accountId' => { 'value' => account_id, 'encode' => false },
106
+ 'callId' => { 'value' => call_id, 'encode' => false }
107
107
  )
108
108
  _query_url = APIHelper.clean_url _query_builder
109
109
 
@@ -183,8 +183,8 @@ module Voice
183
183
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}'
184
184
  _query_builder = APIHelper.append_url_with_template_parameters(
185
185
  _query_builder,
186
- 'accountId' => { 'value' => account_id, 'encode' => true },
187
- 'callId' => { 'value' => call_id, 'encode' => true }
186
+ 'accountId' => { 'value' => account_id, 'encode' => false },
187
+ 'callId' => { 'value' => call_id, 'encode' => false }
188
188
  )
189
189
  _query_url = APIHelper.clean_url _query_builder
190
190
 
@@ -262,8 +262,8 @@ module Voice
262
262
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recording'
263
263
  _query_builder = APIHelper.append_url_with_template_parameters(
264
264
  _query_builder,
265
- 'accountId' => { 'value' => account_id, 'encode' => true },
266
- 'callId' => { 'value' => call_id, 'encode' => true }
265
+ 'accountId' => { 'value' => account_id, 'encode' => false },
266
+ 'callId' => { 'value' => call_id, 'encode' => false }
267
267
  )
268
268
  _query_url = APIHelper.clean_url _query_builder
269
269
 
@@ -340,8 +340,8 @@ module Voice
340
340
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings'
341
341
  _query_builder = APIHelper.append_url_with_template_parameters(
342
342
  _query_builder,
343
- 'accountId' => { 'value' => account_id, 'encode' => true },
344
- 'callId' => { 'value' => call_id, 'encode' => true }
343
+ 'accountId' => { 'value' => account_id, 'encode' => false },
344
+ 'callId' => { 'value' => call_id, 'encode' => false }
345
345
  )
346
346
  _query_url = APIHelper.clean_url _query_builder
347
347
 
@@ -422,9 +422,9 @@ module Voice
422
422
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'
423
423
  _query_builder = APIHelper.append_url_with_template_parameters(
424
424
  _query_builder,
425
- 'accountId' => { 'value' => account_id, 'encode' => true },
426
- 'callId' => { 'value' => call_id, 'encode' => true },
427
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
425
+ 'accountId' => { 'value' => account_id, 'encode' => false },
426
+ 'callId' => { 'value' => call_id, 'encode' => false },
427
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
428
428
  )
429
429
  _query_url = APIHelper.clean_url _query_builder
430
430
 
@@ -504,9 +504,9 @@ module Voice
504
504
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'
505
505
  _query_builder = APIHelper.append_url_with_template_parameters(
506
506
  _query_builder,
507
- 'accountId' => { 'value' => account_id, 'encode' => true },
508
- 'callId' => { 'value' => call_id, 'encode' => true },
509
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
507
+ 'accountId' => { 'value' => account_id, 'encode' => false },
508
+ 'callId' => { 'value' => call_id, 'encode' => false },
509
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
510
510
  )
511
511
  _query_url = APIHelper.clean_url _query_builder
512
512
 
@@ -577,9 +577,9 @@ module Voice
577
577
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'
578
578
  _query_builder = APIHelper.append_url_with_template_parameters(
579
579
  _query_builder,
580
- 'accountId' => { 'value' => account_id, 'encode' => true },
581
- 'callId' => { 'value' => call_id, 'encode' => true },
582
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
580
+ 'accountId' => { 'value' => account_id, 'encode' => false },
581
+ 'callId' => { 'value' => call_id, 'encode' => false },
582
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
583
583
  )
584
584
  _query_url = APIHelper.clean_url _query_builder
585
585
 
@@ -652,9 +652,9 @@ module Voice
652
652
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'
653
653
  _query_builder = APIHelper.append_url_with_template_parameters(
654
654
  _query_builder,
655
- 'accountId' => { 'value' => account_id, 'encode' => true },
656
- 'callId' => { 'value' => call_id, 'encode' => true },
657
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
655
+ 'accountId' => { 'value' => account_id, 'encode' => false },
656
+ 'callId' => { 'value' => call_id, 'encode' => false },
657
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
658
658
  )
659
659
  _query_url = APIHelper.clean_url _query_builder
660
660
 
@@ -725,9 +725,9 @@ module Voice
725
725
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'
726
726
  _query_builder = APIHelper.append_url_with_template_parameters(
727
727
  _query_builder,
728
- 'accountId' => { 'value' => account_id, 'encode' => true },
729
- 'callId' => { 'value' => call_id, 'encode' => true },
730
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
728
+ 'accountId' => { 'value' => account_id, 'encode' => false },
729
+ 'callId' => { 'value' => call_id, 'encode' => false },
730
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
731
731
  )
732
732
  _query_url = APIHelper.clean_url _query_builder
733
733
 
@@ -809,9 +809,9 @@ module Voice
809
809
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'
810
810
  _query_builder = APIHelper.append_url_with_template_parameters(
811
811
  _query_builder,
812
- 'accountId' => { 'value' => account_id, 'encode' => true },
813
- 'callId' => { 'value' => call_id, 'encode' => true },
814
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
812
+ 'accountId' => { 'value' => account_id, 'encode' => false },
813
+ 'callId' => { 'value' => call_id, 'encode' => false },
814
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
815
815
  )
816
816
  _query_url = APIHelper.clean_url _query_builder
817
817
 
@@ -895,9 +895,9 @@ module Voice
895
895
  _query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'
896
896
  _query_builder = APIHelper.append_url_with_template_parameters(
897
897
  _query_builder,
898
- 'accountId' => { 'value' => account_id, 'encode' => true },
899
- 'callId' => { 'value' => call_id, 'encode' => true },
900
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
898
+ 'accountId' => { 'value' => account_id, 'encode' => false },
899
+ 'callId' => { 'value' => call_id, 'encode' => false },
900
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
901
901
  )
902
902
  _query_url = APIHelper.clean_url _query_builder
903
903
 
@@ -974,7 +974,7 @@ module Voice
974
974
  _query_builder << '/api/v2/accounts/{accountId}/conferences'
975
975
  _query_builder = APIHelper.append_url_with_template_parameters(
976
976
  _query_builder,
977
- 'accountId' => { 'value' => account_id, 'encode' => true }
977
+ 'accountId' => { 'value' => account_id, 'encode' => false }
978
978
  )
979
979
  _query_builder = APIHelper.append_url_with_query_parameters(
980
980
  _query_builder,
@@ -1061,8 +1061,8 @@ module Voice
1061
1061
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}'
1062
1062
  _query_builder = APIHelper.append_url_with_template_parameters(
1063
1063
  _query_builder,
1064
- 'accountId' => { 'value' => account_id, 'encode' => true },
1065
- 'conferenceId' => { 'value' => conference_id, 'encode' => true }
1064
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1065
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false }
1066
1066
  )
1067
1067
  _query_url = APIHelper.clean_url _query_builder
1068
1068
 
@@ -1132,8 +1132,7 @@ module Voice
1132
1132
  # Modify the conference state
1133
1133
  # @param [String] account_id Required parameter: Example:
1134
1134
  # @param [String] conference_id Required parameter: Example:
1135
- # @param [CallEngineModifyConferenceRequest] body Optional parameter:
1136
- # Example:
1135
+ # @param [ApiModifyConferenceRequest] body Optional parameter: Example:
1137
1136
  # @return [void] response from the API call
1138
1137
  def modify_conference(account_id,
1139
1138
  conference_id,
@@ -1143,8 +1142,8 @@ module Voice
1143
1142
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}'
1144
1143
  _query_builder = APIHelper.append_url_with_template_parameters(
1145
1144
  _query_builder,
1146
- 'accountId' => { 'value' => account_id, 'encode' => true },
1147
- 'conferenceId' => { 'value' => conference_id, 'encode' => true }
1145
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1146
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false }
1148
1147
  )
1149
1148
  _query_url = APIHelper.clean_url _query_builder
1150
1149
 
@@ -1224,9 +1223,9 @@ module Voice
1224
1223
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/members/{callId}'
1225
1224
  _query_builder = APIHelper.append_url_with_template_parameters(
1226
1225
  _query_builder,
1227
- 'accountId' => { 'value' => account_id, 'encode' => true },
1228
- 'conferenceId' => { 'value' => conference_id, 'encode' => true },
1229
- 'callId' => { 'value' => call_id, 'encode' => true }
1226
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1227
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false },
1228
+ 'callId' => { 'value' => call_id, 'encode' => false }
1230
1229
  )
1231
1230
  _query_url = APIHelper.clean_url _query_builder
1232
1231
 
@@ -1304,9 +1303,9 @@ module Voice
1304
1303
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}'
1305
1304
  _query_builder = APIHelper.append_url_with_template_parameters(
1306
1305
  _query_builder,
1307
- 'accountId' => { 'value' => account_id, 'encode' => true },
1308
- 'conferenceId' => { 'value' => conference_id, 'encode' => true },
1309
- 'memberId' => { 'value' => member_id, 'encode' => true }
1306
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1307
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false },
1308
+ 'memberId' => { 'value' => member_id, 'encode' => false }
1310
1309
  )
1311
1310
  _query_url = APIHelper.clean_url _query_builder
1312
1311
 
@@ -1385,8 +1384,8 @@ module Voice
1385
1384
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings'
1386
1385
  _query_builder = APIHelper.append_url_with_template_parameters(
1387
1386
  _query_builder,
1388
- 'accountId' => { 'value' => account_id, 'encode' => true },
1389
- 'conferenceId' => { 'value' => conference_id, 'encode' => true }
1387
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1388
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false }
1390
1389
  )
1391
1390
  _query_url = APIHelper.clean_url _query_builder
1392
1391
 
@@ -1467,9 +1466,9 @@ module Voice
1467
1466
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}'
1468
1467
  _query_builder = APIHelper.append_url_with_template_parameters(
1469
1468
  _query_builder,
1470
- 'accountId' => { 'value' => account_id, 'encode' => true },
1471
- 'conferenceId' => { 'value' => conference_id, 'encode' => true },
1472
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
1469
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1470
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false },
1471
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
1473
1472
  )
1474
1473
  _query_url = APIHelper.clean_url _query_builder
1475
1474
 
@@ -1549,9 +1548,9 @@ module Voice
1549
1548
  _query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media'
1550
1549
  _query_builder = APIHelper.append_url_with_template_parameters(
1551
1550
  _query_builder,
1552
- 'accountId' => { 'value' => account_id, 'encode' => true },
1553
- 'conferenceId' => { 'value' => conference_id, 'encode' => true },
1554
- 'recordingId' => { 'value' => recording_id, 'encode' => true }
1551
+ 'accountId' => { 'value' => account_id, 'encode' => false },
1552
+ 'conferenceId' => { 'value' => conference_id, 'encode' => false },
1553
+ 'recordingId' => { 'value' => recording_id, 'encode' => false }
1555
1554
  )
1556
1555
  _query_url = APIHelper.clean_url _query_builder
1557
1556
 
@@ -1631,7 +1630,7 @@ module Voice
1631
1630
  _query_builder << '/api/v2/accounts/{accountId}/recordings'
1632
1631
  _query_builder = APIHelper.append_url_with_template_parameters(
1633
1632
  _query_builder,
1634
- 'accountId' => { 'value' => account_id, 'encode' => true }
1633
+ 'accountId' => { 'value' => account_id, 'encode' => false }
1635
1634
  )
1636
1635
  _query_builder = APIHelper.append_url_with_query_parameters(
1637
1636
  _query_builder,
@@ -13,7 +13,7 @@ module Bandwidth
13
13
  @http_call_back = http_call_back
14
14
 
15
15
  @global_headers = {
16
- 'user-agent' => 'ruby-sdk-refs/tags/ruby3.9.0'
16
+ 'user-agent' => 'ruby-sdk'
17
17
  }
18
18
  end
19
19
 
@@ -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
@@ -39,6 +39,10 @@ module Bandwidth
39
39
  # @return [Float]
40
40
  attr_accessor :call_timeout
41
41
 
42
+ # TODO: Write general description for this method
43
+ # @return [Float]
44
+ attr_accessor :callback_timeout
45
+
42
46
  # TODO: Write general description for this method
43
47
  # @return [String]
44
48
  attr_accessor :answer_url
@@ -47,6 +51,14 @@ module Bandwidth
47
51
  # @return [AnswerMethodEnum]
48
52
  attr_accessor :answer_method
49
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
+
50
62
  # TODO: Write general description for this method
51
63
  # @return [String]
52
64
  attr_accessor :disconnect_url
@@ -63,6 +75,14 @@ module Bandwidth
63
75
  # @return [String]
64
76
  attr_accessor :password
65
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
+
66
86
  # TODO: Write general description for this method
67
87
  # @return [String]
68
88
  attr_accessor :tag
@@ -78,12 +98,17 @@ module Bandwidth
78
98
  @_hash['start_time'] = 'startTime'
79
99
  @_hash['call_url'] = 'callUrl'
80
100
  @_hash['call_timeout'] = 'callTimeout'
101
+ @_hash['callback_timeout'] = 'callbackTimeout'
81
102
  @_hash['answer_url'] = 'answerUrl'
82
103
  @_hash['answer_method'] = 'answerMethod'
104
+ @_hash['answer_fallback_url'] = 'answerFallbackUrl'
105
+ @_hash['answer_fallback_method'] = 'answerFallbackMethod'
83
106
  @_hash['disconnect_url'] = 'disconnectUrl'
84
107
  @_hash['disconnect_method'] = 'disconnectMethod'
85
108
  @_hash['username'] = 'username'
86
109
  @_hash['password'] = 'password'
110
+ @_hash['fallback_username'] = 'fallbackUsername'
111
+ @_hash['fallback_password'] = 'fallbackPassword'
87
112
  @_hash['tag'] = 'tag'
88
113
  @_hash
89
114
  end
@@ -99,9 +124,14 @@ module Bandwidth
99
124
  disconnect_method = nil,
100
125
  start_time = nil,
101
126
  call_timeout = nil,
127
+ callback_timeout = nil,
128
+ answer_fallback_url = nil,
129
+ answer_fallback_method = nil,
102
130
  disconnect_url = nil,
103
131
  username = nil,
104
132
  password = nil,
133
+ fallback_username = nil,
134
+ fallback_password = nil,
105
135
  tag = nil)
106
136
  @account_id = account_id
107
137
  @call_id = call_id
@@ -111,12 +141,17 @@ module Bandwidth
111
141
  @start_time = start_time
112
142
  @call_url = call_url
113
143
  @call_timeout = call_timeout
144
+ @callback_timeout = callback_timeout
114
145
  @answer_url = answer_url
115
146
  @answer_method = answer_method
147
+ @answer_fallback_url = answer_fallback_url
148
+ @answer_fallback_method = answer_fallback_method
116
149
  @disconnect_url = disconnect_url
117
150
  @disconnect_method = disconnect_method
118
151
  @username = username
119
152
  @password = password
153
+ @fallback_username = fallback_username
154
+ @fallback_password = fallback_password
120
155
  @tag = tag
121
156
  end
122
157
 
@@ -136,9 +171,14 @@ module Bandwidth
136
171
  disconnect_method = hash['disconnectMethod']
137
172
  start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
138
173
  call_timeout = hash['callTimeout']
174
+ callback_timeout = hash['callbackTimeout']
175
+ answer_fallback_url = hash['answerFallbackUrl']
176
+ answer_fallback_method = hash['answerFallbackMethod']
139
177
  disconnect_url = hash['disconnectUrl']
140
178
  username = hash['username']
141
179
  password = hash['password']
180
+ fallback_username = hash['fallbackUsername']
181
+ fallback_password = hash['fallbackPassword']
142
182
  tag = hash['tag']
143
183
 
144
184
  # Create object from extracted values.
@@ -153,9 +193,14 @@ module Bandwidth
153
193
  disconnect_method,
154
194
  start_time,
155
195
  call_timeout,
196
+ callback_timeout,
197
+ answer_fallback_url,
198
+ answer_fallback_method,
156
199
  disconnect_url,
157
200
  username,
158
201
  password,
202
+ fallback_username,
203
+ fallback_password,
159
204
  tag)
160
205
  end
161
206
  end
@@ -10,51 +10,126 @@ 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
 
53
- # Format is E164
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.
54
126
  # @return [String]
55
127
  attr_accessor :obfuscated_to
56
128
 
57
- # Format is E164
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.
58
133
  # @return [String]
59
134
  attr_accessor :obfuscated_from
60
135
 
@@ -63,11 +138,17 @@ module Bandwidth
63
138
  @_hash = {} if @_hash.nil?
64
139
  @_hash['from'] = 'from'
65
140
  @_hash['to'] = 'to'
141
+ @_hash['uui'] = 'uui'
66
142
  @_hash['call_timeout'] = 'callTimeout'
143
+ @_hash['callback_timeout'] = 'callbackTimeout'
67
144
  @_hash['answer_url'] = 'answerUrl'
145
+ @_hash['answer_fallback_url'] = 'answerFallbackUrl'
68
146
  @_hash['username'] = 'username'
69
147
  @_hash['password'] = 'password'
148
+ @_hash['fallback_username'] = 'fallbackUsername'
149
+ @_hash['fallback_password'] = 'fallbackPassword'
70
150
  @_hash['answer_method'] = 'answerMethod'
151
+ @_hash['answer_fallback_method'] = 'answerFallbackMethod'
71
152
  @_hash['disconnect_url'] = 'disconnectUrl'
72
153
  @_hash['disconnect_method'] = 'disconnectMethod'
73
154
  @_hash['tag'] = 'tag'
@@ -81,10 +162,16 @@ module Bandwidth
81
162
  to = nil,
82
163
  answer_url = nil,
83
164
  application_id = nil,
165
+ uui = nil,
84
166
  call_timeout = nil,
167
+ callback_timeout = nil,
168
+ answer_fallback_url = nil,
85
169
  username = nil,
86
170
  password = nil,
171
+ fallback_username = nil,
172
+ fallback_password = nil,
87
173
  answer_method = nil,
174
+ answer_fallback_method = nil,
88
175
  disconnect_url = nil,
89
176
  disconnect_method = nil,
90
177
  tag = nil,
@@ -92,11 +179,17 @@ module Bandwidth
92
179
  obfuscated_from = nil)
93
180
  @from = from
94
181
  @to = to
182
+ @uui = uui
95
183
  @call_timeout = call_timeout
184
+ @callback_timeout = callback_timeout
96
185
  @answer_url = answer_url
186
+ @answer_fallback_url = answer_fallback_url
97
187
  @username = username
98
188
  @password = password
189
+ @fallback_username = fallback_username
190
+ @fallback_password = fallback_password
99
191
  @answer_method = answer_method
192
+ @answer_fallback_method = answer_fallback_method
100
193
  @disconnect_url = disconnect_url
101
194
  @disconnect_method = disconnect_method
102
195
  @tag = tag
@@ -114,10 +207,16 @@ module Bandwidth
114
207
  to = hash['to']
115
208
  answer_url = hash['answerUrl']
116
209
  application_id = hash['applicationId']
210
+ uui = hash['uui']
117
211
  call_timeout = hash['callTimeout']
212
+ callback_timeout = hash['callbackTimeout']
213
+ answer_fallback_url = hash['answerFallbackUrl']
118
214
  username = hash['username']
119
215
  password = hash['password']
216
+ fallback_username = hash['fallbackUsername']
217
+ fallback_password = hash['fallbackPassword']
120
218
  answer_method = hash['answerMethod']
219
+ answer_fallback_method = hash['answerFallbackMethod']
121
220
  disconnect_url = hash['disconnectUrl']
122
221
  disconnect_method = hash['disconnectMethod']
123
222
  tag = hash['tag']
@@ -129,10 +228,16 @@ module Bandwidth
129
228
  to,
130
229
  answer_url,
131
230
  application_id,
231
+ uui,
132
232
  call_timeout,
233
+ callback_timeout,
234
+ answer_fallback_url,
133
235
  username,
134
236
  password,
237
+ fallback_username,
238
+ fallback_password,
135
239
  answer_method,
240
+ answer_fallback_method,
136
241
  disconnect_url,
137
242
  disconnect_method,
138
243
  tag,