twilio-ruby 5.0.0.rc16 → 5.0.0.rc17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHORS.md +1 -0
- data/CHANGES.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/jwt/access_token.rb +23 -1
- data/lib/twilio-ruby/rest/api.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account.rb +19 -11
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +29 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +25 -0
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +406 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +2 -6
- data/lib/twilio-ruby/rest/{notifications.rb → chat.rb} +6 -6
- data/lib/twilio-ruby/rest/{notifications → chat}/v1.rb +3 -3
- data/lib/twilio-ruby/rest/{notifications → chat}/v1/credential.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v1/service.rb +501 -0
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +468 -0
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +351 -0
- data/lib/twilio-ruby/rest/{api/v2010/account/sms/sms_message.rb → chat/v1/service/channel/message.rb} +120 -168
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +373 -0
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +378 -0
- data/lib/twilio-ruby/rest/client.rb +19 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +3 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +2 -6
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +5 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -0
- data/lib/twilio-ruby/rest/notify.rb +44 -0
- data/lib/twilio-ruby/rest/notify/v1.rb +44 -0
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +375 -0
- data/lib/twilio-ruby/rest/{notifications → notify}/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/{notifications → notify}/v1/service/binding.rb +5 -5
- data/lib/twilio-ruby/rest/{notifications → notify}/v1/service/notification.rb +4 -4
- data/lib/twilio-ruby/rest/preview.rb +11 -0
- data/lib/twilio-ruby/rest/preview/sync.rb +35 -0
- data/lib/twilio-ruby/rest/preview/sync/service.rb +458 -0
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +376 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +375 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +409 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +375 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +411 -0
- data/lib/twilio-ruby/rest/preview/wireless/device.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +55 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +29 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +294 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +32 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +374 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +6 -6
- data/spec/integration/api/v2010/account/recording_spec.rb +10 -1
- data/spec/integration/api/v2010/account/{sms/short_code_spec.rb → short_code_spec.rb} +0 -7
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +3 -7
- data/spec/integration/chat/v1/credential_spec.rb +223 -0
- data/spec/integration/chat/v1/service/channel/member_spec.rb +213 -0
- data/spec/integration/chat/v1/service/channel/message_spec.rb +100 -0
- data/spec/integration/chat/v1/service/channel_spec.rb +259 -0
- data/spec/integration/chat/v1/service/role_spec.rb +263 -0
- data/spec/integration/chat/v1/service/user_spec.rb +242 -0
- data/spec/integration/chat/v1/service_spec.rb +263 -0
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +2 -3
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +2 -3
- data/spec/integration/lookups/v1/phone_number_spec.rb +5 -0
- data/spec/integration/{notifications → notify}/v1/credential_spec.rb +24 -24
- data/spec/integration/{notifications → notify}/v1/service/binding_spec.rb +29 -29
- data/spec/integration/{notifications → notify}/v1/service/notification_spec.rb +5 -5
- data/spec/integration/{notifications → notify}/v1/service_spec.rb +32 -32
- data/spec/integration/preview/sync/service/document_spec.rb +92 -0
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +100 -0
- data/spec/integration/preview/sync/service/sync_list_spec.rb +73 -0
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +101 -0
- data/spec/integration/preview/sync/service/sync_map_spec.rb +73 -0
- data/spec/integration/preview/sync/service_spec.rb +84 -0
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +127 -0
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +8 -0
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +201 -0
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +2 -3
- data/spec/integration/taskrouter/v1/workspace_spec.rb +8 -0
- data/spec/jwt/access_token_spec.rb +27 -0
- metadata +84 -42
- data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +0 -134
- data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +0 -408
- data/spec/integration/api/v2010/account/sms/sms_message_spec.rb +0 -275
- data/spec/integration/api/v2010/account/sms_spec.rb +0 -10
@@ -218,11 +218,10 @@ describe 'Role' do
|
|
218
218
|
|
219
219
|
expect {
|
220
220
|
@client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
221
|
-
.roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(
|
221
|
+
.roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission'])
|
222
222
|
}.to raise_exception(Twilio::REST::TwilioException)
|
223
223
|
|
224
224
|
values = {
|
225
|
-
'FriendlyName' => "friendly_name",
|
226
225
|
'Permission' => ['permission'],
|
227
226
|
}
|
228
227
|
expect(
|
@@ -257,7 +256,7 @@ describe 'Role' do
|
|
257
256
|
))
|
258
257
|
|
259
258
|
actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
260
|
-
.roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(
|
259
|
+
.roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission'])
|
261
260
|
|
262
261
|
expect(actual).to_not eq(nil)
|
263
262
|
end
|
@@ -81,12 +81,11 @@ describe 'User' do
|
|
81
81
|
|
82
82
|
expect {
|
83
83
|
@client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
84
|
-
.users.create(identity: "identity"
|
84
|
+
.users.create(identity: "identity")
|
85
85
|
}.to raise_exception(Twilio::REST::TwilioException)
|
86
86
|
|
87
87
|
values = {
|
88
88
|
'Identity' => "identity",
|
89
|
-
'RoleSid' => "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
90
89
|
}
|
91
90
|
expect(
|
92
91
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -116,7 +115,7 @@ describe 'User' do
|
|
116
115
|
))
|
117
116
|
|
118
117
|
actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
119
|
-
.users.create(identity: "identity"
|
118
|
+
.users.create(identity: "identity")
|
120
119
|
|
121
120
|
expect(actual).to_not eq(nil)
|
122
121
|
end
|
@@ -11,14 +11,14 @@ describe 'Credential' do
|
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
12
|
|
13
13
|
expect {
|
14
|
-
@client.
|
14
|
+
@client.notify.v1.credentials.list()
|
15
15
|
}.to raise_exception(Twilio::REST::TwilioException)
|
16
16
|
|
17
17
|
values = {}
|
18
18
|
expect(
|
19
19
|
@holodeck.has_request?(Holodeck::Request.new(
|
20
20
|
method: 'get',
|
21
|
-
url: 'https://
|
21
|
+
url: 'https://notify.twilio.com/v1/Credentials',
|
22
22
|
))).to eq(true)
|
23
23
|
end
|
24
24
|
|
@@ -36,15 +36,15 @@ describe 'Credential' do
|
|
36
36
|
"sandbox": "False",
|
37
37
|
"date_created": "2015-10-07T17:50:01Z",
|
38
38
|
"date_updated": "2015-10-07T17:50:01Z",
|
39
|
-
"url": "https://
|
39
|
+
"url": "https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
40
40
|
}
|
41
41
|
],
|
42
42
|
"meta": {
|
43
43
|
"page": 0,
|
44
44
|
"page_size": 1,
|
45
|
-
"first_page_url": "https://
|
45
|
+
"first_page_url": "https://notify.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
46
46
|
"previous_page_url": null,
|
47
|
-
"url": "https://
|
47
|
+
"url": "https://notify.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
48
48
|
"next_page_url": null,
|
49
49
|
"key": "credentials"
|
50
50
|
}
|
@@ -52,7 +52,7 @@ describe 'Credential' do
|
|
52
52
|
]
|
53
53
|
))
|
54
54
|
|
55
|
-
actual = @client.
|
55
|
+
actual = @client.notify.v1.credentials.list()
|
56
56
|
|
57
57
|
expect(actual).to_not eq(nil)
|
58
58
|
end
|
@@ -66,9 +66,9 @@ describe 'Credential' do
|
|
66
66
|
"meta": {
|
67
67
|
"page": 0,
|
68
68
|
"page_size": 1,
|
69
|
-
"first_page_url": "https://
|
69
|
+
"first_page_url": "https://notify.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
70
70
|
"previous_page_url": null,
|
71
|
-
"url": "https://
|
71
|
+
"url": "https://notify.twilio.com/v1/Credentials?PageSize=1&Page=0",
|
72
72
|
"next_page_url": null,
|
73
73
|
"key": "credentials"
|
74
74
|
}
|
@@ -76,7 +76,7 @@ describe 'Credential' do
|
|
76
76
|
]
|
77
77
|
))
|
78
78
|
|
79
|
-
actual = @client.
|
79
|
+
actual = @client.notify.v1.credentials.list()
|
80
80
|
|
81
81
|
expect(actual).to_not eq(nil)
|
82
82
|
end
|
@@ -85,7 +85,7 @@ describe 'Credential' do
|
|
85
85
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
86
86
|
|
87
87
|
expect {
|
88
|
-
@client.
|
88
|
+
@client.notify.v1.credentials.create(type: "gcm")
|
89
89
|
}.to raise_exception(Twilio::REST::TwilioException)
|
90
90
|
|
91
91
|
values = {
|
@@ -94,7 +94,7 @@ describe 'Credential' do
|
|
94
94
|
expect(
|
95
95
|
@holodeck.has_request?(Holodeck::Request.new(
|
96
96
|
method: 'post',
|
97
|
-
url: 'https://
|
97
|
+
url: 'https://notify.twilio.com/v1/Credentials',
|
98
98
|
data: values,
|
99
99
|
))).to eq(true)
|
100
100
|
end
|
@@ -111,12 +111,12 @@ describe 'Credential' do
|
|
111
111
|
"sandbox": "False",
|
112
112
|
"date_created": "2015-10-07T17:50:01Z",
|
113
113
|
"date_updated": "2015-10-07T17:50:01Z",
|
114
|
-
"url": "https://
|
114
|
+
"url": "https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
115
115
|
}
|
116
116
|
]
|
117
117
|
))
|
118
118
|
|
119
|
-
actual = @client.
|
119
|
+
actual = @client.notify.v1.credentials.create(type: "gcm")
|
120
120
|
|
121
121
|
expect(actual).to_not eq(nil)
|
122
122
|
end
|
@@ -125,14 +125,14 @@ describe 'Credential' do
|
|
125
125
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
126
126
|
|
127
127
|
expect {
|
128
|
-
@client.
|
128
|
+
@client.notify.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
129
129
|
}.to raise_exception(Twilio::REST::TwilioException)
|
130
130
|
|
131
131
|
values = {}
|
132
132
|
expect(
|
133
133
|
@holodeck.has_request?(Holodeck::Request.new(
|
134
134
|
method: 'get',
|
135
|
-
url: 'https://
|
135
|
+
url: 'https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
136
136
|
))).to eq(true)
|
137
137
|
end
|
138
138
|
|
@@ -148,12 +148,12 @@ describe 'Credential' do
|
|
148
148
|
"sandbox": "False",
|
149
149
|
"date_created": "2015-10-07T17:50:01Z",
|
150
150
|
"date_updated": "2015-10-07T17:50:01Z",
|
151
|
-
"url": "https://
|
151
|
+
"url": "https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
152
152
|
}
|
153
153
|
]
|
154
154
|
))
|
155
155
|
|
156
|
-
actual = @client.
|
156
|
+
actual = @client.notify.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
157
157
|
|
158
158
|
expect(actual).to_not eq(nil)
|
159
159
|
end
|
@@ -162,14 +162,14 @@ describe 'Credential' do
|
|
162
162
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
163
163
|
|
164
164
|
expect {
|
165
|
-
@client.
|
165
|
+
@client.notify.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
166
166
|
}.to raise_exception(Twilio::REST::TwilioException)
|
167
167
|
|
168
168
|
values = {}
|
169
169
|
expect(
|
170
170
|
@holodeck.has_request?(Holodeck::Request.new(
|
171
171
|
method: 'post',
|
172
|
-
url: 'https://
|
172
|
+
url: 'https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
173
173
|
))).to eq(true)
|
174
174
|
end
|
175
175
|
|
@@ -185,12 +185,12 @@ describe 'Credential' do
|
|
185
185
|
"sandbox": "False",
|
186
186
|
"date_created": "2015-10-07T17:50:01Z",
|
187
187
|
"date_updated": "2015-10-07T17:50:01Z",
|
188
|
-
"url": "https://
|
188
|
+
"url": "https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
189
189
|
}
|
190
190
|
]
|
191
191
|
))
|
192
192
|
|
193
|
-
actual = @client.
|
193
|
+
actual = @client.notify.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
194
194
|
|
195
195
|
expect(actual).to_not eq(nil)
|
196
196
|
end
|
@@ -199,14 +199,14 @@ describe 'Credential' do
|
|
199
199
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
200
200
|
|
201
201
|
expect {
|
202
|
-
@client.
|
202
|
+
@client.notify.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
203
203
|
}.to raise_exception(Twilio::REST::TwilioException)
|
204
204
|
|
205
205
|
values = {}
|
206
206
|
expect(
|
207
207
|
@holodeck.has_request?(Holodeck::Request.new(
|
208
208
|
method: 'delete',
|
209
|
-
url: 'https://
|
209
|
+
url: 'https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
210
210
|
))).to eq(true)
|
211
211
|
end
|
212
212
|
|
@@ -216,7 +216,7 @@ describe 'Credential' do
|
|
216
216
|
nil,
|
217
217
|
))
|
218
218
|
|
219
|
-
actual = @client.
|
219
|
+
actual = @client.notify.v1.credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
220
220
|
|
221
221
|
expect(actual).to eq(true)
|
222
222
|
end
|
@@ -11,15 +11,15 @@ describe 'Binding' do
|
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
12
|
|
13
13
|
expect {
|
14
|
-
@client.
|
15
|
-
|
14
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
|
+
.bindings("BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
16
|
}.to raise_exception(Twilio::REST::TwilioException)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
20
20
|
@holodeck.has_request?(Holodeck::Request.new(
|
21
21
|
method: 'get',
|
22
|
-
url: 'https://
|
22
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
23
23
|
))).to eq(true)
|
24
24
|
end
|
25
25
|
|
@@ -39,13 +39,13 @@ describe 'Binding' do
|
|
39
39
|
"binding_type": "apn",
|
40
40
|
"address": "1234",
|
41
41
|
"tags": [],
|
42
|
-
"url": "https://
|
42
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
43
43
|
}
|
44
44
|
]
|
45
45
|
))
|
46
46
|
|
47
|
-
actual = @client.
|
48
|
-
|
47
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
48
|
+
.bindings("BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
49
49
|
|
50
50
|
expect(actual).to_not eq(nil)
|
51
51
|
end
|
@@ -54,15 +54,15 @@ describe 'Binding' do
|
|
54
54
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
55
55
|
|
56
56
|
expect {
|
57
|
-
@client.
|
58
|
-
|
57
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
58
|
+
.bindings("BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
59
59
|
}.to raise_exception(Twilio::REST::TwilioException)
|
60
60
|
|
61
61
|
values = {}
|
62
62
|
expect(
|
63
63
|
@holodeck.has_request?(Holodeck::Request.new(
|
64
64
|
method: 'delete',
|
65
|
-
url: 'https://
|
65
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
66
66
|
))).to eq(true)
|
67
67
|
end
|
68
68
|
|
@@ -72,8 +72,8 @@ describe 'Binding' do
|
|
72
72
|
nil,
|
73
73
|
))
|
74
74
|
|
75
|
-
actual = @client.
|
76
|
-
|
75
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
76
|
+
.bindings("BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
77
77
|
|
78
78
|
expect(actual).to eq(true)
|
79
79
|
end
|
@@ -82,8 +82,8 @@ describe 'Binding' do
|
|
82
82
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
83
83
|
|
84
84
|
expect {
|
85
|
-
@client.
|
86
|
-
|
85
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
86
|
+
.bindings.create(endpoint: "endpoint", identity: "identity", binding_type: "apn", address: "address")
|
87
87
|
}.to raise_exception(Twilio::REST::TwilioException)
|
88
88
|
|
89
89
|
values = {
|
@@ -95,7 +95,7 @@ describe 'Binding' do
|
|
95
95
|
expect(
|
96
96
|
@holodeck.has_request?(Holodeck::Request.new(
|
97
97
|
method: 'post',
|
98
|
-
url: 'https://
|
98
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings',
|
99
99
|
data: values,
|
100
100
|
))).to eq(true)
|
101
101
|
end
|
@@ -116,13 +116,13 @@ describe 'Binding' do
|
|
116
116
|
"binding_type": "apn",
|
117
117
|
"address": "1234",
|
118
118
|
"tags": [],
|
119
|
-
"url": "https://
|
119
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
120
120
|
}
|
121
121
|
]
|
122
122
|
))
|
123
123
|
|
124
|
-
actual = @client.
|
125
|
-
|
124
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
125
|
+
.bindings.create(endpoint: "endpoint", identity: "identity", binding_type: "apn", address: "address")
|
126
126
|
|
127
127
|
expect(actual).to_not eq(nil)
|
128
128
|
end
|
@@ -131,15 +131,15 @@ describe 'Binding' do
|
|
131
131
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
132
132
|
|
133
133
|
expect {
|
134
|
-
@client.
|
135
|
-
|
134
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
135
|
+
.bindings.list()
|
136
136
|
}.to raise_exception(Twilio::REST::TwilioException)
|
137
137
|
|
138
138
|
values = {}
|
139
139
|
expect(
|
140
140
|
@holodeck.has_request?(Holodeck::Request.new(
|
141
141
|
method: 'get',
|
142
|
-
url: 'https://
|
142
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings',
|
143
143
|
))).to eq(true)
|
144
144
|
end
|
145
145
|
|
@@ -151,9 +151,9 @@ describe 'Binding' do
|
|
151
151
|
"meta": {
|
152
152
|
"page": 0,
|
153
153
|
"page_size": 1,
|
154
|
-
"first_page_url": "https://
|
154
|
+
"first_page_url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
155
155
|
"previous_page_url": null,
|
156
|
-
"url": "https://
|
156
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
157
157
|
"next_page_url": null,
|
158
158
|
"key": "bindings"
|
159
159
|
},
|
@@ -170,15 +170,15 @@ describe 'Binding' do
|
|
170
170
|
"binding_type": "apn",
|
171
171
|
"address": "1234",
|
172
172
|
"tags": [],
|
173
|
-
"url": "https://
|
173
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
174
174
|
}
|
175
175
|
]
|
176
176
|
}
|
177
177
|
]
|
178
178
|
))
|
179
179
|
|
180
|
-
actual = @client.
|
181
|
-
|
180
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
181
|
+
.bindings.list()
|
182
182
|
|
183
183
|
expect(actual).to_not eq(nil)
|
184
184
|
end
|
@@ -191,9 +191,9 @@ describe 'Binding' do
|
|
191
191
|
"meta": {
|
192
192
|
"page": 0,
|
193
193
|
"page_size": 1,
|
194
|
-
"first_page_url": "https://
|
194
|
+
"first_page_url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
195
195
|
"previous_page_url": null,
|
196
|
-
"url": "https://
|
196
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=1&Page=0",
|
197
197
|
"next_page_url": null,
|
198
198
|
"key": "bindings"
|
199
199
|
},
|
@@ -202,8 +202,8 @@ describe 'Binding' do
|
|
202
202
|
]
|
203
203
|
))
|
204
204
|
|
205
|
-
actual = @client.
|
206
|
-
|
205
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
206
|
+
.bindings.list()
|
207
207
|
|
208
208
|
expect(actual).to_not eq(nil)
|
209
209
|
end
|
@@ -11,15 +11,15 @@ describe 'Notification' do
|
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
12
|
|
13
13
|
expect {
|
14
|
-
@client.
|
15
|
-
|
14
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
|
+
.notifications.create()
|
16
16
|
}.to raise_exception(Twilio::REST::TwilioException)
|
17
17
|
|
18
18
|
values = {}
|
19
19
|
expect(
|
20
20
|
@holodeck.has_request?(Holodeck::Request.new(
|
21
21
|
method: 'post',
|
22
|
-
url: 'https://
|
22
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications',
|
23
23
|
))).to eq(true)
|
24
24
|
end
|
25
25
|
|
@@ -51,8 +51,8 @@ describe 'Notification' do
|
|
51
51
|
]
|
52
52
|
))
|
53
53
|
|
54
|
-
actual = @client.
|
55
|
-
|
54
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
55
|
+
.notifications.create()
|
56
56
|
|
57
57
|
expect(actual).to_not eq(nil)
|
58
58
|
end
|
@@ -11,14 +11,14 @@ describe 'Service' do
|
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
12
|
|
13
13
|
expect {
|
14
|
-
@client.
|
14
|
+
@client.notify.v1.services.create()
|
15
15
|
}.to raise_exception(Twilio::REST::TwilioException)
|
16
16
|
|
17
17
|
values = {}
|
18
18
|
expect(
|
19
19
|
@holodeck.has_request?(Holodeck::Request.new(
|
20
20
|
method: 'post',
|
21
|
-
url: 'https://
|
21
|
+
url: 'https://notify.twilio.com/v1/Services',
|
22
22
|
))).to eq(true)
|
23
23
|
end
|
24
24
|
|
@@ -38,16 +38,16 @@ describe 'Service' do
|
|
38
38
|
"facebook_messenger_page_id": "4",
|
39
39
|
"default_apn_notification_protocol_version": "3",
|
40
40
|
"default_gcm_notification_protocol_version": "3",
|
41
|
-
"url": "https://
|
41
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
42
42
|
"links": {
|
43
|
-
"bindings": "https://
|
44
|
-
"notifications": "https://
|
43
|
+
"bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
|
44
|
+
"notifications": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications"
|
45
45
|
}
|
46
46
|
}
|
47
47
|
]
|
48
48
|
))
|
49
49
|
|
50
|
-
actual = @client.
|
50
|
+
actual = @client.notify.v1.services.create()
|
51
51
|
|
52
52
|
expect(actual).to_not eq(nil)
|
53
53
|
end
|
@@ -56,14 +56,14 @@ describe 'Service' do
|
|
56
56
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
57
57
|
|
58
58
|
expect {
|
59
|
-
@client.
|
59
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
60
60
|
}.to raise_exception(Twilio::REST::TwilioException)
|
61
61
|
|
62
62
|
values = {}
|
63
63
|
expect(
|
64
64
|
@holodeck.has_request?(Holodeck::Request.new(
|
65
65
|
method: 'delete',
|
66
|
-
url: 'https://
|
66
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
67
67
|
))).to eq(true)
|
68
68
|
end
|
69
69
|
|
@@ -73,7 +73,7 @@ describe 'Service' do
|
|
73
73
|
nil,
|
74
74
|
))
|
75
75
|
|
76
|
-
actual = @client.
|
76
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
77
77
|
|
78
78
|
expect(actual).to eq(true)
|
79
79
|
end
|
@@ -82,14 +82,14 @@ describe 'Service' do
|
|
82
82
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
83
83
|
|
84
84
|
expect {
|
85
|
-
@client.
|
85
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
86
86
|
}.to raise_exception(Twilio::REST::TwilioException)
|
87
87
|
|
88
88
|
values = {}
|
89
89
|
expect(
|
90
90
|
@holodeck.has_request?(Holodeck::Request.new(
|
91
91
|
method: 'get',
|
92
|
-
url: 'https://
|
92
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
93
93
|
))).to eq(true)
|
94
94
|
end
|
95
95
|
|
@@ -109,16 +109,16 @@ describe 'Service' do
|
|
109
109
|
"facebook_messenger_page_id": "4",
|
110
110
|
"default_apn_notification_protocol_version": "3",
|
111
111
|
"default_gcm_notification_protocol_version": "3",
|
112
|
-
"url": "https://
|
112
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
113
113
|
"links": {
|
114
|
-
"bindings": "https://
|
115
|
-
"notifications": "https://
|
114
|
+
"bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
|
115
|
+
"notifications": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications"
|
116
116
|
}
|
117
117
|
}
|
118
118
|
]
|
119
119
|
))
|
120
120
|
|
121
|
-
actual = @client.
|
121
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
122
122
|
|
123
123
|
expect(actual).to_not eq(nil)
|
124
124
|
end
|
@@ -127,14 +127,14 @@ describe 'Service' do
|
|
127
127
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
128
128
|
|
129
129
|
expect {
|
130
|
-
@client.
|
130
|
+
@client.notify.v1.services.list()
|
131
131
|
}.to raise_exception(Twilio::REST::TwilioException)
|
132
132
|
|
133
133
|
values = {}
|
134
134
|
expect(
|
135
135
|
@holodeck.has_request?(Holodeck::Request.new(
|
136
136
|
method: 'get',
|
137
|
-
url: 'https://
|
137
|
+
url: 'https://notify.twilio.com/v1/Services',
|
138
138
|
))).to eq(true)
|
139
139
|
end
|
140
140
|
|
@@ -146,9 +146,9 @@ describe 'Service' do
|
|
146
146
|
"meta": {
|
147
147
|
"page": 0,
|
148
148
|
"page_size": 1,
|
149
|
-
"first_page_url": "https://
|
149
|
+
"first_page_url": "https://notify.twilio.com/v1/Services?PageSize=1&Page=0",
|
150
150
|
"previous_page_url": null,
|
151
|
-
"url": "https://
|
151
|
+
"url": "https://notify.twilio.com/v1/Services?PageSize=1&Page=0",
|
152
152
|
"next_page_url": null,
|
153
153
|
"key": "services"
|
154
154
|
},
|
@@ -165,10 +165,10 @@ describe 'Service' do
|
|
165
165
|
"facebook_messenger_page_id": "4",
|
166
166
|
"default_apn_notification_protocol_version": "3",
|
167
167
|
"default_gcm_notification_protocol_version": "3",
|
168
|
-
"url": "https://
|
168
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
169
169
|
"links": {
|
170
|
-
"bindings": "https://
|
171
|
-
"notifications": "https://
|
170
|
+
"bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
|
171
|
+
"notifications": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications"
|
172
172
|
}
|
173
173
|
}
|
174
174
|
]
|
@@ -176,7 +176,7 @@ describe 'Service' do
|
|
176
176
|
]
|
177
177
|
))
|
178
178
|
|
179
|
-
actual = @client.
|
179
|
+
actual = @client.notify.v1.services.list()
|
180
180
|
|
181
181
|
expect(actual).to_not eq(nil)
|
182
182
|
end
|
@@ -189,9 +189,9 @@ describe 'Service' do
|
|
189
189
|
"meta": {
|
190
190
|
"page": 0,
|
191
191
|
"page_size": 50,
|
192
|
-
"first_page_url": "https://
|
192
|
+
"first_page_url": "https://notify.twilio.com/v1/Services?PageSize=50&Page=0",
|
193
193
|
"previous_page_url": null,
|
194
|
-
"url": "https://
|
194
|
+
"url": "https://notify.twilio.com/v1/Services?PageSize=50&Page=0",
|
195
195
|
"next_page_url": null,
|
196
196
|
"key": "services"
|
197
197
|
},
|
@@ -200,7 +200,7 @@ describe 'Service' do
|
|
200
200
|
]
|
201
201
|
))
|
202
202
|
|
203
|
-
actual = @client.
|
203
|
+
actual = @client.notify.v1.services.list()
|
204
204
|
|
205
205
|
expect(actual).to_not eq(nil)
|
206
206
|
end
|
@@ -209,14 +209,14 @@ describe 'Service' do
|
|
209
209
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
210
210
|
|
211
211
|
expect {
|
212
|
-
@client.
|
212
|
+
@client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
213
213
|
}.to raise_exception(Twilio::REST::TwilioException)
|
214
214
|
|
215
215
|
values = {}
|
216
216
|
expect(
|
217
217
|
@holodeck.has_request?(Holodeck::Request.new(
|
218
218
|
method: 'post',
|
219
|
-
url: 'https://
|
219
|
+
url: 'https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
220
220
|
))).to eq(true)
|
221
221
|
end
|
222
222
|
|
@@ -236,16 +236,16 @@ describe 'Service' do
|
|
236
236
|
"default_gcm_notification_protocol_version": "3",
|
237
237
|
"messaging_service_sid": null,
|
238
238
|
"facebook_messenger_page_id": "4",
|
239
|
-
"url": "https://
|
239
|
+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
240
240
|
"links": {
|
241
|
-
"bindings": "https://
|
242
|
-
"notifications": "https://
|
241
|
+
"bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
|
242
|
+
"notifications": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications"
|
243
243
|
}
|
244
244
|
}
|
245
245
|
]
|
246
246
|
))
|
247
247
|
|
248
|
-
actual = @client.
|
248
|
+
actual = @client.notify.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
249
249
|
|
250
250
|
expect(actual).to_not eq(nil)
|
251
251
|
end
|