bandwidth-sdk 3.8.0 → 3.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bandwidth.rb +24 -1
  3. data/lib/bandwidth/client.rb +2 -0
  4. data/lib/bandwidth/configuration.rb +23 -4
  5. data/lib/bandwidth/messaging_lib/messaging/client.rb +2 -0
  6. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  7. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +2 -0
  8. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +1 -1
  9. data/lib/bandwidth/voice_lib/bxml/verbs/bridge.rb +7 -1
  10. data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +5 -1
  11. data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +5 -1
  12. data/lib/bandwidth/voice_lib/bxml/verbs/phone_number.rb +5 -1
  13. data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +5 -1
  14. data/lib/bandwidth/voice_lib/bxml/verbs/redirect.rb +5 -1
  15. data/lib/bandwidth/voice_lib/bxml/verbs/ring.rb +15 -0
  16. data/lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb +20 -0
  17. data/lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb +14 -0
  18. data/lib/bandwidth/voice_lib/bxml/verbs/transfer.rb +5 -1
  19. data/lib/bandwidth/voice_lib/voice.rb +5 -2
  20. data/lib/bandwidth/voice_lib/voice/client.rb +2 -0
  21. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +416 -16
  22. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  23. data/lib/bandwidth/voice_lib/voice/models/answer_fallback_method_enum.rb +17 -0
  24. data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +45 -0
  25. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +45 -0
  26. data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +36 -0
  27. data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +11 -2
  28. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +74 -2
  29. data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +7 -4
  30. data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +126 -0
  31. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +32 -4
  32. data/lib/bandwidth/voice_lib/voice/models/redirect_fallback_method_enum.rb +17 -0
  33. data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +3 -3
  34. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +4 -1
  35. data/lib/bandwidth/voice_lib/voice/models/{status2_enum.rb → status3_enum.rb} +3 -3
  36. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +1 -1
  37. data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +13 -0
  38. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +2 -0
  39. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +1 -1
  40. metadata +30 -11
@@ -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.8.0'
16
+ 'user-agent' => 'ruby-sdk-refs/tags/ruby3.12.1'
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
@@ -18,10 +18,18 @@ module Bandwidth
18
18
  # @return [Float]
19
19
  attr_accessor :call_timeout
20
20
 
21
+ # Format is E164
22
+ # @return [Float]
23
+ attr_accessor :callback_timeout
24
+
21
25
  # Format is E164
22
26
  # @return [String]
23
27
  attr_accessor :answer_url
24
28
 
29
+ # Format is E164
30
+ # @return [String]
31
+ attr_accessor :answer_fallback_url
32
+
25
33
  # Format is E164
26
34
  # @return [String]
27
35
  attr_accessor :username
@@ -30,10 +38,22 @@ module Bandwidth
30
38
  # @return [String]
31
39
  attr_accessor :password
32
40
 
41
+ # Format is E164
42
+ # @return [String]
43
+ attr_accessor :fallback_username
44
+
45
+ # Format is E164
46
+ # @return [String]
47
+ attr_accessor :fallback_password
48
+
33
49
  # Format is E164
34
50
  # @return [AnswerMethodEnum]
35
51
  attr_accessor :answer_method
36
52
 
53
+ # Format is E164
54
+ # @return [AnswerFallbackMethodEnum]
55
+ attr_accessor :answer_fallback_method
56
+
37
57
  # Format is E164
38
58
  # @return [String]
39
59
  attr_accessor :disconnect_url
@@ -64,10 +84,15 @@ module Bandwidth
64
84
  @_hash['from'] = 'from'
65
85
  @_hash['to'] = 'to'
66
86
  @_hash['call_timeout'] = 'callTimeout'
87
+ @_hash['callback_timeout'] = 'callbackTimeout'
67
88
  @_hash['answer_url'] = 'answerUrl'
89
+ @_hash['answer_fallback_url'] = 'answerFallbackUrl'
68
90
  @_hash['username'] = 'username'
