bandwidth-sdk 3.8.0 → 3.9.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 +4 -4
- data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/voice_lib/voice.rb +3 -2
- data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +416 -16
- data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +38 -2
- data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +125 -0
- data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +27 -0
- data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +4 -1
- data/lib/bandwidth/voice_lib/voice/models/{status2_enum.rb → status3_enum.rb} +3 -3
- data/lib/bandwidth/voice_lib/voice/models/transcription.rb +1 -1
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +1 -1
- metadata +24 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f60ebb7f84d08c70a63b5e3e0f66dbbba6ed9454e00eff7cd33b8b09ba0253b4
|
4
|
+
data.tar.gz: 3473820c95bb5b50f4b416f26aed89a3131e0641532499e75cf89879ef2f8e30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb17e8c233e85ddf3a0f83e84e58117cb8cdcb16b5e18b6a13de2cecd7ec6bfe1e586dc0ff7187a6db861173a80f9bfcf3c41a9c239bb29c7abffb0e3d2670ba
|
7
|
+
data.tar.gz: 68d4877a6985d95bb3744fa7d321a3f9784c9237795a5a0e78a4899dc3afa73e3c09f568d235068e32c0d4bdc08231b873aa3a80b55ebbb4ffadfe09ef95afed
|
@@ -11,10 +11,11 @@ require_relative 'voice/models/api_call_response.rb'
|
|
11
11
|
require_relative 'voice/models/api_call_state_response.rb'
|
12
12
|
require_relative 'voice/models/api_create_call_request.rb'
|
13
13
|
require_relative 'voice/models/api_modify_call_request.rb'
|
14
|
-
require_relative 'voice/models/api_transcribe_recording_request.rb'
|
15
14
|
require_relative 'voice/models/call_engine_modify_conference_request.rb'
|
15
|
+
require_relative 'voice/models/api_transcribe_recording_request.rb'
|
16
16
|
require_relative 'voice/models/conference_detail.rb'
|
17
17
|
require_relative 'voice/models/conference_member_detail.rb'
|
18
|
+
require_relative 'voice/models/conference_recording_metadata_response.rb'
|
18
19
|
require_relative 'voice/models/modify_call_recording_state.rb'
|
19
20
|
require_relative 'voice/models/recording_metadata_response.rb'
|
20
21
|
require_relative 'voice/models/transcript.rb'
|
@@ -33,7 +34,7 @@ require_relative 'voice/models/state1_enum.rb'
|
|
33
34
|
require_relative 'voice/models/state2_enum.rb'
|
34
35
|
require_relative 'voice/models/status_enum.rb'
|
35
36
|
require_relative 'voice/models/status1_enum.rb'
|
36
|
-
require_relative 'voice/models/
|
37
|
+
require_relative 'voice/models/status3_enum.rb'
|
37
38
|
|
38
39
|
# Exceptions
|
39
40
|
require_relative 'voice/exceptions/api_error_response_exception.rb'
|
@@ -332,17 +332,9 @@ module Voice
|
|
332
332
|
# took place during the specified call
|
333
333
|
# @param [String] account_id Required parameter: Example:
|
334
334
|
# @param [String] call_id Required parameter: Example:
|
335
|
-
# @param [String] from Optional parameter: Example:
|
336
|
-
# @param [String] to Optional parameter: Example:
|
337
|
-
# @param [String] min_start_time Optional parameter: Example:
|
338
|
-
# @param [String] max_start_time Optional parameter: Example:
|
339
335
|
# @return [List of RecordingMetadataResponse] response from the API call
|
340
336
|
def get_query_metadata_for_account_and_call(account_id,
|
341
|
-
call_id
|
342
|
-
from: nil,
|
343
|
-
to: nil,
|
344
|
-
min_start_time: nil,
|
345
|
-
max_start_time: nil)
|
337
|
+
call_id)
|
346
338
|
# Prepare query url.
|
347
339
|
_query_builder = config.get_base_uri(Server::VOICEDEFAULT)
|
348
340
|
_query_builder << '/api/v2/accounts/{accountId}/calls/{callId}/recordings'
|
@@ -351,13 +343,6 @@ module Voice
|
|
351
343
|
'accountId' => { 'value' => account_id, 'encode' => true },
|
352
344
|
'callId' => { 'value' => call_id, 'encode' => true }
|
353
345
|
)
|
354
|
-
_query_builder = APIHelper.append_url_with_query_parameters(
|
355
|
-
_query_builder,
|
356
|
-
'from' => from,
|
357
|
-
'to' => to,
|
358
|
-
'minStartTime' => min_start_time,
|
359
|
-
'maxStartTime' => max_start_time
|
360
|
-
)
|
361
346
|
_query_url = APIHelper.clean_url _query_builder
|
362
347
|
|
363
348
|
# Prepare headers.
|
@@ -970,6 +955,101 @@ module Voice
|
|
970
955
|
ApiResponse.new(_response)
|
971
956
|
end
|
972
957
|
|
958
|
+
# Returns information about the conferences in the account
|
959
|
+
# @param [String] account_id Required parameter: Example:
|
960
|
+
# @param [Integer] page_size Optional parameter: Example:1000
|
961
|
+
# @param [String] page_token Optional parameter: Example:
|
962
|
+
# @param [String] name Optional parameter: Example:
|
963
|
+
# @param [String] min_created_time Optional parameter: Example:
|
964
|
+
# @param [String] max_created_time Optional parameter: Example:
|
965
|
+
# @return [List of ConferenceDetail] response from the API call
|
966
|
+
def get_conferences_by_account(account_id,
|
967
|
+
page_size: 1000,
|
968
|
+
page_token: nil,
|
969
|
+
name: nil,
|
970
|
+
min_created_time: nil,
|
971
|
+
max_created_time: nil)
|
972
|
+
# Prepare query url.
|
973
|
+
_query_builder = config.get_base_uri(Server::VOICEDEFAULT)
|
974
|
+
_query_builder << '/api/v2/accounts/{accountId}/conferences'
|
975
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
976
|
+
_query_builder,
|
977
|
+
'accountId' => { 'value' => account_id, 'encode' => true }
|
978
|
+
)
|
979
|
+
_query_builder = APIHelper.append_url_with_query_parameters(
|
980
|
+
_query_builder,
|
981
|
+
'pageSize' => page_size,
|
982
|
+
'pageToken' => page_token,
|
983
|
+
'name' => name,
|
984
|
+
'minCreatedTime' => min_created_time,
|
985
|
+
'maxCreatedTime' => max_created_time
|
986
|
+
)
|
987
|
+
_query_url = APIHelper.clean_url _query_builder
|
988
|
+
|
989
|
+
# Prepare headers.
|
990
|
+
_headers = {
|
991
|
+
'accept' => 'application/json'
|
992
|
+
}
|
993
|
+
|
994
|
+
# Prepare and execute HttpRequest.
|
995
|
+
_request = config.http_client.get(
|
996
|
+
_query_url,
|
997
|
+
headers: _headers
|
998
|
+
)
|
999
|
+
VoiceBasicAuth.apply(config, _request)
|
1000
|
+
_response = execute_request(_request)
|
1001
|
+
|
1002
|
+
# Validate response against endpoint and global error codes.
|
1003
|
+
if _response.status_code == 400
|
1004
|
+
raise ApiErrorResponseException.new(
|
1005
|
+
'Something\'s not quite right... Your request is invalid. Please' \
|
1006
|
+
' fix it before trying again.',
|
1007
|
+
_response
|
1008
|
+
)
|
1009
|
+
elsif _response.status_code == 401
|
1010
|
+
raise APIException.new(
|
1011
|
+
'Your credentials are invalid. Please use your Bandwidth dashboard' \
|
1012
|
+
' credentials to authenticate to the API.',
|
1013
|
+
_response
|
1014
|
+
)
|
1015
|
+
elsif _response.status_code == 403
|
1016
|
+
raise ApiErrorResponseException.new(
|
1017
|
+
'User unauthorized to perform this action.',
|
1018
|
+
_response
|
1019
|
+
)
|
1020
|
+
elsif _response.status_code == 404
|
1021
|
+
raise ApiErrorResponseException.new(
|
1022
|
+
'The resource specified cannot be found or does not belong to you.',
|
1023
|
+
_response
|
1024
|
+
)
|
1025
|
+
elsif _response.status_code == 415
|
1026
|
+
raise ApiErrorResponseException.new(
|
1027
|
+
'We don\'t support that media type. If a request body is required,' \
|
1028
|
+
' please send it to us as `application/json`.',
|
1029
|
+
_response
|
1030
|
+
)
|
1031
|
+
elsif _response.status_code == 429
|
1032
|
+
raise ApiErrorResponseException.new(
|
1033
|
+
'You\'re sending requests to this endpoint too frequently. Please' \
|
1034
|
+
' slow your request rate down and try again.',
|
1035
|
+
_response
|
1036
|
+
)
|
1037
|
+
elsif _response.status_code == 500
|
1038
|
+
raise ApiErrorResponseException.new(
|
1039
|
+
'Something unexpected happened. Please try again.',
|
1040
|
+
_response
|
1041
|
+
)
|
1042
|
+
end
|
1043
|
+
validate_response(_response)
|
1044
|
+
|
1045
|
+
# Return appropriate response type.
|
1046
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
1047
|
+
ApiResponse.new(
|
1048
|
+
_response,
|
1049
|
+
data: decoded.map { |element| ConferenceDetail.from_hash(element) }
|
1050
|
+
)
|
1051
|
+
end
|
1052
|
+
|
973
1053
|
# Returns information about the specified conference
|
974
1054
|
# @param [String] account_id Required parameter: Example:
|
975
1055
|
# @param [String] conference_id Required parameter: Example:
|
@@ -1129,6 +1209,88 @@ module Voice
|
|
1129
1209
|
ApiResponse.new(_response)
|
1130
1210
|
end
|
1131
1211
|
|
1212
|
+
# Updates settings for a particular conference member
|
1213
|
+
# @param [String] account_id Required parameter: Example:
|
1214
|
+
# @param [String] conference_id Required parameter: Example:
|
1215
|
+
# @param [String] call_id Required parameter: Example:
|
1216
|
+
# @param [ConferenceMemberDetail] body Optional parameter: Example:
|
1217
|
+
# @return [void] response from the API call
|
1218
|
+
def modify_conference_member(account_id,
|
1219
|
+
conference_id,
|
1220
|
+
call_id,
|
1221
|
+
body: nil)
|
1222
|
+
# Prepare query url.
|
1223
|
+
_query_builder = config.get_base_uri(Server::VOICEDEFAULT)
|
1224
|
+
_query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/members/{callId}'
|
1225
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
1226
|
+
_query_builder,
|
1227
|
+
'accountId' => { 'value' => account_id, 'encode' => true },
|
1228
|
+
'conferenceId' => { 'value' => conference_id, 'encode' => true },
|
1229
|
+
'callId' => { 'value' => call_id, 'encode' => true }
|
1230
|
+
)
|
1231
|
+
_query_url = APIHelper.clean_url _query_builder
|
1232
|
+
|
1233
|
+
# Prepare headers.
|
1234
|
+
_headers = {
|
1235
|
+
'content-type' => 'application/json; charset=utf-8'
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
# Prepare and execute HttpRequest.
|
1239
|
+
_request = config.http_client.put(
|
1240
|
+
_query_url,
|
1241
|
+
headers: _headers,
|
1242
|
+
parameters: body.to_json
|
1243
|
+
)
|
1244
|
+
VoiceBasicAuth.apply(config, _request)
|
1245
|
+
_response = execute_request(_request)
|
1246
|
+
|
1247
|
+
# Validate response against endpoint and global error codes.
|
1248
|
+
if _response.status_code == 400
|
1249
|
+
raise ApiErrorResponseException.new(
|
1250
|
+
'Something\'s not quite right... Your request is invalid. Please' \
|
1251
|
+
' fix it before trying again.',
|
1252
|
+
_response
|
1253
|
+
)
|
1254
|
+
elsif _response.status_code == 401
|
1255
|
+
raise APIException.new(
|
1256
|
+
'Your credentials are invalid. Please use your Bandwidth dashboard' \
|
1257
|
+
' credentials to authenticate to the API.',
|
1258
|
+
_response
|
1259
|
+
)
|
1260
|
+
elsif _response.status_code == 403
|
1261
|
+
raise ApiErrorResponseException.new(
|
1262
|
+
'User unauthorized to perform this action.',
|
1263
|
+
_response
|
1264
|
+
)
|
1265
|
+
elsif _response.status_code == 404
|
1266
|
+
raise ApiErrorResponseException.new(
|
1267
|
+
'The resource specified cannot be found or does not belong to you.',
|
1268
|
+
_response
|
1269
|
+
)
|
1270
|
+
elsif _response.status_code == 415
|
1271
|
+
raise ApiErrorResponseException.new(
|
1272
|
+
'We don\'t support that media type. If a request body is required,' \
|
1273
|
+
' please send it to us as `application/json`.',
|
1274
|
+
_response
|
1275
|
+
)
|
1276
|
+
elsif _response.status_code == 429
|
1277
|
+
raise ApiErrorResponseException.new(
|
1278
|
+
'You\'re sending requests to this endpoint too frequently. Please' \
|
1279
|
+
' slow your request rate down and try again.',
|
1280
|
+
_response
|
1281
|
+
)
|
1282
|
+
elsif _response.status_code == 500
|
1283
|
+
raise ApiErrorResponseException.new(
|
1284
|
+
'Something unexpected happened. Please try again.',
|
1285
|
+
_response
|
1286
|
+
)
|
1287
|
+
end
|
1288
|
+
validate_response(_response)
|
1289
|
+
|
1290
|
+
# Return appropriate response type.
|
1291
|
+
ApiResponse.new(_response)
|
1292
|
+
end
|
1293
|
+
|
1132
1294
|
# Returns information about the specified conference member
|
1133
1295
|
# @param [String] account_id Required parameter: Example:
|
1134
1296
|
# @param [String] conference_id Required parameter: Example:
|
@@ -1211,6 +1373,244 @@ module Voice
|
|
1211
1373
|
)
|
1212
1374
|
end
|
1213
1375
|
|
1376
|
+
# Returns a (potentially empty) list of metadata for the recordings that
|
1377
|
+
# took place during the specified conference
|
1378
|
+
# @param [String] account_id Required parameter: Example:
|
1379
|
+
# @param [String] conference_id Required parameter: Example:
|
1380
|
+
# @return [List of ConferenceRecordingMetadataResponse] response from the API call
|
1381
|
+
def get_query_metadata_for_account_and_conference(account_id,
|
1382
|
+
conference_id)
|
1383
|
+
# Prepare query url.
|
1384
|
+
_query_builder = config.get_base_uri(Server::VOICEDEFAULT)
|
1385
|
+
_query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings'
|
1386
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
1387
|
+
_query_builder,
|
1388
|
+
'accountId' => { 'value' => account_id, 'encode' => true },
|
1389
|
+
'conferenceId' => { 'value' => conference_id, 'encode' => true }
|
1390
|
+
)
|
1391
|
+
_query_url = APIHelper.clean_url _query_builder
|
1392
|
+
|
1393
|
+
# Prepare headers.
|
1394
|
+
_headers = {
|
1395
|
+
'accept' => 'application/json'
|
1396
|
+
}
|
1397
|
+
|
1398
|
+
# Prepare and execute HttpRequest.
|
1399
|
+
_request = config.http_client.get(
|
1400
|
+
_query_url,
|
1401
|
+
headers: _headers
|
1402
|
+
)
|
1403
|
+
VoiceBasicAuth.apply(config, _request)
|
1404
|
+
_response = execute_request(_request)
|
1405
|
+
|
1406
|
+
# Validate response against endpoint and global error codes.
|
1407
|
+
if _response.status_code == 400
|
1408
|
+
raise ApiErrorResponseException.new(
|
1409
|
+
'Something\'s not quite right... Your request is invalid. Please' \
|
1410
|
+
' fix it before trying again.',
|
1411
|
+
_response
|
1412
|
+
)
|
1413
|
+
elsif _response.status_code == 401
|
1414
|
+
raise APIException.new(
|
1415
|
+
'Your credentials are invalid. Please use your Bandwidth dashboard' \
|
1416
|
+
' credentials to authenticate to the API.',
|
1417
|
+
_response
|
1418
|
+
)
|
1419
|
+
elsif _response.status_code == 403
|
1420
|
+
raise ApiErrorResponseException.new(
|
1421
|
+
'User unauthorized to perform this action.',
|
1422
|
+
_response
|
1423
|
+
)
|
1424
|
+
elsif _response.status_code == 404
|
1425
|
+
raise ApiErrorResponseException.new(
|
1426
|
+
'The resource specified cannot be found or does not belong to you.',
|
1427
|
+
_response
|
1428
|
+
)
|
1429
|
+
elsif _response.status_code == 415
|
1430
|
+
raise ApiErrorResponseException.new(
|
1431
|
+
'We don\'t support that media type. If a request body is required,' \
|
1432
|
+
' please send it to us as `application/json`.',
|
1433
|
+
_response
|
1434
|
+
)
|
1435
|
+
elsif _response.status_code == 429
|
1436
|
+
raise ApiErrorResponseException.new(
|
1437
|
+
'You\'re sending requests to this endpoint too frequently. Please' \
|
1438
|
+
' slow your request rate down and try again.',
|
1439
|
+
_response
|
1440
|
+
)
|
1441
|
+
elsif _response.status_code == 500
|
1442
|
+
raise ApiErrorResponseException.new(
|
1443
|
+
'Something unexpected happened. Please try again.',
|
1444
|
+
_response
|
1445
|
+
)
|
1446
|
+
end
|
1447
|
+
validate_response(_response)
|
1448
|
+
|
1449
|
+
# Return appropriate response type.
|
1450
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
1451
|
+
ApiResponse.new(
|
1452
|
+
_response,
|
1453
|
+
data: decoded.map { |element| ConferenceRecordingMetadataResponse.from_hash(element) }
|
1454
|
+
)
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
# Returns metadata for the specified recording
|
1458
|
+
# @param [String] account_id Required parameter: Example:
|
1459
|
+
# @param [String] conference_id Required parameter: Example:
|
1460
|
+
# @param [String] recording_id Required parameter: Example:
|
1461
|
+
# @return [RecordingMetadataResponse] response from the API call
|
1462
|
+
def get_metadata_for_conference_recording(account_id,
|
1463
|
+
conference_id,
|
1464
|
+
recording_id)
|
1465
|
+
# Prepare query url.
|
1466
|
+
_query_builder = config.get_base_uri(Server::VOICEDEFAULT)
|
1467
|
+
_query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}'
|
1468
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
1469
|
+
_query_builder,
|
1470
|
+
'accountId' => { 'value' => account_id, 'encode' => true },
|
1471
|
+
'conferenceId' => { 'value' => conference_id, 'encode' => true },
|
1472
|
+
'recordingId' => { 'value' => recording_id, 'encode' => true }
|
1473
|
+
)
|
1474
|
+
_query_url = APIHelper.clean_url _query_builder
|
1475
|
+
|
1476
|
+
# Prepare headers.
|
1477
|
+
_headers = {
|
1478
|
+
'accept' => 'application/json'
|
1479
|
+
}
|
1480
|
+
|
1481
|
+
# Prepare and execute HttpRequest.
|
1482
|
+
_request = config.http_client.get(
|
1483
|
+
_query_url,
|
1484
|
+
headers: _headers
|
1485
|
+
)
|
1486
|
+
VoiceBasicAuth.apply(config, _request)
|
1487
|
+
_response = execute_request(_request)
|
1488
|
+
|
1489
|
+
# Validate response against endpoint and global error codes.
|
1490
|
+
if _response.status_code == 400
|
1491
|
+
raise ApiErrorResponseException.new(
|
1492
|
+
'Something\'s not quite right... Your request is invalid. Please' \
|
1493
|
+
' fix it before trying again.',
|
1494
|
+
_response
|
1495
|
+
)
|
1496
|
+
elsif _response.status_code == 401
|
1497
|
+
raise APIException.new(
|
1498
|
+
'Your credentials are invalid. Please use your Bandwidth dashboard' \
|
1499
|
+
' credentials to authenticate to the API.',
|
1500
|
+
_response
|
1501
|
+
)
|
1502
|
+
elsif _response.status_code == 403
|
1503
|
+
raise ApiErrorResponseException.new(
|
1504
|
+
'User unauthorized to perform this action.',
|
1505
|
+
_response
|
1506
|
+
)
|
1507
|
+
elsif _response.status_code == 404
|
1508
|
+
raise ApiErrorResponseException.new(
|
1509
|
+
'The resource specified cannot be found or does not belong to you.',
|
1510
|
+
_response
|
1511
|
+
)
|
1512
|
+
elsif _response.status_code == 415
|
1513
|
+
raise ApiErrorResponseException.new(
|
1514
|
+
'We don\'t support that media type. If a request body is required,' \
|
1515
|
+
' please send it to us as `application/json`.',
|
1516
|
+
_response
|
1517
|
+
)
|
1518
|
+
elsif _response.status_code == 429
|
1519
|
+
raise ApiErrorResponseException.new(
|
1520
|
+
'You\'re sending requests to this endpoint too frequently. Please' \
|
1521
|
+
' slow your request rate down and try again.',
|
1522
|
+
_response
|
1523
|
+
)
|
1524
|
+
elsif _response.status_code == 500
|
1525
|
+
raise ApiErrorResponseException.new(
|
1526
|
+
'Something unexpected happened. Please try again.',
|
1527
|
+
_response
|
1528
|
+
)
|
1529
|
+
end
|
1530
|
+
validate_response(_response)
|
1531
|
+
|
1532
|
+
# Return appropriate response type.
|
1533
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
1534
|
+
ApiResponse.new(
|
1535
|
+
_response, data: RecordingMetadataResponse.from_hash(decoded)
|
1536
|
+
)
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# Downloads the specified recording
|
1540
|
+
# @param [String] account_id Required parameter: Example:
|
1541
|
+
# @param [String] conference_id Required parameter: Example:
|
1542
|
+
# @param [String] recording_id Required parameter: Example:
|
1543
|
+
# @return [Binary] response from the API call
|
1544
|
+
def get_stream_conference_recording_media(account_id,
|
1545
|
+
conference_id,
|
1546
|
+
recording_id)
|
1547
|
+
# Prepare query url.
|
1548
|
+
_query_builder = config.get_base_uri(Server::VOICEDEFAULT)
|
1549
|
+
_query_builder << '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media'
|
1550
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
1551
|
+
_query_builder,
|
1552
|
+
'accountId' => { 'value' => account_id, 'encode' => true },
|
1553
|
+
'conferenceId' => { 'value' => conference_id, 'encode' => true },
|
1554
|
+
'recordingId' => { 'value' => recording_id, 'encode' => true }
|
1555
|
+
)
|
1556
|
+
_query_url = APIHelper.clean_url _query_builder
|
1557
|
+
|
1558
|
+
# Prepare and execute HttpRequest.
|
1559
|
+
_request = config.http_client.get(
|
1560
|
+
_query_url
|
1561
|
+
)
|
1562
|
+
VoiceBasicAuth.apply(config, _request)
|
1563
|
+
_response = execute_request(_request, binary: true)
|
1564
|
+
|
1565
|
+
# Validate response against endpoint and global error codes.
|
1566
|
+
if _response.status_code == 400
|
1567
|
+
raise ApiErrorResponseException.new(
|
1568
|
+
'Something\'s not quite right... Your request is invalid. Please' \
|
1569
|
+
' fix it before trying again.',
|
1570
|
+
_response
|
1571
|
+
)
|
1572
|
+
elsif _response.status_code == 401
|
1573
|
+
raise APIException.new(
|
1574
|
+
'Your credentials are invalid. Please use your Bandwidth dashboard' \
|
1575
|
+
' credentials to authenticate to the API.',
|
1576
|
+
_response
|
1577
|
+
)
|
1578
|
+
elsif _response.status_code == 403
|
1579
|
+
raise ApiErrorResponseException.new(
|
1580
|
+
'User unauthorized to perform this action.',
|
1581
|
+
_response
|
1582
|
+
)
|
1583
|
+
elsif _response.status_code == 404
|
1584
|
+
raise ApiErrorResponseException.new(
|
1585
|
+
'The resource specified cannot be found or does not belong to you.',
|
1586
|
+
_response
|
1587
|
+
)
|
1588
|
+
elsif _response.status_code == 415
|
1589
|
+
raise ApiErrorResponseException.new(
|
1590
|
+
'We don\'t support that media type. If a request body is required,' \
|
1591
|
+
' please send it to us as `application/json`.',
|
1592
|
+
_response
|
1593
|
+
)
|
1594
|
+
elsif _response.status_code == 429
|
1595
|
+
raise ApiErrorResponseException.new(
|
1596
|
+
'You\'re sending requests to this endpoint too frequently. Please' \
|
1597
|
+
' slow your request rate down and try again.',
|
1598
|
+
_response
|
1599
|
+
)
|
1600
|
+
elsif _response.status_code == 500
|
1601
|
+
raise ApiErrorResponseException.new(
|
1602
|
+
'Something unexpected happened. Please try again.',
|
1603
|
+
_response
|
1604
|
+
)
|
1605
|
+
end
|
1606
|
+
validate_response(_response)
|
1607
|
+
|
1608
|
+
# Return appropriate response type.
|
1609
|
+
ApiResponse.new(
|
1610
|
+
_response, data: _response.raw_body
|
1611
|
+
)
|
1612
|
+
end
|
1613
|
+
|
1214
1614
|
# Returns a list of metadata for the recordings associated with the
|
1215
1615
|
# specified account. The list can be filtered by the optional from, to,
|
1216
1616
|
# minStartTime, and maxStartTime arguments. The list is capped at 1000
|
@@ -10,15 +10,43 @@ 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 [RedirectMethodEnum]
|
19
|
+
attr_accessor :redirect_method
|
20
|
+
|
21
|
+
# TODO: Write general description for this method
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :username
|
24
|
+
|
25
|
+
# TODO: Write general description for this method
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :password
|
28
|
+
|
13
29
|
# A mapping from model property names to API property names.
|
14
30
|
def self.names
|
15
31
|
@_hash = {} if @_hash.nil?
|
16
32
|
@_hash['status'] = 'status'
|
33
|
+
@_hash['redirect_url'] = 'redirectUrl'
|
34
|
+
@_hash['redirect_method'] = 'redirectMethod'
|
35
|
+
@_hash['username'] = 'username'
|
36
|
+
@_hash['password'] = 'password'
|
17
37
|
@_hash
|
18
38
|
end
|
19
39
|
|
20
|
-
def initialize(
|
40
|
+
def initialize(redirect_url = nil,
|
41
|
+
status = nil,
|
42
|
+
redirect_method = nil,
|
43
|
+
username = nil,
|
44
|
+
password = nil)
|
21
45
|
@status = status
|
46
|
+
@redirect_url = redirect_url
|
47
|
+
@redirect_method = redirect_method
|
48
|
+
@username = username
|
49
|
+
@password = password
|
22
50
|
end
|
23
51
|
|
24
52
|
# Creates an instance of the object from a hash.
|
@@ -26,10 +54,18 @@ module Bandwidth
|
|
26
54
|
return nil unless hash
|
27
55
|
|
28
56
|
# Extract variables from the hash.
|
57
|
+
redirect_url = hash['redirectUrl']
|
29
58
|
status = hash['status']
|
59
|
+
redirect_method = hash['redirectMethod']
|
60
|
+
username = hash['username']
|
61
|
+
password = hash['password']
|
30
62
|
|
31
63
|
# Create object from extracted values.
|
32
|
-
CallEngineModifyConferenceRequest.new(
|
64
|
+
CallEngineModifyConferenceRequest.new(redirect_url,
|
65
|
+
status,
|
66
|
+
redirect_method,
|
67
|
+
username,
|
68
|
+
password)
|
33
69
|
end
|
34
70
|
end
|
35
71
|
end
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# ConferenceRecordingMetadataResponse Model.
|
8
|
+
class ConferenceRecordingMetadataResponse < BaseModel
|
9
|
+
# TODO: Write general description for this method
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :account_id
|
12
|
+
|
13
|
+
# TODO: Write general description for this method
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :conference_id
|
16
|
+
|
17
|
+
# TODO: Write general description for this method
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# TODO: Write general description for this method
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :recording_id
|
24
|
+
|
25
|
+
# Format is ISO-8601
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :duration
|
28
|
+
|
29
|
+
# Format is ISO-8601
|
30
|
+
# @return [Integer]
|
31
|
+
attr_accessor :channels
|
32
|
+
|
33
|
+
# Format is ISO-8601
|
34
|
+
# @return [Long]
|
35
|
+
attr_accessor :start_time
|
36
|
+
|
37
|
+
# Format is ISO-8601
|
38
|
+
# @return [Long]
|
39
|
+
attr_accessor :end_time
|
40
|
+
|
41
|
+
# Format is ISO-8601
|
42
|
+
# @return [FileFormatEnum]
|
43
|
+
attr_accessor :file_format
|
44
|
+
|
45
|
+
# Format is ISO-8601
|
46
|
+
# @return [Status1Enum]
|
47
|
+
attr_accessor :status
|
48
|
+
|
49
|
+
# Format is ISO-8601
|
50
|
+
# @return [String]
|
51
|
+
attr_accessor :media_url
|
52
|
+
|
53
|
+
# A mapping from model property names to API property names.
|
54
|
+
def self.names
|
55
|
+
@_hash = {} if @_hash.nil?
|
56
|
+
@_hash['account_id'] = 'accountId'
|
57
|
+
@_hash['conference_id'] = 'conferenceId'
|
58
|
+
@_hash['name'] = 'name'
|
59
|
+
@_hash['recording_id'] = 'recordingId'
|
60
|
+
@_hash['duration'] = 'duration'
|
61
|
+
@_hash['channels'] = 'channels'
|
62
|
+
@_hash['start_time'] = 'startTime'
|
63
|
+
@_hash['end_time'] = 'endTime'
|
64
|
+
@_hash['file_format'] = 'fileFormat'
|
65
|
+
@_hash['status'] = 'status'
|
66
|
+
@_hash['media_url'] = 'mediaUrl'
|
67
|
+
@_hash
|
68
|
+
end
|
69
|
+
|
70
|
+
def initialize(account_id = nil,
|
71
|
+
conference_id = nil,
|
72
|
+
name = nil,
|
73
|
+
recording_id = nil,
|
74
|
+
duration = nil,
|
75
|
+
channels = nil,
|
76
|
+
start_time = nil,
|
77
|
+
end_time = nil,
|
78
|
+
file_format = nil,
|
79
|
+
status = nil,
|
80
|
+
media_url = nil)
|
81
|
+
@account_id = account_id
|
82
|
+
@conference_id = conference_id
|
83
|
+
@name = name
|
84
|
+
@recording_id = recording_id
|
85
|
+
@duration = duration
|
86
|
+
@channels = channels
|
87
|
+
@start_time = start_time
|
88
|
+
@end_time = end_time
|
89
|
+
@file_format = file_format
|
90
|
+
@status = status
|
91
|
+
@media_url = media_url
|
92
|
+
end
|
93
|
+
|
94
|
+
# Creates an instance of the object from a hash.
|
95
|
+
def self.from_hash(hash)
|
96
|
+
return nil unless hash
|
97
|
+
|
98
|
+
# Extract variables from the hash.
|
99
|
+
account_id = hash['accountId']
|
100
|
+
conference_id = hash['conferenceId']
|
101
|
+
name = hash['name']
|
102
|
+
recording_id = hash['recordingId']
|
103
|
+
duration = hash['duration']
|
104
|
+
channels = hash['channels']
|
105
|
+
start_time = hash['startTime']
|
106
|
+
end_time = hash['endTime']
|
107
|
+
file_format = hash['fileFormat']
|
108
|
+
status = hash['status']
|
109
|
+
media_url = hash['mediaUrl']
|
110
|
+
|
111
|
+
# Create object from extracted values.
|
112
|
+
ConferenceRecordingMetadataResponse.new(account_id,
|
113
|
+
conference_id,
|
114
|
+
name,
|
115
|
+
recording_id,
|
116
|
+
duration,
|
117
|
+
channels,
|
118
|
+
start_time,
|
119
|
+
end_time,
|
120
|
+
file_format,
|
121
|
+
status,
|
122
|
+
media_url)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -18,6 +18,10 @@ module Bandwidth
|
|
18
18
|
# @return [String]
|
19
19
|
attr_accessor :call_id
|
20
20
|
|
21
|
+
# TODO: Write general description for this method
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :parent_call_id
|
24
|
+
|
21
25
|
# TODO: Write general description for this method
|
22
26
|
# @return [String]
|
23
27
|
attr_accessor :recording_id
|
@@ -30,6 +34,14 @@ module Bandwidth
|
|
30
34
|
# @return [String]
|
31
35
|
attr_accessor :from
|
32
36
|
|
37
|
+
# TODO: Write general description for this method
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :transfer_caller_id
|
40
|
+
|
41
|
+
# TODO: Write general description for this method
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :transfer_to
|
44
|
+
|
33
45
|
# Format is ISO-8601
|
34
46
|
# @return [String]
|
35
47
|
attr_accessor :duration
|
@@ -72,9 +84,12 @@ module Bandwidth
|
|
72
84
|
@_hash['application_id'] = 'applicationId'
|
73
85
|
@_hash['account_id'] = 'accountId'
|
74
86
|
@_hash['call_id'] = 'callId'
|
87
|
+
@_hash['parent_call_id'] = 'parentCallId'
|
75
88
|
@_hash['recording_id'] = 'recordingId'
|
76
89
|
@_hash['to'] = 'to'
|
77
90
|
@_hash['from'] = 'from'
|
91
|
+
@_hash['transfer_caller_id'] = 'transferCallerId'
|
92
|
+
@_hash['transfer_to'] = 'transferTo'
|
78
93
|
@_hash['duration'] = 'duration'
|
79
94
|
@_hash['direction'] = 'direction'
|
80
95
|
@_hash['channels'] = 'channels'
|
@@ -90,9 +105,12 @@ module Bandwidth
|
|
90
105
|
def initialize(application_id = nil,
|
91
106
|
account_id = nil,
|
92
107
|
call_id = nil,
|
108
|
+
parent_call_id = nil,
|
93
109
|
recording_id = nil,
|
94
110
|
to = nil,
|
95
111
|
from = nil,
|
112
|
+
transfer_caller_id = nil,
|
113
|
+
transfer_to = nil,
|
96
114
|
duration = nil,
|
97
115
|
direction = nil,
|
98
116
|
channels = nil,
|
@@ -105,9 +123,12 @@ module Bandwidth
|
|
105
123
|
@application_id = application_id
|
106
124
|
@account_id = account_id
|
107
125
|
@call_id = call_id
|
126
|
+
@parent_call_id = parent_call_id
|
108
127
|
@recording_id = recording_id
|
109
128
|
@to = to
|
110
129
|
@from = from
|
130
|
+
@transfer_caller_id = transfer_caller_id
|
131
|
+
@transfer_to = transfer_to
|
111
132
|
@duration = duration
|
112
133
|
@direction = direction
|
113
134
|
@channels = channels
|
@@ -127,9 +148,12 @@ module Bandwidth
|
|
127
148
|
application_id = hash['applicationId']
|
128
149
|
account_id = hash['accountId']
|
129
150
|
call_id = hash['callId']
|
151
|
+
parent_call_id = hash['parentCallId']
|
130
152
|
recording_id = hash['recordingId']
|
131
153
|
to = hash['to']
|
132
154
|
from = hash['from']
|
155
|
+
transfer_caller_id = hash['transferCallerId']
|
156
|
+
transfer_to = hash['transferTo']
|
133
157
|
duration = hash['duration']
|
134
158
|
direction = hash['direction']
|
135
159
|
channels = hash['channels']
|
@@ -145,9 +169,12 @@ module Bandwidth
|
|
145
169
|
RecordingMetadataResponse.new(application_id,
|
146
170
|
account_id,
|
147
171
|
call_id,
|
172
|
+
parent_call_id,
|
148
173
|
recording_id,
|
149
174
|
to,
|
150
175
|
from,
|
176
|
+
transfer_caller_id,
|
177
|
+
transfer_to,
|
151
178
|
duration,
|
152
179
|
direction,
|
153
180
|
channels,
|
@@ -20,7 +20,10 @@ module Bandwidth
|
|
20
20
|
DELETED = 'deleted'.freeze,
|
21
21
|
|
22
22
|
# TODO: Write general description for ERROR
|
23
|
-
ERROR = 'error'.freeze
|
23
|
+
ERROR = 'error'.freeze,
|
24
|
+
|
25
|
+
# TODO: Write general description for ALREADYINPROGRESS
|
26
|
+
ALREADYINPROGRESS = 'already-in-progress'.freeze
|
24
27
|
].freeze
|
25
28
|
end
|
26
29
|
end
|
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: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- APIMatic SDK Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -16,42 +16,48 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.0.1
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
43
|
+
version: '1.0'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.0.1
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: faraday_middleware
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
53
|
+
version: '1.0'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
60
|
+
version: '1.0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: certifi
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +65,9 @@ dependencies:
|
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
67
|
version: '2018.1'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 2018.01.18
|
62
71
|
type: :runtime
|
63
72
|
prerelease: false
|
64
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,20 +75,23 @@ dependencies:
|
|
66
75
|
- - "~>"
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: '2018.1'
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 2018.01.18
|
69
81
|
- !ruby/object:Gem::Dependency
|
70
82
|
name: faraday-http-cache
|
71
83
|
requirement: !ruby/object:Gem::Requirement
|
72
84
|
requirements:
|
73
85
|
- - "~>"
|
74
86
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2.
|
87
|
+
version: '2.2'
|
76
88
|
type: :runtime
|
77
89
|
prerelease: false
|
78
90
|
version_requirements: !ruby/object:Gem::Requirement
|
79
91
|
requirements:
|
80
92
|
- - "~>"
|
81
93
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
94
|
+
version: '2.2'
|
83
95
|
- !ruby/object:Gem::Dependency
|
84
96
|
name: builder
|
85
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +188,7 @@ files:
|
|
176
188
|
- lib/bandwidth/voice_lib/voice/models/conference_detail.rb
|
177
189
|
- lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb
|
178
190
|
- lib/bandwidth/voice_lib/voice/models/conference_member_detail.rb
|
191
|
+
- lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb
|
179
192
|
- lib/bandwidth/voice_lib/voice/models/direction_enum.rb
|
180
193
|
- lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb
|
181
194
|
- lib/bandwidth/voice_lib/voice/models/disconnect_method_enum.rb
|
@@ -187,7 +200,7 @@ files:
|
|
187
200
|
- lib/bandwidth/voice_lib/voice/models/state2_enum.rb
|
188
201
|
- lib/bandwidth/voice_lib/voice/models/state_enum.rb
|
189
202
|
- lib/bandwidth/voice_lib/voice/models/status1_enum.rb
|
190
|
-
- lib/bandwidth/voice_lib/voice/models/
|
203
|
+
- lib/bandwidth/voice_lib/voice/models/status3_enum.rb
|
191
204
|
- lib/bandwidth/voice_lib/voice/models/status_enum.rb
|
192
205
|
- lib/bandwidth/voice_lib/voice/models/transcript.rb
|
193
206
|
- lib/bandwidth/voice_lib/voice/models/transcription.rb
|