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
@@ -0,0 +1,53 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
module Twilio
|
8
|
+
module REST
|
9
|
+
class Wireless
|
10
|
+
class V1 < Version
|
11
|
+
##
|
12
|
+
# Initialize the V1 version of Wireless
|
13
|
+
def initialize(domain)
|
14
|
+
super
|
15
|
+
@version = 'v1'
|
16
|
+
@commands = nil
|
17
|
+
@rate_plans = nil
|
18
|
+
@sims = nil
|
19
|
+
end
|
20
|
+
|
21
|
+
def commands(sid=:unset)
|
22
|
+
if sid == :unset
|
23
|
+
@commands ||= CommandList.new self
|
24
|
+
else
|
25
|
+
CommandContext.new(self, sid)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def rate_plans(sid=:unset)
|
30
|
+
if sid == :unset
|
31
|
+
@rate_plans ||= RatePlanList.new self
|
32
|
+
else
|
33
|
+
RatePlanContext.new(self, sid)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def sims(sid=:unset)
|
38
|
+
if sid == :unset
|
39
|
+
@sims ||= SimList.new self
|
40
|
+
else
|
41
|
+
SimContext.new(self, sid)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Provide a user friendly representation
|
47
|
+
def to_s
|
48
|
+
'<Twilio::REST::Wireless::V1>'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
module Twilio
|
8
|
+
module REST
|
9
|
+
class Wireless < Domain
|
10
|
+
##
|
11
|
+
# Initialize the Wireless Domain
|
12
|
+
def initialize(twilio)
|
13
|
+
super
|
14
|
+
|
15
|
+
@base_url = 'https://wireless.twilio.com'
|
16
|
+
@host = 'wireless.twilio.com'
|
17
|
+
@port = 443
|
18
|
+
|
19
|
+
# Versions
|
20
|
+
@v1 = nil
|
21
|
+
end
|
22
|
+
|
23
|
+
##
|
24
|
+
# Version v1 of wireless
|
25
|
+
def v1
|
26
|
+
@v1 ||= V1.new self
|
27
|
+
end
|
28
|
+
|
29
|
+
def commands
|
30
|
+
self.v1.commands
|
31
|
+
end
|
32
|
+
|
33
|
+
def rate_plans
|
34
|
+
self.v1.rate_plans
|
35
|
+
end
|
36
|
+
|
37
|
+
def sims
|
38
|
+
self.v1.sims
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Provide a user friendly representation
|
43
|
+
def to_s
|
44
|
+
'#<Twilio::REST::Wireless>'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -8,7 +8,8 @@ module Twilio
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def validate(url, params, signature)
|
11
|
-
|
11
|
+
params_hash = params_to_hash(params)
|
12
|
+
expected = build_signature_for(url, params_hash)
|
12
13
|
secure_compare(expected, signature)
|
13
14
|
end
|
14
15
|
|
@@ -32,6 +33,23 @@ module Twilio
|
|
32
33
|
b.each_byte { |byte| res |= byte ^ l.shift }
|
33
34
|
res == 0
|
34
35
|
end
|
36
|
+
|
37
|
+
# `ActionController::Parameters` no longer, as of Rails 5, inherits
|
38
|
+
# from `Hash` so the `sort` method, used above in `build_signature_for`
|
39
|
+
# is deprecated.
|
40
|
+
#
|
41
|
+
# `to_unsafe_h` was introduced in Rails 4.2.1, before then it is still
|
42
|
+
# possible to sort on an ActionController::Parameters object.
|
43
|
+
#
|
44
|
+
# We use `to_unsafe_h` as `to_h` returns a hash of the permitted
|
45
|
+
# parameters only and we need all the parameters to create the signature.
|
46
|
+
def params_to_hash(params)
|
47
|
+
if params.respond_to?(:to_unsafe_h)
|
48
|
+
params.to_unsafe_h
|
49
|
+
else
|
50
|
+
params
|
51
|
+
end
|
52
|
+
end
|
35
53
|
end
|
36
54
|
end
|
37
55
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -50,4 +50,23 @@ describe Twilio do
|
|
50
50
|
|
51
51
|
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
|
+
describe 'serialize_object' do
|
55
|
+
|
56
|
+
it 'should jsonify hashes' do
|
57
|
+
actual = Twilio.serialize_object({twilio: "rocks"})
|
58
|
+
expect(actual).to eq('{"twilio":"rocks"}')
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should jsonify arrays' do
|
62
|
+
actual = Twilio.serialize_object(["twilio", "rocks"])
|
63
|
+
expect(actual).to eq('["twilio","rocks"]')
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'should not modify other types' do
|
67
|
+
actual = Twilio.serialize_object(123)
|
68
|
+
expect(actual).to eq(123)
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
@@ -13,7 +13,7 @@ describe 'PublicKey' do
|
|
13
13
|
expect {
|
14
14
|
@client.accounts.v1.credentials \
|
15
15
|
.public_key.list()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
@@ -88,7 +88,7 @@ describe 'PublicKey' do
|
|
88
88
|
expect {
|
89
89
|
@client.accounts.v1.credentials \
|
90
90
|
.public_key.create(public_key: "publickey")
|
91
|
-
}.to raise_exception(Twilio::REST::
|
91
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
92
92
|
|
93
93
|
values = {
|
94
94
|
'PublicKey' => "publickey",
|
@@ -128,7 +128,7 @@ describe 'PublicKey' do
|
|
128
128
|
expect {
|
129
129
|
@client.accounts.v1.credentials \
|
130
130
|
.public_key("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
131
|
-
}.to raise_exception(Twilio::REST::
|
131
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
132
132
|
|
133
133
|
values = {}
|
134
134
|
expect(
|
@@ -165,7 +165,7 @@ describe 'PublicKey' do
|
|
165
165
|
expect {
|
166
166
|
@client.accounts.v1.credentials \
|
167
167
|
.public_key("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
168
|
-
}.to raise_exception(Twilio::REST::
|
168
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
169
169
|
|
170
170
|
values = {}
|
171
171
|
expect(
|
@@ -202,7 +202,7 @@ describe 'PublicKey' do
|
|
202
202
|
expect {
|
203
203
|
@client.accounts.v1.credentials \
|
204
204
|
.public_key("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
205
|
-
}.to raise_exception(Twilio::REST::
|
205
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
206
206
|
|
207
207
|
values = {}
|
208
208
|
expect(
|
@@ -14,7 +14,7 @@ describe 'DependentPhoneNumber' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
16
16
|
.dependent_phone_numbers.list()
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {}
|
20
20
|
expect(
|
@@ -13,7 +13,7 @@ describe 'Address' do
|
|
13
13
|
expect {
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.addresses.create(customer_name: "customer_name", street: "street", city: "city", region: "region", postal_code: "postal_code", iso_country: "US")
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {
|
19
19
|
'CustomerName' => "customer_name",
|
@@ -66,7 +66,7 @@ describe 'Address' do
|
|
66
66
|
expect {
|
67
67
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
68
68
|
.addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
69
|
-
}.to raise_exception(Twilio::REST::
|
69
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
70
70
|
|
71
71
|
values = {}
|
72
72
|
expect(
|
@@ -94,7 +94,7 @@ describe 'Address' do
|
|
94
94
|
expect {
|
95
95
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
96
96
|
.addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
97
|
-
}.to raise_exception(Twilio::REST::
|
97
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
98
98
|
|
99
99
|
values = {}
|
100
100
|
expect(
|
@@ -139,7 +139,7 @@ describe 'Address' do
|
|
139
139
|
expect {
|
140
140
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
141
141
|
.addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
142
|
-
}.to raise_exception(Twilio::REST::
|
142
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
143
143
|
|
144
144
|
values = {}
|
145
145
|
expect(
|
@@ -184,7 +184,7 @@ describe 'Address' do
|
|
184
184
|
expect {
|
185
185
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
186
186
|
.addresses.list()
|
187
|
-
}.to raise_exception(Twilio::REST::
|
187
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
188
188
|
|
189
189
|
values = {}
|
190
190
|
expect(
|
@@ -13,7 +13,7 @@ describe 'Application' do
|
|
13
13
|
expect {
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.applications.create(friendly_name: "friendly_name")
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {
|
19
19
|
'FriendlyName' => "friendly_name",
|
@@ -67,7 +67,7 @@ describe 'Application' do
|
|
67
67
|
expect {
|
68
68
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
69
69
|
.applications("APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
70
|
-
}.to raise_exception(Twilio::REST::
|
70
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
71
71
|
|
72
72
|
values = {}
|
73
73
|
expect(
|
@@ -95,7 +95,7 @@ describe 'Application' do
|
|
95
95
|
expect {
|
96
96
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
97
97
|
.applications("APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
98
|
-
}.to raise_exception(Twilio::REST::
|
98
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
99
99
|
|
100
100
|
values = {}
|
101
101
|
expect(
|
@@ -146,7 +146,7 @@ describe 'Application' do
|
|
146
146
|
expect {
|
147
147
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
148
148
|
.applications.list()
|
149
|
-
}.to raise_exception(Twilio::REST::
|
149
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
150
150
|
|
151
151
|
values = {}
|
152
152
|
expect(
|
@@ -239,7 +239,7 @@ describe 'Application' do
|
|
239
239
|
expect {
|
240
240
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
241
241
|
.applications("APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
242
|
-
}.to raise_exception(Twilio::REST::
|
242
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
243
243
|
|
244
244
|
values = {}
|
245
245
|
expect(
|
@@ -13,7 +13,7 @@ describe 'AuthorizedConnectApp' do
|
|
13
13
|
expect {
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.authorized_connect_apps("CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
@@ -56,7 +56,7 @@ describe 'AuthorizedConnectApp' do
|
|
56
56
|
expect {
|
57
57
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
58
58
|
.authorized_connect_apps.list()
|
59
|
-
}.to raise_exception(Twilio::REST::
|
59
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
60
60
|
|
61
61
|
values = {}
|
62
62
|
expect(
|
@@ -14,7 +14,7 @@ describe 'Local' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.available_phone_numbers("US") \
|
16
16
|
.local.list()
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {}
|
20
20
|
expect(
|
@@ -14,7 +14,7 @@ describe 'Mobile' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.available_phone_numbers("US") \
|
16
16
|
.mobile.list()
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {}
|
20
20
|
expect(
|
@@ -14,7 +14,7 @@ describe 'TollFree' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.available_phone_numbers("US") \
|
16
16
|
.toll_free.list()
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {}
|
20
20
|
expect(
|
@@ -13,7 +13,7 @@ describe 'AvailablePhoneNumberCountry' do
|
|
13
13
|
expect {
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.available_phone_numbers.list()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
@@ -93,7 +93,7 @@ describe 'AvailablePhoneNumberCountry' do
|
|
93
93
|
expect {
|
94
94
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
95
95
|
.available_phone_numbers("US").fetch()
|
96
|
-
}.to raise_exception(Twilio::REST::
|
96
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
97
97
|
|
98
98
|
values = {}
|
99
99
|
expect(
|
@@ -14,7 +14,7 @@ describe 'Feedback' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
16
16
|
.feedback().create(quality_score: 1)
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {
|
20
20
|
'QualityScore' => 1,
|
@@ -59,7 +59,7 @@ describe 'Feedback' do
|
|
59
59
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
60
60
|
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
61
61
|
.feedback().fetch()
|
62
|
-
}.to raise_exception(Twilio::REST::
|
62
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
63
63
|
|
64
64
|
values = {}
|
65
65
|
expect(
|
@@ -101,7 +101,7 @@ describe 'Feedback' do
|
|
101
101
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
102
102
|
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
103
103
|
.feedback().update(quality_score: 1)
|
104
|
-
}.to raise_exception(Twilio::REST::
|
104
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
105
105
|
|
106
106
|
values = {
|
107
107
|
'QualityScore' => 1,
|
@@ -14,7 +14,7 @@ describe 'FeedbackSummary' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.calls \
|
16
16
|
.feedback_summaries.create(start_date: Date.new(2008, 1, 2), end_date: Date.new(2008, 1, 2))
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {
|
20
20
|
'StartDate' => Twilio.serialize_iso8601(Date.new(2008, 1, 2)),
|
@@ -71,7 +71,7 @@ describe 'FeedbackSummary' do
|
|
71
71
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
72
72
|
.calls \
|
73
73
|
.feedback_summaries("FSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
74
|
-
}.to raise_exception(Twilio::REST::
|
74
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
75
75
|
|
76
76
|
values = {}
|
77
77
|
expect(
|
@@ -124,7 +124,7 @@ describe 'FeedbackSummary' do
|
|
124
124
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
125
125
|
.calls \
|
126
126
|
.feedback_summaries("FSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
127
|
-
}.to raise_exception(Twilio::REST::
|
127
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
128
128
|
|
129
129
|
values = {}
|
130
130
|
expect(
|
@@ -14,7 +14,7 @@ describe 'Notification' do
|
|
14
14
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
16
16
|
.notifications("NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
17
|
-
}.to raise_exception(Twilio::REST::
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
19
|
values = {}
|
20
20
|
expect(
|
@@ -64,7 +64,7 @@ describe 'Notification' do
|
|
64
64
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
65
65
|
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
66
66
|
.notifications("NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
67
|
-
}.to raise_exception(Twilio::REST::
|
67
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
68
68
|
|
69
69
|
values = {}
|
70
70
|
expect(
|
@@ -94,7 +94,7 @@ describe 'Notification' do
|
|
94
94
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
95
95
|
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
96
96
|
.notifications.list()
|
97
|
-
}.to raise_exception(Twilio::REST::
|
97
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
98
98
|
|
99
99
|
values = {}
|
100
100
|
expect(
|