69
91
  @_hash['password'] = 'password'
92
+ @_hash['fallback_username'] = 'fallbackUsername'
93
+ @_hash['fallback_password'] = 'fallbackPassword'
70
94
  @_hash['answer_method'] = 'answerMethod'
95
+ @_hash['answer_fallback_method'] = 'answerFallbackMethod'
71
96
  @_hash['disconnect_url'] = 'disconnectUrl'
72
97
  @_hash['disconnect_method'] = 'disconnectMethod'
73
98
  @_hash['tag'] = 'tag'
@@ -82,9 +107,14 @@ module Bandwidth
82
107
  answer_url = nil,
83
108
  application_id = nil,
84
109
  call_timeout = nil,
110
+ callback_timeout = nil,
111
+ answer_fallback_url = nil,
85
112
  username = nil,
86
113
  password = nil,
114
+ fallback_username = nil,
115
+ fallback_password = nil,
87
116
  answer_method = nil,
117
+ answer_fallback_method = nil,
88
118
  disconnect_url = nil,
89
119
  disconnect_method = nil,
90
120
  tag = nil,
@@ -93,10 +123,15 @@ module Bandwidth
93
123
  @from = from
94
124
  @to = to
95
125
  @call_timeout = call_timeout
126
+ @callback_timeout = callback_timeout
96
127
  @answer_url = answer_url
128
+ @answer_fallback_url = answer_fallback_url
97
129
  @username = username
98
130
  @password = password
131
+ @fallback_username = fallback_username
132
+ @fallback_password = fallback_password
99
133
  @answer_method = answer_method
134
+ @answer_fallback_method = answer_fallback_method
100
135
  @disconnect_url = disconnect_url
101
136
  @disconnect_method = disconnect_method
102
137
  @tag = tag
@@ -115,9 +150,14 @@ module Bandwidth
115
150
  answer_url = hash['answerUrl']
116
151
  application_id = hash['applicationId']
117
152
  call_timeout = hash['callTimeout']
153
+ callback_timeout = hash['callbackTimeout']
154
+ answer_fallback_url = hash['answerFallbackUrl']
118
155
  username = hash['username']
119
156
  password = hash['password']
157
+ fallback_username = hash['fallbackUsername']
158
+ fallback_password = hash['fallbackPassword']
120
159
  answer_method = hash['answerMethod']
160
+ answer_fallback_method = hash['answerFallbackMethod']
121
161
  disconnect_url = hash['disconnectUrl']
122
162
  disconnect_method = hash['disconnectMethod']
123
163
  tag = hash['tag']
@@ -130,9 +170,14 @@ module Bandwidth
130
170
  answer_url,
131
171
  application_id,
132
172
  call_timeout,
173
+ callback_timeout,
174
+ answer_fallback_url,
133
175
  username,
134
176
  password,
177
+ fallback_username,
178
+ fallback_password,
135
179
  answer_method,
180
+ answer_fallback_method,
136
181
  disconnect_url,
137
182
  disconnect_method,
138
183
  tag,
@@ -14,10 +14,18 @@ module Bandwidth
14
14
  # @return [String]
15
15
  attr_accessor :redirect_url
16
16
 
17
+ # TODO: Write general description for this method
18
+ # @return [String]
19
+ attr_accessor :redirect_fallback_url
20
+
17
21
  # TODO: Write general description for this method
18
22
  # @return [RedirectMethodEnum]
19
23
  attr_accessor :redirect_method
20
24
 
25
+ # TODO: Write general description for this method
26
+ # @return [RedirectFallbackMethodEnum]
27
+ attr_accessor :redirect_fallback_method
28
+
21
29
  # TODO: Write general description for this method
22
30
  # @return [String]
23
31
  attr_accessor :username
@@ -26,6 +34,14 @@ module Bandwidth
26
34
  # @return [String]
27
35
  attr_accessor :password
28
36
 
