twilio-ruby 5.0.0.rc4 → 5.0.0.rc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -1
- data/Makefile +3 -0
- data/lib/twilio-ruby.rb +0 -1
- data/lib/twilio-ruby/framework/version.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -11
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +0 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +0 -13
- data/lib/twilio-ruby/rest/client.rb +7 -7
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +0 -12
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +0 -12
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +0 -13
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +0 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +0 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +0 -13
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +0 -18
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -12
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +0 -12
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +0 -12
- data/lib/twilio-ruby/rest/notifications.rb +4 -0
- data/lib/twilio-ruby/rest/notifications/v1.rb +9 -0
- data/lib/twilio-ruby/rest/notifications/v1/credential.rb +390 -0
- data/lib/twilio-ruby/rest/notifications/v1/service.rb +0 -12
- data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +0 -13
- data/lib/twilio-ruby/rest/preview.rb +47 -0
- data/lib/twilio-ruby/rest/preview/wireless.rb +53 -0
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +345 -0
- data/lib/twilio-ruby/rest/preview/wireless/device.rb +456 -0
- data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +227 -0
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +325 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +0 -12
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +0 -12
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +0 -12
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +0 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +0 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +0 -14
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +0 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +0 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +0 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +0 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +0 -10
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +0 -12
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +0 -13
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +0 -13
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +0 -13
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +0 -13
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +3 -3
- data/spec/integration/ip_messaging/v1/credential_spec.rb +1 -1
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +1 -1
- data/spec/integration/notifications/v1/credential_spec.rb +228 -0
- data/spec/integration/notifications/v1/service/binding_spec.rb +2 -2
- data/spec/integration/preview/wireless/command_spec.rb +58 -0
- data/spec/integration/preview/wireless/device/usage_spec.rb +25 -0
- data/spec/integration/preview/wireless/device_spec.rb +72 -0
- data/spec/integration/preview/wireless/rate_plan_spec.rb +39 -0
- metadata +19 -16
- data/lib/twilio-ruby/rest/conversations.rb +0 -40
- data/lib/twilio-ruby/rest/conversations/v1.rb +0 -35
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +0 -270
- data/lib/twilio-ruby/rest/conversations/v1/conversation/completed.rb +0 -217
- data/lib/twilio-ruby/rest/conversations/v1/conversation/in_progress.rb +0 -217
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +0 -352
- data/spec/integration/conversations/v1/conversation/completed_spec.rb +0 -89
- data/spec/integration/conversations/v1/conversation/in_progress_spec.rb +0 -89
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +0 -174
- data/spec/integration/conversations/v1/conversation_spec.rb +0 -49
data/lib/twilio-ruby/version.rb
CHANGED
|
@@ -141,13 +141,13 @@ describe 'Trigger' do
|
|
|
141
141
|
expect {
|
|
142
142
|
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
143
143
|
.usage \
|
|
144
|
-
.triggers.create(callback_url: "https://example.com", trigger_value: "trigger_value", usage_category: "
|
|
144
|
+
.triggers.create(callback_url: "https://example.com", trigger_value: "trigger_value", usage_category: "authy-authentications")
|
|
145
145
|
}.to raise_exception(Twilio::REST::TwilioException)
|
|
146
146
|
|
|
147
147
|
values = {
|
|
148
148
|
'CallbackUrl' => "https://example.com",
|
|
149
149
|
'TriggerValue' => "trigger_value",
|
|
150
|
-
'UsageCategory' => "
|
|
150
|
+
'UsageCategory' => "authy-authentications",
|
|
151
151
|
}
|
|
152
152
|
expect(
|
|
153
153
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
@@ -184,7 +184,7 @@ describe 'Trigger' do
|
|
|
184
184
|
|
|
185
185
|
actual = @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
186
186
|
.usage \
|
|
187
|
-
.triggers.create(callback_url: "https://example.com", trigger_value: "trigger_value", usage_category: "
|
|
187
|
+
.triggers.create(callback_url: "https://example.com", trigger_value: "trigger_value", usage_category: "authy-authentications")
|
|
188
188
|
|
|
189
189
|
expect(actual).to_not eq(nil)
|
|
190
190
|
end
|
|
@@ -45,7 +45,7 @@ describe 'Credential' do
|
|
|
45
45
|
"first_page_url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
|
46
46
|
"previous_page_url": null,
|
|
47
47
|
"url": "https://ip-messaging.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
|
48
|
-
"next_page_url":
|
|
48
|
+
"next_page_url": null,
|
|
49
49
|
"key": "credentials"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -157,7 +157,7 @@ describe 'Role' do
|
|
|
157
157
|
"first_page_url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=1&Page=0",
|
|
158
158
|
"previous_page_url": null,
|
|
159
159
|
"url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=1&Page=0",
|
|
160
|
-
"next_page_url":
|
|
160
|
+
"next_page_url": null,
|
|
161
161
|
"key": "roles"
|
|
162
162
|
},
|
|
163
163
|
"roles": [
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
|
|
7
|
+
require 'spec_helper.rb'
|
|
8
|
+
|
|
9
|
+
describe 'Credential' do
|
|
10
|
+
it "can read" do
|
|
11
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
+
|
|
13
|
+
expect {
|
|
14
|
+
@client.notifications.v1.credentials.list()
|
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
16
|
+
|
|
17
|
+
values = {}
|
|
18
|
+
expect(
|
|
19
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
20
|
+
method: 'get',
|
|
21
|
+
url: 'https://notifications.twilio.com/v1/Credentials',
|
|
22
|
+
))).to eq(true)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "receives read_full responses" do
|
|
26
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
27
|
+
200,
|
|
28
|
+
%q[
|
|
29
|
+
{
|
|
30
|
+
"credentials": [
|
|
31
|
+
{
|
|
32
|
+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
33
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
34
|
+
"friendly_name": "Test slow create",
|
|
35
|
+
"type": "apn",
|
|
36
|
+
"sandbox": "False",
|
|
37
|
+
"date_created": "2015-10-07T17:50:01Z",
|
|
38
|
+
"date_updated": "2015-10-07T17:50:01Z",
|
|
39
|
+
"url": "https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"meta": {
|
|
43
|
+
"page": 0,
|
|
44
|
+
"page_size": 1,
|
|
45
|
+
"first_page_url": "https://notifications.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
|
46
|
+
"previous_page_url": null,
|
|
47
|
+
"url": "https://notifications.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
|
48
|
+
"next_page_url": null,
|
|
49
|
+
"key": "credentials"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
))
|
|
54
|
+
|
|
55
|
+
actual = @client.notifications.v1.credentials.list()
|
|
56
|
+
|
|
57
|
+
expect(actual).to_not eq(nil)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it "receives read_empty responses" do
|
|
61
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
62
|
+
200,
|
|
63
|
+
%q[
|
|
64
|
+
{
|
|
65
|
+
"credentials": [],
|
|
66
|
+
"meta": {
|
|
67
|
+
"page": 0,
|
|
68
|
+
"page_size": 1,
|
|
69
|
+
"first_page_url": "https://notifications.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
|
70
|
+
"previous_page_url": null,
|
|
71
|
+
"url": "https://notifications.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
|
72
|
+
"next_page_url": null,
|
|
73
|
+
"key": "credentials"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
))
|
|
78
|
+
|
|
79
|
+
actual = @client.notifications.v1.credentials.list()
|
|
80
|
+
|
|
81
|
+
expect(actual).to_not eq(nil)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
it "can create" do
|
|
85
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
86
|
+
|
|
87
|
+
expect {
|
|
88
|
+
@client.notifications.v1.credentials.create(friendly_name: "friendly_name", type: "gcm")
|
|
89
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
90
|
+
|
|
91
|
+
values = {
|
|
92
|
+
'FriendlyName' => "friendly_name",
|
|
93
|
+
'Type' => "gcm",
|
|
94
|
+
}
|
|
95
|
+
expect(
|
|
96
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
97
|
+
method: 'post',
|
|
98
|
+
url: 'https://notifications.twilio.com/v1/Credentials',
|
|
99
|
+
data: values,
|
|
100
|
+
))).to eq(true)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
it "receives create responses" do
|
|
104
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
105
|
+
201,
|
|
106
|
+
%q[
|
|
107
|
+
{
|
|
108
|
+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
109
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
110
|
+
"friendly_name": "Test slow create",
|
|
111
|
+
"type": "apn",
|
|
112
|
+
"sandbox": "False",
|
|
113
|
+
"date_created": "2015-10-07T17:50:01Z",
|
|
114
|
+
"date_updated": "2015-10-07T17:50:01Z",
|
|
115
|
+
"url": "https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
))
|
|
119
|
+
|
|
120
|
+
actual = @client.notifications.v1.credentials.create(friendly_name: "friendly_name", type: "gcm")
|
|
121
|
+
|
|
122
|
+
expect(actual).to_not eq(nil)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
it "can fetch" do
|
|
126
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
127
|
+
|
|
128
|
+
expect {
|
|
129
|
+
@client.notifications.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
130
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
131
|
+
|
|
132
|
+
values = {}
|
|
133
|
+
expect(
|
|
134
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
135
|
+
method: 'get',
|
|
136
|
+
url: 'https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
137
|
+
))).to eq(true)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
it "receives fetch responses" do
|
|
141
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
142
|
+
200,
|
|
143
|
+
%q[
|
|
144
|
+
{
|
|
145
|
+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
146
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
147
|
+
"friendly_name": "Test slow create",
|
|
148
|
+
"type": "apn",
|
|
149
|
+
"sandbox": "False",
|
|
150
|
+
"date_created": "2015-10-07T17:50:01Z",
|
|
151
|
+
"date_updated": "2015-10-07T17:50:01Z",
|
|
152
|
+
"url": "https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
))
|
|
156
|
+
|
|
157
|
+
actual = @client.notifications.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
158
|
+
|
|
159
|
+
expect(actual).to_not eq(nil)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
it "can update" do
|
|
163
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
164
|
+
|
|
165
|
+
expect {
|
|
166
|
+
@client.notifications.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(friendly_name: "friendly_name", type: "gcm")
|
|
167
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
168
|
+
|
|
169
|
+
values = {
|
|
170
|
+
'FriendlyName' => "friendly_name",
|
|
171
|
+
'Type' => "gcm",
|
|
172
|
+
}
|
|
173
|
+
expect(
|
|
174
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
175
|
+
method: 'post',
|
|
176
|
+
url: 'https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
177
|
+
data: values,
|
|
178
|
+
))).to eq(true)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
it "receives update responses" do
|
|
182
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
183
|
+
200,
|
|
184
|
+
%q[
|
|
185
|
+
{
|
|
186
|
+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
187
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
188
|
+
"friendly_name": "Test slow create",
|
|
189
|
+
"type": "apn",
|
|
190
|
+
"sandbox": "False",
|
|
191
|
+
"date_created": "2015-10-07T17:50:01Z",
|
|
192
|
+
"date_updated": "2015-10-07T17:50:01Z",
|
|
193
|
+
"url": "https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
))
|
|
197
|
+
|
|
198
|
+
actual = @client.notifications.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(friendly_name: "friendly_name", type: "gcm")
|
|
199
|
+
|
|
200
|
+
expect(actual).to_not eq(nil)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
it "can delete" do
|
|
204
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
205
|
+
|
|
206
|
+
expect {
|
|
207
|
+
@client.notifications.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
|
208
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
209
|
+
|
|
210
|
+
values = {}
|
|
211
|
+
expect(
|
|
212
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
213
|
+
method: 'delete',
|
|
214
|
+
url: 'https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
215
|
+
))).to eq(true)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
it "receives delete responses" do
|
|
219
|
+
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
220
|
+
204,
|
|
221
|
+
nil,
|
|
222
|
+
))
|
|
223
|
+
|
|
224
|
+
actual = @client.notifications.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
|
225
|
+
|
|
226
|
+
expect(actual).to eq(true)
|
|
227
|
+
end
|
|
228
|
+
end
|
|
@@ -154,7 +154,7 @@ describe 'Binding' do
|
|
|
154
154
|
"first_page_url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
|
155
155
|
"previous_page_url": null,
|
|
156
156
|
"url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
|
157
|
-
"next_page_url":
|
|
157
|
+
"next_page_url": null,
|
|
158
158
|
"key": "bindings"
|
|
159
159
|
},
|
|
160
160
|
"bindings": [
|
|
@@ -194,7 +194,7 @@ describe 'Binding' do
|
|
|
194
194
|
"first_page_url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
|
195
195
|
"previous_page_url": null,
|
|
196
196
|
"url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
|
197
|
-
"next_page_url":
|
|
197
|
+
"next_page_url": null,
|
|
198
198
|
"key": "bindings"
|
|
199
199
|
},
|
|
200
200
|
"bindings": []
|
|
@@ -0,0 +1,58 @@
|
|
|
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.preview.wireless.commands("DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
16
|
+
|
|
17
|
+
values = {}
|
|
18
|
+
expect(
|
|
19
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
20
|
+
method: 'get',
|
|
21
|
+
url: 'https://preview.twilio.com/wireless/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
22
|
+
))).to eq(true)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "can read" do
|
|
26
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
27
|
+
|
|
28
|
+
expect {
|
|
29
|
+
@client.preview.wireless.commands.list()
|
|
30
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
31
|
+
|
|
32
|
+
values = {}
|
|
33
|
+
expect(
|
|
34
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
35
|
+
method: 'get',
|
|
36
|
+
url: 'https://preview.twilio.com/wireless/Commands',
|
|
37
|
+
))).to eq(true)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it "can create" do
|
|
41
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
42
|
+
|
|
43
|
+
expect {
|
|
44
|
+
@client.preview.wireless.commands.create(device: "device", command: "command")
|
|
45
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
46
|
+
|
|
47
|
+
values = {
|
|
48
|
+
'Device' => "device",
|
|
49
|
+
'Command' => "command",
|
|
50
|
+
}
|
|
51
|
+
expect(
|
|
52
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
53
|
+
method: 'post',
|
|
54
|
+
url: 'https://preview.twilio.com/wireless/Commands',
|
|
55
|
+
data: values,
|
|
56
|
+
))).to eq(true)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
|
|
7
|
+
require 'spec_helper.rb'
|
|
8
|
+
|
|
9
|
+
describe 'Usage' do
|
|
10
|
+
it "can fetch" do
|
|
11
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
+
|
|
13
|
+
expect {
|
|
14
|
+
@client.preview.wireless.devices("sid") \
|
|
15
|
+
.usage().fetch()
|
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
17
|
+
|
|
18
|
+
values = {}
|
|
19
|
+
expect(
|
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
21
|
+
method: 'get',
|
|
22
|
+
url: 'https://preview.twilio.com/wireless/Devices/sid/Usage',
|
|
23
|
+
))).to eq(true)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
|
|
7
|
+
require 'spec_helper.rb'
|
|
8
|
+
|
|
9
|
+
describe 'Device' do
|
|
10
|
+
it "can fetch" do
|
|
11
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
+
|
|
13
|
+
expect {
|
|
14
|
+
@client.preview.wireless.devices("sid").fetch()
|
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
16
|
+
|
|
17
|
+
values = {}
|
|
18
|
+
expect(
|
|
19
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
20
|
+
method: 'get',
|
|
21
|
+
url: 'https://preview.twilio.com/wireless/Devices/sid',
|
|
22
|
+
))).to eq(true)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "can read" do
|
|
26
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
27
|
+
|
|
28
|
+
expect {
|
|
29
|
+
@client.preview.wireless.devices.list()
|
|
30
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
31
|
+
|
|
32
|
+
values = {}
|
|
33
|
+
expect(
|
|
34
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
35
|
+
method: 'get',
|
|
36
|
+
url: 'https://preview.twilio.com/wireless/Devices',
|
|
37
|
+
))).to eq(true)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it "can create" do
|
|
41
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
42
|
+
|
|
43
|
+
expect {
|
|
44
|
+
@client.preview.wireless.devices.create(rate_plan: "rate_plan")
|
|
45
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
46
|
+
|
|
47
|
+
values = {
|
|
48
|
+
'RatePlan' => "rate_plan",
|
|
49
|
+
}
|
|
50
|
+
expect(
|
|
51
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
52
|
+
method: 'post',
|
|
53
|
+
url: 'https://preview.twilio.com/wireless/Devices',
|
|
54
|
+
data: values,
|
|
55
|
+
))).to eq(true)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it "can update" do
|
|
59
|
+
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
60
|
+
|
|
61
|
+
expect {
|
|
62
|
+
@client.preview.wireless.devices("sid").update()
|
|
63
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
|
64
|
+
|
|
65
|
+
values = {}
|
|
66
|
+
expect(
|
|
67
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
68
|
+
method: 'post',
|
|
69
|
+
url: 'https://preview.twilio.com/wireless/Devices/sid',
|
|
70
|
+
))).to eq(true)
|
|
71
|
+
end
|
|
72
|
+
end
|