twilio-ruby 5.0.0.rc19 → 5.0.0.rc20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -0
- data/README.md +2 -2
- data/VERSIONS.md +64 -0
- data/lib/twilio-ruby/framework/{exception.rb → error.rb} +3 -2
- data/lib/twilio-ruby/framework/page.rb +3 -3
- data/lib/twilio-ruby/framework/serialize.rb +9 -0
- data/lib/twilio-ruby/framework/version.rb +1 -1
- data/lib/twilio-ruby/http/http_client.rb +1 -0
- data/lib/twilio-ruby/jwt/access_token.rb +28 -0
- data/lib/twilio-ruby/rest/client.rb +64 -42
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +303 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +80 -6
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +50 -3
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +38 -17
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +74 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +377 -0
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +415 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +409 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +377 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +407 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +411 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +377 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +407 -0
- data/lib/twilio-ruby/rest/sync/v1/service.rb +469 -0
- data/lib/twilio-ruby/rest/sync/v1.rb +35 -0
- data/lib/twilio-ruby/rest/sync.rb +40 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +324 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +37 -0
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +344 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +399 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +222 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +502 -0
- data/lib/twilio-ruby/rest/wireless/v1.rb +53 -0
- data/lib/twilio-ruby/rest/wireless.rb +48 -0
- data/lib/twilio-ruby/security/request_validator.rb +19 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/serialize_spec.rb +20 -1
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +5 -5
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +1 -1
- data/spec/integration/api/v2010/account/address_spec.rb +5 -5
- data/spec/integration/api/v2010/account/application_spec.rb +5 -5
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +2 -2
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +2 -2
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call/notification_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call/recording_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference_spec.rb +3 -3
- data/spec/integration/api/v2010/account/connect_app_spec.rb +3 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +4 -4
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +5 -5
- data/spec/integration/api/v2010/account/key_spec.rb +4 -4
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +1 -1
- data/spec/integration/api/v2010/account/message/media_spec.rb +3 -3
- data/spec/integration/api/v2010/account/message_spec.rb +5 -5
- data/spec/integration/api/v2010/account/new_key_spec.rb +1 -1
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +1 -1
- data/spec/integration/api/v2010/account/notification_spec.rb +3 -3
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +4 -4
- data/spec/integration/api/v2010/account/queue/member_spec.rb +3 -3
- data/spec/integration/api/v2010/account/queue_spec.rb +5 -5
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +3 -3
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +3 -3
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +3 -3
- data/spec/integration/api/v2010/account/recording_spec.rb +3 -3
- data/spec/integration/api/v2010/account/short_code_spec.rb +3 -3
- data/spec/integration/api/v2010/account/signing_key_spec.rb +4 -4
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +4 -4
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +4 -4
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +5 -5
- data/spec/integration/api/v2010/account/token_spec.rb +1 -1
- data/spec/integration/api/v2010/account/transcription_spec.rb +3 -3
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +5 -5
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/api/v2010/account_spec.rb +4 -4
- data/spec/integration/chat/v1/credential_spec.rb +5 -5
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +4 -4
- data/spec/integration/chat/v1/service/channel/member_spec.rb +5 -5
- data/spec/integration/chat/v1/service/channel/message_spec.rb +5 -5
- data/spec/integration/chat/v1/service/channel_spec.rb +5 -5
- data/spec/integration/chat/v1/service/role_spec.rb +5 -5
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/chat/v1/service/user_spec.rb +5 -5
- data/spec/integration/chat/v1/service_spec.rb +5 -5
- data/spec/integration/chat/v2/credential_spec.rb +5 -5
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +4 -4
- data/spec/integration/chat/v2/service/channel/member_spec.rb +5 -5
- data/spec/integration/chat/v2/service/channel/message_spec.rb +5 -5
- data/spec/integration/chat/v2/service/channel_spec.rb +5 -5
- data/spec/integration/chat/v2/service/role_spec.rb +5 -5
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/chat/v2/service/user_spec.rb +5 -5
- data/spec/integration/chat/v2/service_spec.rb +5 -5
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +126 -0
- data/spec/integration/fax/v1/fax_spec.rb +48 -7
- data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +4 -4
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/credential_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +4 -4
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service_spec.rb +5 -5
- data/spec/integration/lookups/v1/phone_number_spec.rb +1 -1
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +4 -4
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +4 -4
- data/spec/integration/messaging/v1/service/short_code_spec.rb +4 -4
- data/spec/integration/messaging/v1/service_spec.rb +21 -5
- data/spec/integration/monitor/v1/alert_spec.rb +3 -3
- data/spec/integration/monitor/v1/event_spec.rb +2 -2
- data/spec/integration/notify/v1/credential_spec.rb +5 -5
- data/spec/integration/notify/v1/service/binding_spec.rb +4 -4
- data/spec/integration/notify/v1/service/notification_spec.rb +1 -1
- data/spec/integration/notify/v1/service/segment_spec.rb +1 -1
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +3 -3
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +4 -4
- data/spec/integration/notify/v1/service/user_spec.rb +4 -4
- data/spec/integration/notify/v1/service_spec.rb +5 -5
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +2 -2
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +2 -2
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +3 -3
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +5 -5
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +4 -4
- data/spec/integration/preview/sync/service/document_spec.rb +6 -6
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +7 -7
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +4 -4
- data/spec/integration/preview/sync/service/sync_list_spec.rb +4 -4
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +7 -7
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +4 -4
- data/spec/integration/preview/sync/service/sync_map_spec.rb +4 -4
- data/spec/integration/preview/sync/service_spec.rb +5 -5
- data/spec/integration/preview/wireless/command_spec.rb +3 -3
- data/spec/integration/preview/wireless/rate_plan_spec.rb +45 -45
- data/spec/integration/preview/wireless/sim/usage_spec.rb +1 -1
- data/spec/integration/preview/wireless/sim_spec.rb +27 -3
- data/spec/integration/pricing/v1/messaging/country_spec.rb +2 -2
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +2 -2
- data/spec/integration/pricing/v1/voice/country_spec.rb +2 -2
- data/spec/integration/pricing/v1/voice/number_spec.rb +1 -1
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +206 -0
- data/spec/integration/sync/v1/service/document_spec.rb +254 -0
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +256 -0
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +206 -0
- data/spec/integration/sync/v1/service/sync_list_spec.rb +207 -0
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +257 -0
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +206 -0
- data/spec/integration/sync/v1/service/sync_map_spec.rb +207 -0
- data/spec/integration/sync/v1/service_spec.rb +244 -0
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +2 -2
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +2 -2
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace_spec.rb +5 -5
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +4 -4
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +4 -4
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +5 -5
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +4 -4
- data/spec/integration/trunking/v1/trunk_spec.rb +5 -5
- data/spec/integration/video/v1/recording_spec.rb +3 -3
- data/spec/integration/video/v1/room/recording_spec.rb +145 -0
- data/spec/integration/video/v1/room_spec.rb +20 -8
- data/spec/integration/wireless/v1/command_spec.rb +166 -0
- data/spec/integration/wireless/v1/rate_plan_spec.rb +260 -0
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +65 -0
- data/spec/integration/wireless/v1/sim_spec.rb +208 -0
- data/twilio-ruby.gemspec +1 -1
- metadata +55 -5
@@ -13,7 +13,7 @@ describe 'IpAccessControlList' do
|
|
13
13
|
expect {
|
14
14
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.ip_access_control_lists("ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
@@ -51,7 +51,7 @@ describe 'IpAccessControlList' do
|
|
51
51
|
expect {
|
52
52
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
53
53
|
.ip_access_control_lists("ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
54
|
-
}.to raise_exception(Twilio::REST::
|
54
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
55
55
|
|
56
56
|
values = {}
|
57
57
|
expect(
|
@@ -79,7 +79,7 @@ describe 'IpAccessControlList' do
|
|
79
79
|
expect {
|
80
80
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
81
81
|
.ip_access_control_lists.create(ip_access_control_list_sid: "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
82
|
-
}.to raise_exception(Twilio::REST::
|
82
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
83
83
|
|
84
84
|
values = {
|
85
85
|
'IpAccessControlListSid' => "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -120,7 +120,7 @@ describe 'IpAccessControlList' do
|
|
120
120
|
expect {
|
121
121
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
122
122
|
.ip_access_control_lists.list()
|
123
|
-
}.to raise_exception(Twilio::REST::
|
123
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
124
124
|
|
125
125
|
values = {}
|
126
126
|
expect(
|
@@ -13,7 +13,7 @@ describe 'OriginationUrl' do
|
|
13
13
|
expect {
|
14
14
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.origination_urls("OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
@@ -55,7 +55,7 @@ describe 'OriginationUrl' do
|
|
55
55
|
expect {
|
56
56
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
57
57
|
.origination_urls("OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
58
|
-
}.to raise_exception(Twilio::REST::
|
58
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
59
59
|
|
60
60
|
values = {}
|
61
61
|
expect(
|
@@ -83,7 +83,7 @@ describe 'OriginationUrl' do
|
|
83
83
|
expect {
|
84
84
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
85
85
|
.origination_urls.create(weight: 1, priority: 1, enabled: true, friendly_name: "friendly_name", sip_url: "https://example.com")
|
86
|
-
}.to raise_exception(Twilio::REST::
|
86
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
87
87
|
|
88
88
|
values = {
|
89
89
|
'Weight' => 1,
|
@@ -132,7 +132,7 @@ describe 'OriginationUrl' do
|
|
132
132
|
expect {
|
133
133
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
134
134
|
.origination_urls.list()
|
135
|
-
}.to raise_exception(Twilio::REST::
|
135
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
136
136
|
|
137
137
|
values = {}
|
138
138
|
expect(
|
@@ -212,7 +212,7 @@ describe 'OriginationUrl' do
|
|
212
212
|
expect {
|
213
213
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
214
214
|
.origination_urls("OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
215
|
-
}.to raise_exception(Twilio::REST::
|
215
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
216
216
|
|
217
217
|
values = {}
|
218
218
|
expect(
|
@@ -13,7 +13,7 @@ describe 'PhoneNumber' do
|
|
13
13
|
expect {
|
14
14
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.phone_numbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
@@ -76,7 +76,7 @@ describe 'PhoneNumber' do
|
|
76
76
|
expect {
|
77
77
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
78
78
|
.phone_numbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
79
|
-
}.to raise_exception(Twilio::REST::
|
79
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
80
80
|
|
81
81
|
values = {}
|
82
82
|
expect(
|
@@ -104,7 +104,7 @@ describe 'PhoneNumber' do
|
|
104
104
|
expect {
|
105
105
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
106
106
|
.phone_numbers.create(phone_number_sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
107
|
-
}.to raise_exception(Twilio::REST::
|
107
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
108
108
|
|
109
109
|
values = {
|
110
110
|
'PhoneNumberSid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -170,7 +170,7 @@ describe 'PhoneNumber' do
|
|
170
170
|
expect {
|
171
171
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
172
172
|
.phone_numbers.list()
|
173
|
-
}.to raise_exception(Twilio::REST::
|
173
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
174
174
|
|
175
175
|
values = {}
|
176
176
|
expect(
|
@@ -12,7 +12,7 @@ describe 'Trunk' do
|
|
12
12
|
|
13
13
|
expect {
|
14
14
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
15
|
-
}.to raise_exception(Twilio::REST::
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
16
16
|
|
17
17
|
values = {}
|
18
18
|
expect(
|
@@ -63,7 +63,7 @@ describe 'Trunk' do
|
|
63
63
|
|
64
64
|
expect {
|
65
65
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
66
|
-
}.to raise_exception(Twilio::REST::
|
66
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
67
67
|
|
68
68
|
values = {}
|
69
69
|
expect(
|
@@ -89,7 +89,7 @@ describe 'Trunk' do
|
|
89
89
|
|
90
90
|
expect {
|
91
91
|
@client.trunking.v1.trunks.create()
|
92
|
-
}.to raise_exception(Twilio::REST::
|
92
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
93
93
|
|
94
94
|
values = {}
|
95
95
|
expect(
|
@@ -140,7 +140,7 @@ describe 'Trunk' do
|
|
140
140
|
|
141
141
|
expect {
|
142
142
|
@client.trunking.v1.trunks.list()
|
143
|
-
}.to raise_exception(Twilio::REST::
|
143
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
144
144
|
|
145
145
|
values = {}
|
146
146
|
expect(
|
@@ -228,7 +228,7 @@ describe 'Trunk' do
|
|
228
228
|
|
229
229
|
expect {
|
230
230
|
@client.trunking.v1.trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
231
|
-
}.to raise_exception(Twilio::REST::
|
231
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
232
232
|
|
233
233
|
values = {}
|
234
234
|
expect(
|
@@ -12,7 +12,7 @@ describe 'Recording' do
|
|
12
12
|
|
13
13
|
expect {
|
14
14
|
@client.video.v1.recordings("RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
15
|
-
}.to raise_exception(Twilio::REST::
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
16
16
|
|
17
17
|
values = {}
|
18
18
|
expect(
|
@@ -58,7 +58,7 @@ describe 'Recording' do
|
|
58
58
|
|
59
59
|
expect {
|
60
60
|
@client.video.v1.recordings.list()
|
61
|
-
}.to raise_exception(Twilio::REST::
|
61
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
62
62
|
|
63
63
|
values = {}
|
64
64
|
expect(
|
@@ -97,7 +97,7 @@ describe 'Recording' do
|
|
97
97
|
|
98
98
|
expect {
|
99
99
|
@client.video.v1.recordings("RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
100
|
-
}.to raise_exception(Twilio::REST::
|
100
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
101
101
|
|
102
102
|
values = {}
|
103
103
|
expect(
|
@@ -0,0 +1,145 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
require 'spec_helper.rb'
|
8
|
+
|
9
|
+
describe 'RoomRecording' do
|
10
|
+
it "can fetch" do
|
11
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
|
+
|
13
|
+
expect {
|
14
|
+
@client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
|
+
.recordings("RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
|
+
|
18
|
+
values = {}
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives fetch responses" do
|
27
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
32
|
+
"status": "processing",
|
33
|
+
"date_created": "2015-07-30T20:00:00Z",
|
34
|
+
"sid": "RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
|
+
"source_sid": "MTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
|
+
"size": 0,
|
37
|
+
"type": "audio",
|
38
|
+
"duration": 0,
|
39
|
+
"container_format": "mka",
|
40
|
+
"codec": "OPUS",
|
41
|
+
"grouping_sids": {
|
42
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
43
|
+
},
|
44
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
45
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
46
|
+
"links": {
|
47
|
+
"media": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
]
|
51
|
+
))
|
52
|
+
|
53
|
+
actual = @client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
54
|
+
.recordings("RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
55
|
+
|
56
|
+
expect(actual).to_not eq(nil)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "can read" do
|
60
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
61
|
+
|
62
|
+
expect {
|
63
|
+
@client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
64
|
+
.recordings.list()
|
65
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
66
|
+
|
67
|
+
values = {}
|
68
|
+
expect(
|
69
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
70
|
+
method: 'get',
|
71
|
+
url: 'https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings',
|
72
|
+
))).to eq(true)
|
73
|
+
end
|
74
|
+
|
75
|
+
it "receives read_empty responses" do
|
76
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
77
|
+
200,
|
78
|
+
%q[
|
79
|
+
{
|
80
|
+
"recordings": [],
|
81
|
+
"meta": {
|
82
|
+
"page": 0,
|
83
|
+
"page_size": 50,
|
84
|
+
"first_page_url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings?PageSize=50&Page=0",
|
85
|
+
"previous_page_url": null,
|
86
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings?PageSize=50&Page=0",
|
87
|
+
"next_page_url": null,
|
88
|
+
"key": "recordings"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
]
|
92
|
+
))
|
93
|
+
|
94
|
+
actual = @client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
95
|
+
.recordings.list()
|
96
|
+
|
97
|
+
expect(actual).to_not eq(nil)
|
98
|
+
end
|
99
|
+
|
100
|
+
it "receives read_results responses" do
|
101
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
102
|
+
200,
|
103
|
+
%q[
|
104
|
+
{
|
105
|
+
"recordings": [
|
106
|
+
{
|
107
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
108
|
+
"status": "completed",
|
109
|
+
"date_created": "2015-07-30T20:00:00Z",
|
110
|
+
"sid": "RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
111
|
+
"source_sid": "MTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
112
|
+
"size": 0,
|
113
|
+
"type": "audio",
|
114
|
+
"duration": 0,
|
115
|
+
"container_format": "mka",
|
116
|
+
"codec": "OPUS",
|
117
|
+
"grouping_sids": {
|
118
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
119
|
+
},
|
120
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
121
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
122
|
+
"links": {
|
123
|
+
"media": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
124
|
+
}
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"meta": {
|
128
|
+
"page": 0,
|
129
|
+
"page_size": 50,
|
130
|
+
"first_page_url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings?PageSize=50&Page=0",
|
131
|
+
"previous_page_url": null,
|
132
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings?PageSize=50&Page=0",
|
133
|
+
"next_page_url": null,
|
134
|
+
"key": "recordings"
|
135
|
+
}
|
136
|
+
}
|
137
|
+
]
|
138
|
+
))
|
139
|
+
|
140
|
+
actual = @client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
141
|
+
.recordings.list()
|
142
|
+
|
143
|
+
expect(actual).to_not eq(nil)
|
144
|
+
end
|
145
|
+
end
|
@@ -12,7 +12,7 @@ describe 'Room' do
|
|
12
12
|
|
13
13
|
expect {
|
14
14
|
@client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
15
|
-
}.to raise_exception(Twilio::REST::
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
16
16
|
|
17
17
|
values = {}
|
18
18
|
expect(
|
@@ -41,7 +41,10 @@ describe 'Room' do
|
|
41
41
|
"status_callback": "",
|
42
42
|
"record_participants_on_connect": false,
|
43
43
|
"end_time": "2015-07-30T20:00:00Z",
|
44
|
-
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
44
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
45
|
+
"links": {
|
46
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
47
|
+
}
|
45
48
|
}
|
46
49
|
]
|
47
50
|
))
|
@@ -56,7 +59,7 @@ describe 'Room' do
|
|
56
59
|
|
57
60
|
expect {
|
58
61
|
@client.video.v1.rooms.create()
|
59
|
-
}.to raise_exception(Twilio::REST::
|
62
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
60
63
|
|
61
64
|
values = {}
|
62
65
|
expect(
|
@@ -85,7 +88,10 @@ describe 'Room' do
|
|
85
88
|
"status_callback": "",
|
86
89
|
"record_participants_on_connect": false,
|
87
90
|
"end_time": "2015-07-30T20:00:00Z",
|
88
|
-
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
91
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
92
|
+
"links": {
|
93
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
94
|
+
}
|
89
95
|
}
|
90
96
|
]
|
91
97
|
))
|
@@ -100,7 +106,7 @@ describe 'Room' do
|
|
100
106
|
|
101
107
|
expect {
|
102
108
|
@client.video.v1.rooms.list()
|
103
|
-
}.to raise_exception(Twilio::REST::
|
109
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
104
110
|
|
105
111
|
values = {}
|
106
112
|
expect(
|
@@ -155,7 +161,10 @@ describe 'Room' do
|
|
155
161
|
"duration": 2,
|
156
162
|
"max_participants": 10,
|
157
163
|
"record_participants_on_connect": false,
|
158
|
-
"url": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c"
|
164
|
+
"url": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c",
|
165
|
+
"links": {
|
166
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c/Recordings"
|
167
|
+
}
|
159
168
|
}
|
160
169
|
],
|
161
170
|
"meta": {
|
@@ -181,7 +190,7 @@ describe 'Room' do
|
|
181
190
|
|
182
191
|
expect {
|
183
192
|
@client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(status: "in-progress")
|
184
|
-
}.to raise_exception(Twilio::REST::
|
193
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
185
194
|
|
186
195
|
values = {
|
187
196
|
'Status' => "in-progress",
|
@@ -213,7 +222,10 @@ describe 'Room' do
|
|
213
222
|
"record_participants_on_connect": false,
|
214
223
|
"end_time": "2015-07-30T20:00:00Z",
|
215
224
|
"duration": 10,
|
216
|
-
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
225
|
+
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
226
|
+
"links": {
|
227
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
228
|
+
}
|
217
229
|
}
|
218
230
|
]
|
219
231
|
))
|
@@ -0,0 +1,166 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
require 'spec_helper.rb'
|
8
|
+
|
9
|
+
describe 'Command' do
|
10
|
+
it "can fetch" do
|
11
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
|
+
|
13
|
+
expect {
|
14
|
+
@client.wireless.v1.commands("DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
16
|
+
|
17
|
+
values = {}
|
18
|
+
expect(
|
19
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
20
|
+
method: 'get',
|
21
|
+
url: 'https://wireless.twilio.com/v1/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
22
|
+
))).to eq(true)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "receives fetch responses" do
|
26
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
27
|
+
200,
|
28
|
+
%q[
|
29
|
+
{
|
30
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
31
|
+
"command": "command",
|
32
|
+
"command_mode": "text",
|
33
|
+
"date_created": "2015-07-30T20:00:00Z",
|
34
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
35
|
+
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
|
+
"direction": "from_sim",
|
37
|
+
"sid": "DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
+
"status": "queued",
|
39
|
+
"url": "https://wireless.twilio.com/v1/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
40
|
+
}
|
41
|
+
]
|
42
|
+
))
|
43
|
+
|
44
|
+
actual = @client.wireless.v1.commands("DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
45
|
+
|
46
|
+
expect(actual).to_not eq(nil)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "can read" do
|
50
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
51
|
+
|
52
|
+
expect {
|
53
|
+
@client.wireless.v1.commands.list()
|
54
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
55
|
+
|
56
|
+
values = {}
|
57
|
+
expect(
|
58
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
59
|
+
method: 'get',
|
60
|
+
url: 'https://wireless.twilio.com/v1/Commands',
|
61
|
+
))).to eq(true)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "receives read_empty responses" do
|
65
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
66
|
+
200,
|
67
|
+
%q[
|
68
|
+
{
|
69
|
+
"commands": [],
|
70
|
+
"meta": {
|
71
|
+
"first_page_url": "https://wireless.twilio.com/v1/Commands?PageSize=50&Page=0",
|
72
|
+
"key": "commands",
|
73
|
+
"next_page_url": null,
|
74
|
+
"page": 0,
|
75
|
+
"page_size": 50,
|
76
|
+
"previous_page_url": null,
|
77
|
+
"url": "https://wireless.twilio.com/v1/Commands?PageSize=50&Page=0"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
]
|
81
|
+
))
|
82
|
+
|
83
|
+
actual = @client.wireless.v1.commands.list()
|
84
|
+
|
85
|
+
expect(actual).to_not eq(nil)
|
86
|
+
end
|
87
|
+
|
88
|
+
it "receives read_full responses" do
|
89
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
90
|
+
200,
|
91
|
+
%q[
|
92
|
+
{
|
93
|
+
"commands": [
|
94
|
+
{
|
95
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
96
|
+
"command": "command",
|
97
|
+
"command_mode": "text",
|
98
|
+
"date_created": "2015-07-30T20:00:00Z",
|
99
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
100
|
+
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
101
|
+
"direction": "from_sim",
|
102
|
+
"sid": "DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
103
|
+
"status": "queued",
|
104
|
+
"url": "https://wireless.twilio.com/v1/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
105
|
+
}
|
106
|
+
],
|
107
|
+
"meta": {
|
108
|
+
"first_page_url": "https://wireless.twilio.com/v1/Commands?PageSize=50&Page=0",
|
109
|
+
"key": "commands",
|
110
|
+
"next_page_url": null,
|
111
|
+
"page": 0,
|
112
|
+
"page_size": 50,
|
113
|
+
"previous_page_url": null,
|
114
|
+
"url": "https://wireless.twilio.com/v1/Commands?PageSize=50&Page=0"
|
115
|
+
}
|
116
|
+
}
|
117
|
+
]
|
118
|
+
))
|
119
|
+
|
120
|
+
actual = @client.wireless.v1.commands.list()
|
121
|
+
|
122
|
+
expect(actual).to_not eq(nil)
|
123
|
+
end
|
124
|
+
|
125
|
+
it "can create" do
|
126
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
127
|
+
|
128
|
+
expect {
|
129
|
+
@client.wireless.v1.commands.create(command: "command")
|
130
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
131
|
+
|
132
|
+
values = {
|
133
|
+
'Command' => "command",
|
134
|
+
}
|
135
|
+
expect(
|
136
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
137
|
+
method: 'post',
|
138
|
+
url: 'https://wireless.twilio.com/v1/Commands',
|
139
|
+
data: values,
|
140
|
+
))).to eq(true)
|
141
|
+
end
|
142
|
+
|
143
|
+
it "receives create responses" do
|
144
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
145
|
+
201,
|
146
|
+
%q[
|
147
|
+
{
|
148
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
149
|
+
"command": "command",
|
150
|
+
"command_mode": "text",
|
151
|
+
"date_created": "2015-07-30T20:00:00Z",
|
152
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
153
|
+
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
154
|
+
"direction": "from_sim",
|
155
|
+
"sid": "DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
156
|
+
"status": "queued",
|
157
|
+
"url": "https://wireless.twilio.com/v1/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
158
|
+
}
|
159
|
+
]
|
160
|
+
))
|
161
|
+
|
162
|
+
actual = @client.wireless.v1.commands.create(command: "command")
|
163
|
+
|
164
|
+
expect(actual).to_not eq(nil)
|
165
|
+
end
|
166
|
+
end
|