37
+ # TODO: Write general description for this method
38
+ # @return [String]
39
+ attr_accessor :fallback_username
40
+
41
+ # TODO: Write general description for this method
42
+ # @return [String]
43
+ attr_accessor :fallback_password
44
+
29
45
  # TODO: Write general description for this method
30
46
  # @return [String]
31
47
  attr_accessor :tag
@@ -35,24 +51,36 @@ module Bandwidth
35
51
  @_hash = {} if @_hash.nil?
36
52
  @_hash['state'] = 'state'
37
53
  @_hash['redirect_url'] = 'redirectUrl'
54
+ @_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
38
55
  @_hash['redirect_method'] = 'redirectMethod'
56
+ @_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
39
57
  @_hash['username'] = 'username'
40
58
  @_hash['password'] = 'password'
59
+ @_hash['fallback_username'] = 'fallbackUsername'
60
+ @_hash['fallback_password'] = 'fallbackPassword'
41
61
  @_hash['tag'] = 'tag'
42
62
  @_hash
43
63
  end
44
64
 
45
65
  def initialize(redirect_url = nil,
46
66
  state = nil,
67
+ redirect_fallback_url = nil,
47
68
  redirect_method = nil,
69
+ redirect_fallback_method = nil,
48
70
  username = nil,
49
71
  password = nil,
72
+ fallback_username = nil,
73
+ fallback_password = nil,
50
74
  tag = nil)
51
75
  @state = state
52
76
  @redirect_url = redirect_url
77
+ @redirect_fallback_url = redirect_fallback_url
53
78
  @redirect_method = redirect_method
79
+ @redirect_fallback_method = redirect_fallback_method
54
80
  @username = username
55
81
  @password = password
82
+ @fallback_username = fallback_username
83
+ @fallback_password = fallback_password
56
84
  @tag = tag
57
85
  end
58
86
 
@@ -63,17 +91,25 @@ module Bandwidth
63
91
  # Extract variables from the hash.
64
92
  redirect_url = hash['redirectUrl']
65
93
  state = hash['state']
94
+ redirect_fallback_url = hash['redirectFallbackUrl']
66
95
  redirect_method = hash['redirectMethod']
96
+ redirect_fallback_method = hash['redirectFallbackMethod']
67
97
  username = hash['username']
68
98
  password = hash['password']
99
+ fallback_username = hash['fallbackUsername']
100
+ fallback_password = hash['fallbackPassword']
69
101
  tag = hash['tag']
70
102
 
71
103
  # Create object from extracted values.
72
104
  ApiModifyCallRequest.new(redirect_url,
73
105
  state,
106
+ redirect_fallback_url,
74
107
  redirect_method,
108
+ redirect_fallback_method,
75
109
  username,
76
110
  password,
111
+ fallback_username,
112
+ fallback_password,
77
113
  tag)
78
114
  end
79
115
  end
@@ -26,6 +26,10 @@ module Bandwidth
26
26
  # @return [String]
27
27
  attr_accessor :tag
28
28
 
29
+ # TODO: Write general description for this method
30
+ # @return [Float]
31
+ attr_accessor :callback_timeout
32
+
29
33
  # A mapping from model property names to API property names.
30
34
  def self.names
31
35
  @_hash = {} if @_hash.nil?
@@ -34,6 +38,7 @@ module Bandwidth
34
38
  @_hash['username'] = 'username'
35
39
  @_hash['password'] = 'password'
36
40
  @_hash['tag'] = 'tag'
41
+ @_hash['callback_timeout'] = 'callbackTimeout'
37
42
  @_hash
38
43
  end
39
44
 
@@ -41,12 +46,14 @@ module Bandwidth
41
46
  callback_method = nil,
42
47
  username = nil,
43
48
  password = nil,
44
- tag = nil)
49
+ tag = nil,
50
+ callback_timeout = nil)
45
51
  @callback_url = callback_url
46
52
  @callback_method = callback_method
47
53
  @username = username
48
54
  @password = password
49
55
  @tag = tag
56
+ @callback_timeout = callback_timeout
50
57
  end
