twilio-ruby 5.33.0 → 5.36.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +5 -26
- data/.travis.yml +9 -1
- data/CHANGES.md +110 -0
- data/README.md +17 -2
- data/lib/twilio-ruby.rb +4 -12
- data/lib/twilio-ruby/framework/error.rb +3 -3
- data/lib/twilio-ruby/jwt/jwt.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +90 -90
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +75 -72
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -8
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +19 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +20 -11
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +239 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +197 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/studio.rb +2 -2
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +26 -0
- data/lib/twilio-ruby/rest/studio/v2.rb +3 -3
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +71 -24
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +12 -11
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +21 -20
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +18 -15
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +53 -10
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +378 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/verify/v2/form.rb +197 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +48 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +379 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +500 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor/challenge.rb +494 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -12
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -12
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/twiml/twiml.rb +4 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +1 -1
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +4 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +1 -1
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +1 -1
- data/spec/integration/serverless/v1/service/build_spec.rb +4 -4
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +1 -1
- data/spec/integration/studio/v1/flow/execution_spec.rb +46 -0
- data/spec/integration/studio/v2/flow/execution_spec.rb +45 -0
- data/spec/integration/studio/v2/flow_spec.rb +4 -0
- data/spec/integration/studio/v2/flow_validate_spec.rb +2 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +12 -4
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/verify/v2/form_spec.rb +48 -0
- data/spec/integration/verify/v2/service/entity/factor/challenge_spec.rb +353 -0
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +298 -0
- data/spec/integration/verify/v2/service/entity_spec.rb +201 -0
- data/spec/integration/verify/v2/service_spec.rb +28 -4
- data/spec/integration/video/v1/composition_settings_spec.rb +2 -2
- data/spec/integration/video/v1/recording_settings_spec.rb +2 -2
- data/spec/integration/video/v1/recording_spec.rb +2 -2
- data/spec/integration/video/v1/room/recording_spec.rb +2 -2
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +173 -23
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +4 -4
- metadata +67 -10
@@ -2,6 +2,10 @@ require 'nokogiri'
|
|
2
2
|
|
3
3
|
module Twilio
|
4
4
|
module TwiML
|
5
|
+
autoload :FaxResponse, File.join(File.dirname(__FILE__), "fax_response.rb")
|
6
|
+
autoload :MessagingResponse, File.join(File.dirname(__FILE__), "messaging_response.rb")
|
7
|
+
autoload :VoiceResponse, File.join(File.dirname(__FILE__), "voice_response.rb")
|
8
|
+
|
5
9
|
class TwiMLError < StandardError; end
|
6
10
|
|
7
11
|
class LeafNode
|
@@ -96,9 +96,10 @@ module Twilio
|
|
96
96
|
# debug:: Allow debug for gather
|
97
97
|
# action_on_empty_result:: Force webhook to the action URL event if there is no input
|
98
98
|
# speech_model:: Specify the model that is best suited for your use case
|
99
|
+
# enhanced:: Use enhanced speech model
|
99
100
|
# keyword_args:: additional attributes
|
100
|
-
def gather(input: nil, action: nil, method: nil, timeout: nil, speech_timeout: nil, max_speech_time: nil, profanity_filter: nil, finish_on_key: nil, num_digits: nil, partial_result_callback: nil, partial_result_callback_method: nil, language: nil, hints: nil, barge_in: nil, debug: nil, action_on_empty_result: nil, speech_model: nil, **keyword_args)
|
101
|
-
gather = Gather.new(input: input, action: action, method: method, timeout: timeout, speech_timeout: speech_timeout, max_speech_time: max_speech_time, profanity_filter: profanity_filter, finish_on_key: finish_on_key, num_digits: num_digits, partial_result_callback: partial_result_callback, partial_result_callback_method: partial_result_callback_method, language: language, hints: hints, barge_in: barge_in, debug: debug, action_on_empty_result: action_on_empty_result, speech_model: speech_model, **keyword_args)
|
101
|
+
def gather(input: nil, action: nil, method: nil, timeout: nil, speech_timeout: nil, max_speech_time: nil, profanity_filter: nil, finish_on_key: nil, num_digits: nil, partial_result_callback: nil, partial_result_callback_method: nil, language: nil, hints: nil, barge_in: nil, debug: nil, action_on_empty_result: nil, speech_model: nil, enhanced: nil, **keyword_args)
|
102
|
+
gather = Gather.new(input: input, action: action, method: method, timeout: timeout, speech_timeout: speech_timeout, max_speech_time: max_speech_time, profanity_filter: profanity_filter, finish_on_key: finish_on_key, num_digits: num_digits, partial_result_callback: partial_result_callback, partial_result_callback_method: partial_result_callback_method, language: language, hints: hints, barge_in: barge_in, debug: debug, action_on_empty_result: action_on_empty_result, speech_model: speech_model, enhanced: enhanced, **keyword_args)
|
102
103
|
|
103
104
|
yield(gather) if block_given?
|
104
105
|
append(gather)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Twilio
|
4
4
|
module Util
|
5
5
|
class Configuration
|
6
|
-
attr_accessor :account_sid, :auth_token, :http_client
|
6
|
+
attr_accessor :account_sid, :auth_token, :http_client, :region, :edge
|
7
7
|
|
8
8
|
def account_sid=(value)
|
9
9
|
@account_sid = value
|
@@ -16,6 +16,14 @@ module Twilio
|
|
16
16
|
def http_client=(value)
|
17
17
|
@http_client = value
|
18
18
|
end
|
19
|
+
|
20
|
+
def region=(value)
|
21
|
+
@region = value
|
22
|
+
end
|
23
|
+
|
24
|
+
def edge=(value)
|
25
|
+
@edge = value
|
26
|
+
end
|
19
27
|
end
|
20
28
|
end
|
21
29
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -201,7 +201,7 @@ describe 'Call' do
|
|
201
201
|
},
|
202
202
|
"to": "+13051913581",
|
203
203
|
"to_formatted": "(305) 191-3581",
|
204
|
-
"trunk_sid": "
|
204
|
+
"trunk_sid": "TKdeadbeefdeadbeefdeadbeefdeadbeef",
|
205
205
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
206
206
|
"queue_time": "1000"
|
207
207
|
}
|
@@ -267,7 +267,7 @@ describe 'Call' do
|
|
267
267
|
},
|
268
268
|
"to": "+13051913581",
|
269
269
|
"to_formatted": "(305) 191-3581",
|
270
|
-
"trunk_sid": "
|
270
|
+
"trunk_sid": "TKdeadbeefdeadbeefdeadbeefdeadbeef",
|
271
271
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
272
272
|
"queue_time": "1000"
|
273
273
|
},
|
@@ -302,7 +302,7 @@ describe 'Call' do
|
|
302
302
|
},
|
303
303
|
"to": "+13051913580",
|
304
304
|
"to_formatted": "(305) 191-3580",
|
305
|
-
"trunk_sid": "
|
305
|
+
"trunk_sid": "TKdeadbeefdeadbeefdeadbeefdeadbeef",
|
306
306
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0.json",
|
307
307
|
"queue_time": "1000"
|
308
308
|
}
|
@@ -362,7 +362,7 @@ describe 'Call' do
|
|
362
362
|
},
|
363
363
|
"to": "+13051913581",
|
364
364
|
"to_formatted": "(305) 191-3581",
|
365
|
-
"trunk_sid": "
|
365
|
+
"trunk_sid": "TKdeadbeefdeadbeefdeadbeefdeadbeef",
|
366
366
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
367
367
|
"queue_time": "1000"
|
368
368
|
},
|
@@ -397,7 +397,7 @@ describe 'Call' do
|
|
397
397
|
},
|
398
398
|
"to": "+13051913580",
|
399
399
|
"to_formatted": "(305) 191-3580",
|
400
|
-
"trunk_sid": "
|
400
|
+
"trunk_sid": "TKdeadbeefdeadbeefdeadbeefdeadbeef",
|
401
401
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0.json",
|
402
402
|
"queue_time": "1000"
|
403
403
|
}
|
@@ -42,7 +42,9 @@ describe 'Conference' do
|
|
42
42
|
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
43
43
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
44
44
|
},
|
45
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
45
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
46
|
+
"reason_conference_ended": "last-participant-left",
|
47
|
+
"call_sid_ending_conference": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
46
48
|
}
|
47
49
|
]
|
48
50
|
))
|
@@ -70,7 +72,9 @@ describe 'Conference' do
|
|
70
72
|
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
71
73
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
72
74
|
},
|
73
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
75
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
76
|
+
"reason_conference_ended": null,
|
77
|
+
"call_sid_ending_conference": null
|
74
78
|
}
|
75
79
|
]
|
76
80
|
))
|
@@ -98,7 +102,9 @@ describe 'Conference' do
|
|
98
102
|
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
99
103
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
100
104
|
},
|
101
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
105
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
106
|
+
"reason_conference_ended": "participant-with-end-conference-on-exit-left",
|
107
|
+
"call_sid_ending_conference": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
102
108
|
}
|
103
109
|
]
|
104
110
|
))
|
@@ -126,7 +132,9 @@ describe 'Conference' do
|
|
126
132
|
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
127
133
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
128
134
|
},
|
129
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
135
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
136
|
+
"reason_conference_ended": "participant-with-end-conference-on-exit-left",
|
137
|
+
"call_sid_ending_conference": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
130
138
|
}
|
131
139
|
]
|
132
140
|
))
|
@@ -196,7 +204,9 @@ describe 'Conference' do
|
|
196
204
|
"friendly_name": "friendly_name",
|
197
205
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
198
206
|
"api_version": "2010-04-01",
|
199
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
207
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
208
|
+
"reason_conference_ended": null,
|
209
|
+
"call_sid_ending_conference": null
|
200
210
|
},
|
201
211
|
{
|
202
212
|
"status": "in-progress",
|
@@ -211,7 +221,9 @@ describe 'Conference' do
|
|
211
221
|
"friendly_name": "friendly_name",
|
212
222
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.json",
|
213
223
|
"api_version": "2010-04-01",
|
214
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
224
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
225
|
+
"reason_conference_ended": null,
|
226
|
+
"call_sid_ending_conference": null
|
215
227
|
},
|
216
228
|
{
|
217
229
|
"status": "in-progress",
|
@@ -226,7 +238,9 @@ describe 'Conference' do
|
|
226
238
|
"friendly_name": "friendly_name",
|
227
239
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc.json",
|
228
240
|
"api_version": "2010-04-01",
|
229
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
241
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
242
|
+
"reason_conference_ended": null,
|
243
|
+
"call_sid_ending_conference": null
|
230
244
|
}
|
231
245
|
],
|
232
246
|
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
|
@@ -266,7 +280,9 @@ describe 'Conference' do
|
|
266
280
|
"friendly_name": "friendly_name",
|
267
281
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFdddddddddddddddddddddddddddddddd.json",
|
268
282
|
"api_version": "2010-04-01",
|
269
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
283
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
284
|
+
"reason_conference_ended": null,
|
285
|
+
"call_sid_ending_conference": null
|
270
286
|
},
|
271
287
|
{
|
272
288
|
"status": "in-progress",
|
@@ -281,7 +297,9 @@ describe 'Conference' do
|
|
281
297
|
"friendly_name": "friendly_name",
|
282
298
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.json",
|
283
299
|
"api_version": "2010-04-01",
|
284
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
300
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
301
|
+
"reason_conference_ended": null,
|
302
|
+
"call_sid_ending_conference": null
|
285
303
|
},
|
286
304
|
{
|
287
305
|
"status": "in-progress",
|
@@ -296,7 +314,9 @@ describe 'Conference' do
|
|
296
314
|
"friendly_name": "friendly_name",
|
297
315
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFffffffffffffffffffffffffffffffff.json",
|
298
316
|
"api_version": "2010-04-01",
|
299
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
317
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
318
|
+
"reason_conference_ended": null,
|
319
|
+
"call_sid_ending_conference": null
|
300
320
|
}
|
301
321
|
],
|
302
322
|
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
|
@@ -336,7 +356,9 @@ describe 'Conference' do
|
|
336
356
|
"friendly_name": "friendly_name",
|
337
357
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
338
358
|
"api_version": "2010-04-01",
|
339
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
359
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
360
|
+
"reason_conference_ended": null,
|
361
|
+
"call_sid_ending_conference": null
|
340
362
|
},
|
341
363
|
{
|
342
364
|
"status": "in-progress",
|
@@ -351,7 +373,9 @@ describe 'Conference' do
|
|
351
373
|
"friendly_name": "friendly_name",
|
352
374
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.json",
|
353
375
|
"api_version": "2010-04-01",
|
354
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
376
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
377
|
+
"reason_conference_ended": null,
|
378
|
+
"call_sid_ending_conference": null
|
355
379
|
},
|
356
380
|
{
|
357
381
|
"status": "in-progress",
|
@@ -366,7 +390,9 @@ describe 'Conference' do
|
|
366
390
|
"friendly_name": "friendly_name",
|
367
391
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFcccccccccccccccccccccccccccccccc.json",
|
368
392
|
"api_version": "2010-04-01",
|
369
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
393
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
394
|
+
"reason_conference_ended": null,
|
395
|
+
"call_sid_ending_conference": null
|
370
396
|
}
|
371
397
|
],
|
372
398
|
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json?Status=in-progress&DateUpdated%3E=2018-11-12&DateUpdated%3C=2018-11-11&DateCreated=2008-01-03&FriendlyName=friendly_name&DateUpdated=2018-11-13&DateCreated%3C=2008-01-01&DateCreated%3E=2008-01-02&PageSize=3&Page=0",
|
@@ -420,7 +446,9 @@ describe 'Conference' do
|
|
420
446
|
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
|
421
447
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
422
448
|
},
|
423
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
449
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
450
|
+
"reason_conference_ended": "conference-ended-via-api",
|
451
|
+
"call_sid_ending_conference": null
|
424
452
|
}
|
425
453
|
]
|
426
454
|
))
|
@@ -54,7 +54,9 @@ describe 'Domain' do
|
|
54
54
|
"voice_status_callback_url": null,
|
55
55
|
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
|
56
56
|
"emergency_calling_enabled": true,
|
57
|
-
"secure": true
|
57
|
+
"secure": true,
|
58
|
+
"byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
59
|
+
"emergency_caller_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
58
60
|
}
|
59
61
|
],
|
60
62
|
"start": 0,
|
@@ -145,7 +147,9 @@ describe 'Domain' do
|
|
145
147
|
"voice_status_callback_url": null,
|
146
148
|
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
|
147
149
|
"emergency_calling_enabled": true,
|
148
|
-
"secure": true
|
150
|
+
"secure": true,
|
151
|
+
"byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
152
|
+
"emergency_caller_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
149
153
|
}
|
150
154
|
]
|
151
155
|
))
|
@@ -200,7 +204,9 @@ describe 'Domain' do
|
|
200
204
|
"voice_status_callback_url": null,
|
201
205
|
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
|
202
206
|
"emergency_calling_enabled": true,
|
203
|
-
"secure": true
|
207
|
+
"secure": true,
|
208
|
+
"byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
209
|
+
"emergency_caller_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
204
210
|
}
|
205
211
|
]
|
206
212
|
))
|
@@ -255,7 +261,9 @@ describe 'Domain' do
|
|
255
261
|
"voice_status_callback_url": null,
|
256
262
|
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
|
257
263
|
"emergency_calling_enabled": true,
|
258
|
-
"secure": true
|
264
|
+
"secure": true,
|
265
|
+
"byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
266
|
+
"emergency_caller_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
259
267
|
}
|
260
268
|
]
|
261
269
|
))
|
@@ -30,24 +30,36 @@ describe 'Token' do
|
|
30
30
|
201,
|
31
31
|
%q[
|
32
32
|
{
|
33
|
-
"
|
34
|
-
"date_created": "Fri, 24 Jul 2015 18:43:58 +0000",
|
35
|
-
"date_updated": "Fri, 24 Jul 2015 18:43:58 +0000",
|
33
|
+
"username": "dc2d2894d5a9023620c467b0e71cfa6a35457e6679785ed6ae9856fe5bdfa269",
|
36
34
|
"ice_servers": [
|
37
35
|
{
|
38
|
-
"url": "stun:global.stun:3478?transport=udp",
|
39
|
-
"urls": "stun:global.stun:3478?transport=udp"
|
36
|
+
"url": "stun:global.stun.twilio.com:3478?transport=udp",
|
37
|
+
"urls": "stun:global.stun.twilio.com:3478?transport=udp"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"username": "dc2d2894d5a9023620c467b0e71cfa6a35457e6679785ed6ae9856fe5bdfa269",
|
41
|
+
"credential": "tE2DajzSJwnsSbc123",
|
42
|
+
"url": "turn:global.turn.twilio.com:3478?transport=udp",
|
43
|
+
"urls": "turn:global.turn.twilio.com:3478?transport=udp"
|
40
44
|
},
|
41
45
|
{
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
+
"username": "dc2d2894d5a9023620c467b0e71cfa6a35457e6679785ed6ae9856fe5bdfa269",
|
47
|
+
"credential": "tE2DajzSJwnsSbc123",
|
48
|
+
"url": "turn:global.turn.twilio.com:3478?transport=tcp",
|
49
|
+
"urls": "turn:global.turn.twilio.com:3478?transport=tcp"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"username": "dc2d2894d5a9023620c467b0e71cfa6a35457e6679785ed6ae9856fe5bdfa269",
|
53
|
+
"credential": "tE2DajzSJwnsSbc123",
|
54
|
+
"url": "turn:global.turn.twilio.com:443?transport=tcp",
|
55
|
+
"urls": "turn:global.turn.twilio.com:443?transport=tcp"
|
46
56
|
}
|
47
57
|
],
|
48
|
-
"
|
58
|
+
"date_updated": "Fri, 01 May 2020 01:42:57 +0000",
|
59
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
49
60
|
"ttl": "86400",
|
50
|
-
"
|
61
|
+
"date_created": "Fri, 01 May 2020 01:42:57 +0000",
|
62
|
+
"password": "tE2DajzSJwnsSbc123"
|
51
63
|
}
|
52
64
|
]
|
53
65
|
))
|
@@ -0,0 +1,53 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
require 'spec_helper.rb'
|
10
|
+
|
11
|
+
describe 'RestoreAssistant' do
|
12
|
+
it "can update" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.autopilot.v1.restore_assistant.update(assistant: 'UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
values = {'Assistant' => 'UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
|
20
|
+
expect(
|
21
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
+
method: 'post',
|
23
|
+
url: 'https://autopilot.twilio.com/v1/Assistants/Restore',
|
24
|
+
data: values,
|
25
|
+
))).to eq(true)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "receives update responses" do
|
29
|
+
@holodeck.mock(Twilio::Response.new(
|
30
|
+
200,
|
31
|
+
%q[
|
32
|
+
{
|
33
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
+
"sid": "UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
|
+
"date_created": "2017-07-04T08:34:00Z",
|
36
|
+
"date_updated": "2017-07-04T08:34:00Z",
|
37
|
+
"unique_name": "so-so-unique",
|
38
|
+
"friendly_name": "so so friendly",
|
39
|
+
"needs_model_build": false,
|
40
|
+
"latest_model_build_sid": null,
|
41
|
+
"log_queries": true,
|
42
|
+
"development_stage": "in-development",
|
43
|
+
"callback_url": "https://example.com/callback_url",
|
44
|
+
"callback_events": "model_build_completed model_build_failed"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
))
|
48
|
+
|
49
|
+
actual = @client.autopilot.v1.restore_assistant.update(assistant: 'UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
50
|
+
|
51
|
+
expect(actual).to_not eq(nil)
|
52
|
+
end
|
53
|
+
end
|
@@ -40,6 +40,7 @@ describe 'Participant' do
|
|
40
40
|
"address": "+15558675310",
|
41
41
|
"proxy_address": "+15017122661"
|
42
42
|
},
|
43
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
43
44
|
"date_created": "2015-12-16T22:18:37Z",
|
44
45
|
"date_updated": "2015-12-16T22:18:38Z",
|
45
46
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -64,6 +65,7 @@ describe 'Participant' do
|
|
64
65
|
"identity": "IDENTITY",
|
65
66
|
"attributes": "{ \\"role\\": \\"driver\\" }",
|
66
67
|
"messaging_binding": null,
|
68
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
67
69
|
"date_created": "2015-12-16T22:18:37Z",
|
68
70
|
"date_updated": "2015-12-16T22:18:38Z",
|
69
71
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -91,6 +93,7 @@ describe 'Participant' do
|
|
91
93
|
"type": "sms",
|
92
94
|
"projected_address": "+15017122661"
|
93
95
|
},
|
96
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
94
97
|
"date_created": "2015-12-16T22:18:37Z",
|
95
98
|
"date_updated": "2015-12-16T22:18:38Z",
|
96
99
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -135,6 +138,7 @@ describe 'Participant' do
|
|
135
138
|
"address": "+15558675310",
|
136
139
|
"proxy_address": "+15017122661"
|
137
140
|
},
|
141
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
138
142
|
"date_created": "2015-12-16T22:18:37Z",
|
139
143
|
"date_updated": "2015-12-16T22:18:38Z",
|
140
144
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -207,6 +211,7 @@ describe 'Participant' do
|
|
207
211
|
"address": "+15558675310",
|
208
212
|
"proxy_address": "+15017122661"
|
209
213
|
},
|
214
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
210
215
|
"date_created": "2016-03-24T21:05:50Z",
|
211
216
|
"date_updated": "2016-03-24T21:05:50Z",
|
212
217
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -262,6 +267,7 @@ describe 'Participant' do
|
|
262
267
|
"address": "+15558675310",
|
263
268
|
"proxy_address": "+15017122661"
|
264
269
|
},
|
270
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
265
271
|
"date_created": "2016-03-24T21:05:50Z",
|
266
272
|
"date_updated": "2016-03-24T21:05:50Z",
|
267
273
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -273,6 +279,7 @@ describe 'Participant' do
|
|
273
279
|
"identity": "IDENTITY",
|
274
280
|
"attributes": "{ \\"role\\": \\"driver\\" }",
|
275
281
|
"messaging_binding": null,
|
282
|
+
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
276
283
|
"date_created": "2016-03-24T21:05:50Z",
|
277
284
|
"date_updated": "2016-03-24T21:05:50Z",
|
278
285
|
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|