bandwidth-sdk 9.4.1 → 10.0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f647905f7c08b4614b21b7ca9278210ed8ff6f532f4b0cd09f1c705852c5567
|
4
|
+
data.tar.gz: '00348580d308e3fccd81a42642daed1a3b6a39562feb953d0789cbf750a79f0f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c001719da52d9026ea151cb5f95229b0a1ef8b864c7bede8d48c02856f742c0124be304982d350be46ca399cd074170b957cc7a4b887c964f68a41cdf6385ca5
|
7
|
+
data.tar.gz: 3efb5225670bc0b6cc86088afa4ee45b8e9ecc5f023d33ff33ff6072454f0599474a4d575cfe0db2c2d85d70ca304cde445623f8f25b3f26d03d099da92c545f
|
@@ -62,6 +62,9 @@ module Bandwidth
|
|
62
62
|
# @return [DateTime]
|
63
63
|
attr_accessor :start_time
|
64
64
|
|
65
|
+
# @return [DateTime]
|
66
|
+
attr_accessor :enqueued_time
|
67
|
+
|
65
68
|
# The current state of the call. Current possible values are 'initiated',
|
66
69
|
# 'answered' and 'disconnected'. Additional states may be added in the
|
67
70
|
# future, so your application must be tolerant of unknown values.
|
@@ -124,6 +127,7 @@ module Bandwidth
|
|
124
127
|
@_hash['identity'] = 'identity'
|
125
128
|
@_hash['stir_shaken'] = 'stirShaken'
|
126
129
|
@_hash['start_time'] = 'startTime'
|
130
|
+
@_hash['enqueued_time'] = 'enqueuedTime'
|
127
131
|
@_hash['answer_time'] = 'answerTime'
|
128
132
|
@_hash['end_time'] = 'endTime'
|
129
133
|
@_hash['disconnect_cause'] = 'disconnectCause'
|
@@ -147,6 +151,7 @@ module Bandwidth
|
|
147
151
|
identity
|
148
152
|
stir_shaken
|
149
153
|
start_time
|
154
|
+
enqueued_time
|
150
155
|
answer_time
|
151
156
|
end_time
|
152
157
|
disconnect_cause
|
@@ -180,6 +185,7 @@ module Bandwidth
|
|
180
185
|
identity = nil,
|
181
186
|
stir_shaken = nil,
|
182
187
|
start_time = nil,
|
188
|
+
enqueued_time = nil,
|
183
189
|
answer_time = nil,
|
184
190
|
end_time = nil,
|
185
191
|
disconnect_cause = nil,
|
@@ -197,6 +203,7 @@ module Bandwidth
|
|
197
203
|
@identity = identity unless identity == SKIP
|
198
204
|
@stir_shaken = stir_shaken unless stir_shaken == SKIP
|
199
205
|
@start_time = start_time unless start_time == SKIP
|
206
|
+
@enqueued_time = enqueued_time unless enqueued_time == SKIP
|
200
207
|
@answer_time = answer_time unless answer_time == SKIP
|
201
208
|
@end_time = end_time unless end_time == SKIP
|
202
209
|
@disconnect_cause = disconnect_cause unless disconnect_cause == SKIP
|
@@ -221,17 +228,22 @@ module Bandwidth
|
|
221
228
|
identity = hash.key?('identity') ? hash['identity'] : SKIP
|
222
229
|
stir_shaken = hash.key?('stirShaken') ? hash['stirShaken'] : SKIP
|
223
230
|
start_time = if hash.key?('startTime')
|
224
|
-
|
231
|
+
(DateTimeHelper.from_rfc3339(hash['startTime']) if hash['startTime'])
|
225
232
|
else
|
226
233
|
SKIP
|
227
234
|
end
|
235
|
+
enqueued_time = if hash.key?('enqueuedTime')
|
236
|
+
(DateTimeHelper.from_rfc3339(hash['enqueuedTime']) if hash['enqueuedTime'])
|
237
|
+
else
|
238
|
+
SKIP
|
239
|
+
end
|
228
240
|
answer_time = if hash.key?('answerTime')
|
229
241
|
(DateTimeHelper.from_rfc3339(hash['answerTime']) if hash['answerTime'])
|
230
242
|
else
|
231
243
|
SKIP
|
232
244
|
end
|
233
245
|
end_time = if hash.key?('endTime')
|
234
|
-
|
246
|
+
(DateTimeHelper.from_rfc3339(hash['endTime']) if hash['endTime'])
|
235
247
|
else
|
236
248
|
SKIP
|
237
249
|
end
|
@@ -257,6 +269,7 @@ module Bandwidth
|
|
257
269
|
identity,
|
258
270
|
stir_shaken,
|
259
271
|
start_time,
|
272
|
+
enqueued_time,
|
260
273
|
answer_time,
|
261
274
|
end_time,
|
262
275
|
disconnect_cause,
|
@@ -269,6 +282,10 @@ module Bandwidth
|
|
269
282
|
DateTimeHelper.to_rfc3339(start_time)
|
270
283
|
end
|
271
284
|
|
285
|
+
def to_enqueued_time
|
286
|
+
DateTimeHelper.to_rfc3339(enqueued_time)
|
287
|
+
end
|
288
|
+
|
272
289
|
def to_answer_time
|
273
290
|
DateTimeHelper.to_rfc3339(answer_time)
|
274
291
|
end
|
@@ -32,7 +32,7 @@ module Bandwidth
|
|
32
32
|
|
33
33
|
# TODO: Write general description for this method
|
34
34
|
# @return [DateTime]
|
35
|
-
attr_accessor :
|
35
|
+
attr_accessor :enqueued_time
|
36
36
|
|
37
37
|
# TODO: Write general description for this method
|
38
38
|
# @return [String]
|
@@ -101,7 +101,7 @@ module Bandwidth
|
|
101
101
|
@_hash['application_id'] = 'applicationId'
|
102
102
|
@_hash['to'] = 'to'
|
103
103
|
@_hash['from'] = 'from'
|
104
|
-
@_hash['
|
104
|
+
@_hash['enqueued_time'] = 'enqueuedTime '
|
105
105
|
@_hash['call_url'] = 'callUrl'
|
106
106
|
@_hash['call_timeout'] = 'callTimeout'
|
107
107
|
@_hash['callback_timeout'] = 'callbackTimeout'
|
@@ -123,7 +123,7 @@ module Bandwidth
|
|
123
123
|
# An array for optional fields
|
124
124
|
def optionals
|
125
125
|
%w[
|
126
|
-
|
126
|
+
enqueued_time
|
127
127
|
call_timeout
|
128
128
|
callback_timeout
|
129
129
|
answer_fallback_url
|
@@ -163,7 +163,7 @@ module Bandwidth
|
|
163
163
|
answer_url = nil,
|
164
164
|
answer_method = nil,
|
165
165
|
disconnect_method = nil,
|
166
|
-
|
166
|
+
enqueued_time = nil,
|
167
167
|
call_timeout = nil,
|
168
168
|
callback_timeout = nil,
|
169
169
|
answer_fallback_url = nil,
|
@@ -180,7 +180,7 @@ module Bandwidth
|
|
180
180
|
@application_id = application_id unless application_id == SKIP
|
181
181
|
@to = to unless to == SKIP
|
182
182
|
@from = from unless from == SKIP
|
183
|
-
@
|
183
|
+
@enqueued_time = enqueued_time unless enqueued_time == SKIP
|
184
184
|
@call_url = call_url unless call_url == SKIP
|
185
185
|
@call_timeout = call_timeout unless call_timeout == SKIP
|
186
186
|
@callback_timeout = callback_timeout unless callback_timeout == SKIP
|
@@ -213,8 +213,8 @@ module Bandwidth
|
|
213
213
|
answer_method = hash.key?('answerMethod') ? hash['answerMethod'] : SKIP
|
214
214
|
disconnect_method =
|
215
215
|
hash.key?('disconnectMethod') ? hash['disconnectMethod'] : SKIP
|
216
|
-
|
217
|
-
(DateTimeHelper.from_rfc3339(hash['
|
216
|
+
enqueued_time = if hash.key?('enqueuedTime')
|
217
|
+
(DateTimeHelper.from_rfc3339(hash['enqueuedTime']) if hash['enqueuedTime'])
|
218
218
|
else
|
219
219
|
SKIP
|
220
220
|
end
|
@@ -245,7 +245,7 @@ module Bandwidth
|
|
245
245
|
answer_url,
|
246
246
|
answer_method,
|
247
247
|
disconnect_method,
|
248
|
-
|
248
|
+
enqueued_time,
|
249
249
|
call_timeout,
|
250
250
|
callback_timeout,
|
251
251
|
answer_fallback_url,
|
@@ -259,8 +259,8 @@ module Bandwidth
|
|
259
259
|
priority)
|
260
260
|
end
|
261
261
|
|
262
|
-
def
|
263
|
-
DateTimeHelper.to_rfc3339(
|
262
|
+
def to_enqueued_time
|
263
|
+
DateTimeHelper.to_rfc3339(enqueued_time)
|
264
264
|
end
|
265
265
|
end
|
266
266
|
end
|
@@ -111,11 +111,15 @@ class IntegrationTest < Test::Unit::TestCase
|
|
111
111
|
body.answer_url = BASE_CALLBACK_URL
|
112
112
|
response = @bandwidth_client.voice_client.client.create_call(BW_ACCOUNT_ID, body)
|
113
113
|
assert(response.data.call_id.length > 0, "call_id value not set")
|
114
|
+
assert_not_nil(response.data.enqueued_time, "enqueued time is nil")
|
115
|
+
assert(response.data.enqueued_time.is_a?(DateTime), "enqueued time is not a DateTime object")
|
114
116
|
|
115
117
|
#Get phone call information
|
116
118
|
sleep 1
|
117
119
|
response = @bandwidth_client.voice_client.client.get_call(BW_ACCOUNT_ID, response.data.call_id)
|
118
120
|
assert(response.data.state.length > 0, "state value not set")
|
121
|
+
assert_not_nil(response.data.enqueued_time, "enqueued time is nil")
|
122
|
+
assert(response.data.enqueued_time.is_a?(DateTime), "enqueued time is not a DateTime object")
|
119
123
|
end
|
120
124
|
|
121
125
|
def test_create_call_with_amd_and_get_call_state
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandwidth-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 10.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bandwidth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|