51
58
 
52
59
  # Creates an instance of the object from a hash.
@@ -59,13 +66,15 @@ module Bandwidth
59
66
  username = hash['username']
60
67
  password = hash['password']
61
68
  tag = hash['tag']
69
+ callback_timeout = hash['callbackTimeout']
62
70
 
63
71
  # Create object from extracted values.
64
72
  ApiTranscribeRecordingRequest.new(callback_url,
65
73
  callback_method,
66
74
  username,
67
75
  password,
68
- tag)
76
+ tag,
77
+ callback_timeout)
69
78
  end
70
79
  end
71
80
  end
@@ -10,15 +10,71 @@ module Bandwidth
10
10
  # @return [StatusEnum]
11
11
  attr_accessor :status
12
12
 
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :redirect_url
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [String]
19
+ attr_accessor :redirect_fallback_url
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [RedirectMethodEnum]
23
+ attr_accessor :redirect_method
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [RedirectFallbackMethodEnum]
27
+ attr_accessor :redirect_fallback_method
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [String]
31
+ attr_accessor :username
32
+
33
+ # TODO: Write general description for this method
34
+ # @return [String]
35
+ attr_accessor :password
36
+
37
+ # TODO: Write general description for this method
38
+ # @return [String]
39
+ attr_accessor :fallback_username
40
+
41
+ # TODO: Write general description for this method
42
+ # @return [String]
43
+ attr_accessor :fallback_password
44
+
13
45
  # A mapping from model property names to API property names.
14
46
  def self.names
15
47
  @_hash = {} if @_hash.nil?
16
48
  @_hash['status'] = 'status'
49
+ @_hash['redirect_url'] = 'redirectUrl'
50
+ @_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
51
+ @_hash['redirect_method'] = 'redirectMethod'
52
+ @_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
53
+ @_hash['username'] = 'username'
54
+ @_hash['password'] = 'password'
55
+ @_hash['fallback_username'] = 'fallbackUsername'
56
+ @_hash['fallback_password'] = 'fallbackPassword'
17
57
  @_hash
18
58
  end
19
59
 
20
- def initialize(status = nil)
60
+ def initialize(redirect_url = nil,
61
+ status = nil,
62
+ redirect_fallback_url = nil,
63
+ redirect_method = nil,
64
+ redirect_fallback_method = nil,
65
+ username = nil,
66
+ password = nil,
67
+ fallback_username = nil,
68
+ fallback_password = nil)
21
69
  @status = status
70
+ @redirect_url = redirect_url
71
+ @redirect_fallback_url = redirect_fallback_url
72
+ @redirect_method = redirect_method
73
+ @redirect_fallback_method = redirect_fallback_method
74
+ @username = username
75
+ @password = password
76
+ @fallback_username = fallback_username
77
+ @fallback_password = fallback_password
22
78
  end
23
79
 
24
80
  # Creates an instance of the object from a hash.
@@ -26,10 +82,26 @@ module Bandwidth
26
82
  return nil unless hash
27
83
 
28
84
  # Extract variables from the hash.
85
+ redirect_url = hash['redirectUrl']
29
86
  status = hash['status']
87
+ redirect_fallback_url = hash['redirectFallbackUrl']
88
+ redirect_method = hash['redirectMethod']
89
+ redirect_fallback_method = hash['redirectFallbackMethod']
90
+ username = hash['username']
91
+ password = hash['password']
92
+ fallback_username = hash['fallbackUsername']
93
+ fallback_password = hash['fallbackPassword']
30
94
 
31
95
  # Create object from extracted values.
32
- CallEngineModifyConferenceRequest.new(status)
96
+ CallEngineModifyConferenceRequest.new(redirect_url,
97
+ status,
98
+ redirect_fallback_url,
99
+ redirect_method,
100
+ redirect_fallback_method,
101
+ username,
102
+ password,
103
+ fallback_username,
104
+ fallback_password)
33
105
  end
34
106
  end
35
107
  end