twilio-ruby 5.5.0 → 5.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +21 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +135 -30
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +28 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +22 -5
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +15 -15
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +14 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +7 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +27 -12
- data/spec/integration/api/v2010/account/call/recording_spec.rb +10 -2
- data/spec/integration/proxy/v1/service/session/interaction_spec.rb +30 -0
- data/spec/integration/proxy/v1/service_spec.rb +7 -6
- data/spec/integration/video/v1/room_spec.rb +4 -0
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaaec1537e9280b3a86d17fda7a991a6c0ff8d01
|
4
|
+
data.tar.gz: e365ee3bac63b9d792907603d85ed0d9627ad30d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c889d445a72c113d5713683e3b6d4ff08fb2d6645f4a641fc14116c6382ae3625725afc52733c05fc314169e5a5324c56c7bc4944a1ae4bdaca3d5761968636
|
7
|
+
data.tar.gz: ec0baa1b0a491546577d4d094472e36ec1aa7932d851e55331f6723514ee72778069f812c543a025b535ad46772a809cda65564d47736d864228c1f15020f261
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2017-12-01] Version 5.5.1
|
5
|
+
---------------------------
|
6
|
+
**Api**
|
7
|
+
- Use the correct properties for Dependent Phone Numbers of an Address *(breaking change)*
|
8
|
+
- Update Call Recordings with the correct properties
|
9
|
+
|
10
|
+
**Preview**
|
11
|
+
- Add `status` and `email` query param filters for AuthorizationDocument list endpoint
|
12
|
+
|
13
|
+
**Proxy**
|
14
|
+
- Added DELETE support to Interaction
|
15
|
+
- Standardized enum values to dash-case
|
16
|
+
- Rename Service#friendly_name to Service#unique_name
|
17
|
+
|
18
|
+
**Video**
|
19
|
+
- Remove beta flag from `media_region` and `video_codecs`
|
20
|
+
|
21
|
+
**Wireless**
|
22
|
+
- Bug fix: Changed `operator_mcc` and `operator_mnc` in `DataSessions` subresource from `integer` to `string`
|
23
|
+
|
24
|
+
|
4
25
|
[2017-11-17] Version 5.5.0
|
5
26
|
---------------------------
|
6
27
|
**Sync**
|
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.5.
|
30
|
+
gem 'twilio-ruby', '~> 5.5.1'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.5.
|
36
|
+
gem install twilio-ruby -v 5.5.1
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -161,20 +161,47 @@ module Twilio
|
|
161
161
|
|
162
162
|
# Marshaled Properties
|
163
163
|
@properties = {
|
164
|
+
'sid' => payload['sid'],
|
165
|
+
'account_sid' => payload['account_sid'],
|
164
166
|
'friendly_name' => payload['friendly_name'],
|
165
167
|
'phone_number' => payload['phone_number'],
|
166
|
-
'
|
167
|
-
'
|
168
|
-
'
|
169
|
-
'
|
170
|
-
'
|
171
|
-
'
|
172
|
-
'
|
168
|
+
'voice_url' => payload['voice_url'],
|
169
|
+
'voice_method' => payload['voice_method'],
|
170
|
+
'voice_fallback_method' => payload['voice_fallback_method'],
|
171
|
+
'voice_fallback_url' => payload['voice_fallback_url'],
|
172
|
+
'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
|
173
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
174
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
175
|
+
'sms_fallback_method' => payload['sms_fallback_method'],
|
176
|
+
'sms_fallback_url' => payload['sms_fallback_url'],
|
177
|
+
'sms_method' => payload['sms_method'],
|
178
|
+
'sms_url' => payload['sms_url'],
|
173
179
|
'address_requirements' => payload['address_requirements'],
|
174
180
|
'capabilities' => payload['capabilities'],
|
181
|
+
'status_callback' => payload['status_callback'],
|
182
|
+
'status_callback_method' => payload['status_callback_method'],
|
183
|
+
'api_version' => payload['api_version'],
|
184
|
+
'sms_application_sid' => payload['sms_application_sid'],
|
185
|
+
'voice_application_sid' => payload['voice_application_sid'],
|
186
|
+
'trunk_sid' => payload['trunk_sid'],
|
187
|
+
'emergency_status' => payload['emergency_status'],
|
188
|
+
'emergency_address_sid' => payload['emergency_address_sid'],
|
189
|
+
'uri' => payload['uri'],
|
175
190
|
}
|
176
191
|
end
|
177
192
|
|
193
|
+
##
|
194
|
+
# @return [String] The sid
|
195
|
+
def sid
|
196
|
+
@properties['sid']
|
197
|
+
end
|
198
|
+
|
199
|
+
##
|
200
|
+
# @return [String] The account_sid
|
201
|
+
def account_sid
|
202
|
+
@properties['account_sid']
|
203
|
+
end
|
204
|
+
|
178
205
|
##
|
179
206
|
# @return [String] The friendly_name
|
180
207
|
def friendly_name
|
@@ -188,59 +215,137 @@ module Twilio
|
|
188
215
|
end
|
189
216
|
|
190
217
|
##
|
191
|
-
# @return [String] The
|
192
|
-
def
|
193
|
-
@properties['
|
218
|
+
# @return [String] The voice_url
|
219
|
+
def voice_url
|
220
|
+
@properties['voice_url']
|
221
|
+
end
|
222
|
+
|
223
|
+
##
|
224
|
+
# @return [String] The voice_method
|
225
|
+
def voice_method
|
226
|
+
@properties['voice_method']
|
227
|
+
end
|
228
|
+
|
229
|
+
##
|
230
|
+
# @return [String] The voice_fallback_method
|
231
|
+
def voice_fallback_method
|
232
|
+
@properties['voice_fallback_method']
|
194
233
|
end
|
195
234
|
|
196
235
|
##
|
197
|
-
# @return [String] The
|
198
|
-
def
|
199
|
-
@properties['
|
236
|
+
# @return [String] The voice_fallback_url
|
237
|
+
def voice_fallback_url
|
238
|
+
@properties['voice_fallback_url']
|
200
239
|
end
|
201
240
|
|
202
241
|
##
|
203
|
-
# @return [
|
204
|
-
def
|
205
|
-
@properties['
|
242
|
+
# @return [Boolean] The voice_caller_id_lookup
|
243
|
+
def voice_caller_id_lookup
|
244
|
+
@properties['voice_caller_id_lookup']
|
206
245
|
end
|
207
246
|
|
208
247
|
##
|
209
|
-
# @return [
|
210
|
-
def
|
211
|
-
@properties['
|
248
|
+
# @return [Time] The date_created
|
249
|
+
def date_created
|
250
|
+
@properties['date_created']
|
212
251
|
end
|
213
252
|
|
214
253
|
##
|
215
|
-
# @return [
|
216
|
-
def
|
217
|
-
@properties['
|
254
|
+
# @return [Time] The date_updated
|
255
|
+
def date_updated
|
256
|
+
@properties['date_updated']
|
218
257
|
end
|
219
258
|
|
220
259
|
##
|
221
|
-
# @return [String] The
|
222
|
-
def
|
223
|
-
@properties['
|
260
|
+
# @return [String] The sms_fallback_method
|
261
|
+
def sms_fallback_method
|
262
|
+
@properties['sms_fallback_method']
|
224
263
|
end
|
225
264
|
|
226
265
|
##
|
227
|
-
# @return [String] The
|
228
|
-
def
|
229
|
-
@properties['
|
266
|
+
# @return [String] The sms_fallback_url
|
267
|
+
def sms_fallback_url
|
268
|
+
@properties['sms_fallback_url']
|
230
269
|
end
|
231
270
|
|
232
271
|
##
|
233
|
-
# @return [String] The
|
272
|
+
# @return [String] The sms_method
|
273
|
+
def sms_method
|
274
|
+
@properties['sms_method']
|
275
|
+
end
|
276
|
+
|
277
|
+
##
|
278
|
+
# @return [String] The sms_url
|
279
|
+
def sms_url
|
280
|
+
@properties['sms_url']
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# @return [dependent_phone_number.AddressRequirement] The address_requirements
|
234
285
|
def address_requirements
|
235
286
|
@properties['address_requirements']
|
236
287
|
end
|
237
288
|
|
238
289
|
##
|
239
|
-
# @return [
|
290
|
+
# @return [Hash] The capabilities
|
240
291
|
def capabilities
|
241
292
|
@properties['capabilities']
|
242
293
|
end
|
243
294
|
|
295
|
+
##
|
296
|
+
# @return [String] The status_callback
|
297
|
+
def status_callback
|
298
|
+
@properties['status_callback']
|
299
|
+
end
|
300
|
+
|
301
|
+
##
|
302
|
+
# @return [String] The status_callback_method
|
303
|
+
def status_callback_method
|
304
|
+
@properties['status_callback_method']
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# @return [String] The api_version
|
309
|
+
def api_version
|
310
|
+
@properties['api_version']
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# @return [String] The sms_application_sid
|
315
|
+
def sms_application_sid
|
316
|
+
@properties['sms_application_sid']
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @return [String] The voice_application_sid
|
321
|
+
def voice_application_sid
|
322
|
+
@properties['voice_application_sid']
|
323
|
+
end
|
324
|
+
|
325
|
+
##
|
326
|
+
# @return [String] The trunk_sid
|
327
|
+
def trunk_sid
|
328
|
+
@properties['trunk_sid']
|
329
|
+
end
|
330
|
+
|
331
|
+
##
|
332
|
+
# @return [dependent_phone_number.EmergencyStatus] The emergency_status
|
333
|
+
def emergency_status
|
334
|
+
@properties['emergency_status']
|
335
|
+
end
|
336
|
+
|
337
|
+
##
|
338
|
+
# @return [String] The emergency_address_sid
|
339
|
+
def emergency_address_sid
|
340
|
+
@properties['emergency_address_sid']
|
341
|
+
end
|
342
|
+
|
343
|
+
##
|
344
|
+
# @return [String] The uri
|
345
|
+
def uri
|
346
|
+
@properties['uri']
|
347
|
+
end
|
348
|
+
|
244
349
|
##
|
245
350
|
# Provide a user friendly representation
|
246
351
|
def to_s
|
@@ -248,6 +248,10 @@ module Twilio
|
|
248
248
|
'uri' => payload['uri'],
|
249
249
|
'encryption_details' => payload['encryption_details'],
|
250
250
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
251
|
+
'status' => payload['status'],
|
252
|
+
'source' => payload['source'],
|
253
|
+
'channels' => payload['channels'].to_i,
|
254
|
+
'price_unit' => payload['price_unit'],
|
251
255
|
}
|
252
256
|
|
253
257
|
# Context
|
@@ -337,6 +341,30 @@ module Twilio
|
|
337
341
|
@properties['error_code']
|
338
342
|
end
|
339
343
|
|
344
|
+
##
|
345
|
+
# @return [recording.Status] The status
|
346
|
+
def status
|
347
|
+
@properties['status']
|
348
|
+
end
|
349
|
+
|
350
|
+
##
|
351
|
+
# @return [recording.Source] The source
|
352
|
+
def source
|
353
|
+
@properties['source']
|
354
|
+
end
|
355
|
+
|
356
|
+
##
|
357
|
+
# @return [String] The channels
|
358
|
+
def channels
|
359
|
+
@properties['channels']
|
360
|
+
end
|
361
|
+
|
362
|
+
##
|
363
|
+
# @return [String] The price_unit
|
364
|
+
def price_unit
|
365
|
+
@properties['price_unit']
|
366
|
+
end
|
367
|
+
|
340
368
|
##
|
341
369
|
# Fetch a RecordingInstance
|
342
370
|
# @return [RecordingInstance] Fetched RecordingInstance
|
@@ -27,6 +27,11 @@ module Twilio
|
|
27
27
|
# Lists AuthorizationDocumentInstance records from the API as a list.
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
29
|
# memory before returning.
|
30
|
+
# @param [String] email Email that this AuthorizationDocument will be sent to for
|
31
|
+
# signing.
|
32
|
+
# @param [authorization_document.Status] status The Status of this
|
33
|
+
# AuthorizationDocument. One of `opened`, `signing`, `signed`, `canceled`, or
|
34
|
+
# `failed`.
|
30
35
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
31
36
|
# guarantees to never return more than limit. Default is no limit
|
32
37
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -34,14 +39,19 @@ module Twilio
|
|
34
39
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
35
40
|
# efficient page size, i.e. min(limit, 1000)
|
36
41
|
# @return [Array] Array of up to limit results
|
37
|
-
def list(limit: nil, page_size: nil)
|
38
|
-
self.stream(limit: limit, page_size: page_size).entries
|
42
|
+
def list(email: :unset, status: :unset, limit: nil, page_size: nil)
|
43
|
+
self.stream(email: email, status: status, limit: limit, page_size: page_size).entries
|
39
44
|
end
|
40
45
|
|
41
46
|
##
|
42
47
|
# Streams AuthorizationDocumentInstance records from the API as an Enumerable.
|
43
48
|
# This operation lazily loads records as efficiently as possible until the limit
|
44
49
|
# is reached.
|
50
|
+
# @param [String] email Email that this AuthorizationDocument will be sent to for
|
51
|
+
# signing.
|
52
|
+
# @param [authorization_document.Status] status The Status of this
|
53
|
+
# AuthorizationDocument. One of `opened`, `signing`, `signed`, `canceled`, or
|
54
|
+
# `failed`.
|
45
55
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
46
56
|
# guarantees to never return more than limit. Default is no limit.
|
47
57
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -49,10 +59,10 @@ module Twilio
|
|
49
59
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
50
60
|
# efficient page size, i.e. min(limit, 1000)
|
51
61
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
52
|
-
def stream(limit: nil, page_size: nil)
|
62
|
+
def stream(email: :unset, status: :unset, limit: nil, page_size: nil)
|
53
63
|
limits = @version.read_limits(limit, page_size)
|
54
64
|
|
55
|
-
page = self.page(page_size: limits[:page_size])
|
65
|
+
page = self.page(email: email, status: status, page_size: limits[:page_size])
|
56
66
|
|
57
67
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
58
68
|
end
|
@@ -74,12 +84,19 @@ module Twilio
|
|
74
84
|
##
|
75
85
|
# Retrieve a single page of AuthorizationDocumentInstance records from the API.
|
76
86
|
# Request is executed immediately.
|
87
|
+
# @param [String] email Email that this AuthorizationDocument will be sent to for
|
88
|
+
# signing.
|
89
|
+
# @param [authorization_document.Status] status The Status of this
|
90
|
+
# AuthorizationDocument. One of `opened`, `signing`, `signed`, `canceled`, or
|
91
|
+
# `failed`.
|
77
92
|
# @param [String] page_token PageToken provided by the API
|
78
93
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
79
94
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
80
95
|
# @return [Page] Page of AuthorizationDocumentInstance
|
81
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
96
|
+
def page(email: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
82
97
|
params = Twilio::Values.of({
|
98
|
+
'Email' => email,
|
99
|
+
'Status' => status,
|
83
100
|
'PageToken' => page_token,
|
84
101
|
'Page' => page_number,
|
85
102
|
'PageSize' => page_size,
|
@@ -108,8 +108,8 @@ module Twilio
|
|
108
108
|
##
|
109
109
|
# Retrieve a single page of ServiceInstance records from the API.
|
110
110
|
# Request is executed immediately.
|
111
|
-
# @param [String]
|
112
|
-
# to 64 characters.
|
111
|
+
# @param [String] unique_name The human-readable string that uniquely identifies
|
112
|
+
# this Service, up to 64 characters.
|
113
113
|
# @param [String] default_ttl The default Time to Live for a Session, in seconds.
|
114
114
|
# @param [String] callback_url The URL Twilio will send callbacks to.
|
115
115
|
# @param [service.GeoMatchLevel] geo_match_level Whether to find proxy numbers in
|
@@ -121,9 +121,9 @@ module Twilio
|
|
121
121
|
# @param [String] out_of_session_callback_url A URL for Twilio call when a new
|
122
122
|
# Interaction has no Session.
|
123
123
|
# @return [ServiceInstance] Newly created ServiceInstance
|
124
|
-
def create(
|
124
|
+
def create(unique_name: nil, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset)
|
125
125
|
data = Twilio::Values.of({
|
126
|
-
'
|
126
|
+
'UniqueName' => unique_name,
|
127
127
|
'DefaultTtl' => default_ttl,
|
128
128
|
'CallbackUrl' => callback_url,
|
129
129
|
'GeoMatchLevel' => geo_match_level,
|
@@ -224,8 +224,8 @@ module Twilio
|
|
224
224
|
|
225
225
|
##
|
226
226
|
# Update the ServiceInstance
|
227
|
-
# @param [String]
|
228
|
-
#
|
227
|
+
# @param [String] unique_name A human readable description of this resource, up to
|
228
|
+
# 64 characters.
|
229
229
|
# @param [String] default_ttl The default Time to Live for a Session, in seconds.
|
230
230
|
# @param [String] callback_url The URL Twilio will send callbacks to.
|
231
231
|
# @param [service.GeoMatchLevel] geo_match_level Whether to find proxy numbers in
|
@@ -237,9 +237,9 @@ module Twilio
|
|
237
237
|
# @param [String] out_of_session_callback_url A URL for Twilio call when a new
|
238
238
|
# Interaction has no Session.
|
239
239
|
# @return [ServiceInstance] Updated ServiceInstance
|
240
|
-
def update(
|
240
|
+
def update(unique_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset)
|
241
241
|
data = Twilio::Values.of({
|
242
|
-
'
|
242
|
+
'UniqueName' => unique_name,
|
243
243
|
'DefaultTtl' => default_ttl,
|
244
244
|
'CallbackUrl' => callback_url,
|
245
245
|
'GeoMatchLevel' => geo_match_level,
|
@@ -334,7 +334,7 @@ module Twilio
|
|
334
334
|
# Marshaled Properties
|
335
335
|
@properties = {
|
336
336
|
'sid' => payload['sid'],
|
337
|
-
'
|
337
|
+
'unique_name' => payload['unique_name'],
|
338
338
|
'account_sid' => payload['account_sid'],
|
339
339
|
'callback_url' => payload['callback_url'],
|
340
340
|
'default_ttl' => payload['default_ttl'].to_i,
|
@@ -372,8 +372,8 @@ module Twilio
|
|
372
372
|
|
373
373
|
##
|
374
374
|
# @return [String] A human readable description of this resource.
|
375
|
-
def
|
376
|
-
@properties['
|
375
|
+
def unique_name
|
376
|
+
@properties['unique_name']
|
377
377
|
end
|
378
378
|
|
379
379
|
##
|
@@ -458,8 +458,8 @@ module Twilio
|
|
458
458
|
|
459
459
|
##
|
460
460
|
# Update the ServiceInstance
|
461
|
-
# @param [String]
|
462
|
-
#
|
461
|
+
# @param [String] unique_name A human readable description of this resource, up to
|
462
|
+
# 64 characters.
|
463
463
|
# @param [String] default_ttl The default Time to Live for a Session, in seconds.
|
464
464
|
# @param [String] callback_url The URL Twilio will send callbacks to.
|
465
465
|
# @param [service.GeoMatchLevel] geo_match_level Whether to find proxy numbers in
|
@@ -471,9 +471,9 @@ module Twilio
|
|
471
471
|
# @param [String] out_of_session_callback_url A URL for Twilio call when a new
|
472
472
|
# Interaction has no Session.
|
473
473
|
# @return [ServiceInstance] Updated ServiceInstance
|
474
|
-
def update(
|
474
|
+
def update(unique_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset)
|
475
475
|
context.update(
|
476
|
-
|
476
|
+
unique_name: unique_name,
|
477
477
|
default_ttl: default_ttl,
|
478
478
|
callback_url: callback_url,
|
479
479
|
geo_match_level: geo_match_level,
|
@@ -233,6 +233,13 @@ module Twilio
|
|
233
233
|
)
|
234
234
|
end
|
235
235
|
|
236
|
+
##
|
237
|
+
# Deletes the InteractionInstance
|
238
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
239
|
+
def delete
|
240
|
+
@version.delete('delete', @uri)
|
241
|
+
end
|
242
|
+
|
236
243
|
##
|
237
244
|
# Provide a user friendly representation
|
238
245
|
def to_s
|
@@ -425,6 +432,13 @@ module Twilio
|
|
425
432
|
context.fetch
|
426
433
|
end
|
427
434
|
|
435
|
+
##
|
436
|
+
# Deletes the InteractionInstance
|
437
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
438
|
+
def delete
|
439
|
+
context.delete
|
440
|
+
end
|
441
|
+
|
428
442
|
##
|
429
443
|
# Provide a user friendly representation
|
430
444
|
def to_s
|
@@ -324,6 +324,7 @@ module Twilio
|
|
324
324
|
'max_participants' => payload['max_participants'].to_i,
|
325
325
|
'record_participants_on_connect' => payload['record_participants_on_connect'],
|
326
326
|
'video_codecs' => payload['video_codecs'],
|
327
|
+
'media_region' => payload['media_region'],
|
327
328
|
'url' => payload['url'],
|
328
329
|
'links' => payload['links'],
|
329
330
|
}
|
@@ -434,6 +435,12 @@ module Twilio
|
|
434
435
|
@properties['video_codecs']
|
435
436
|
end
|
436
437
|
|
438
|
+
##
|
439
|
+
# @return [String] The media_region
|
440
|
+
def media_region
|
441
|
+
@properties['media_region']
|
442
|
+
end
|
443
|
+
|
437
444
|
##
|
438
445
|
# @return [String] The url
|
439
446
|
def url
|
@@ -171,8 +171,8 @@ module Twilio
|
|
171
171
|
'sim_sid' => payload['sim_sid'],
|
172
172
|
'account_sid' => payload['account_sid'],
|
173
173
|
'radio_link' => payload['radio_link'],
|
174
|
-
'operator_mcc' => payload['operator_mcc']
|
175
|
-
'operator_mnc' => payload['operator_mnc']
|
174
|
+
'operator_mcc' => payload['operator_mcc'],
|
175
|
+
'operator_mnc' => payload['operator_mnc'],
|
176
176
|
'operator_country' => payload['operator_country'],
|
177
177
|
'operator_name' => payload['operator_name'],
|
178
178
|
'cell_id' => payload['cell_id'],
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -31,21 +31,36 @@ describe 'DependentPhoneNumber' do
|
|
31
31
|
{
|
32
32
|
"dependent_phone_numbers": [
|
33
33
|
{
|
34
|
+
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
|
+
"friendly_name": "3197004499318",
|
37
|
+
"phone_number": "+3197004499318",
|
38
|
+
"voice_url": null,
|
39
|
+
"voice_method": "POST",
|
40
|
+
"voice_fallback_url": null,
|
41
|
+
"voice_fallback_method": "POST",
|
42
|
+
"voice_caller_id_lookup": false,
|
43
|
+
"date_created": "Thu, 23 Feb 2017 10:26:31 -0800",
|
44
|
+
"date_updated": "Thu, 23 Feb 2017 10:26:31 -0800",
|
45
|
+
"sms_url": "",
|
46
|
+
"sms_method": "POST",
|
47
|
+
"sms_fallback_url": "",
|
48
|
+
"sms_fallback_method": "POST",
|
34
49
|
"address_requirements": "any",
|
35
50
|
"capabilities": {
|
36
|
-
"
|
37
|
-
"SMS":
|
38
|
-
"
|
51
|
+
"Voice": false,
|
52
|
+
"SMS": true,
|
53
|
+
"MMS": false
|
39
54
|
},
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
55
|
+
"status_callback": "",
|
56
|
+
"status_callback_method": "POST",
|
57
|
+
"api_version": "2010-04-01",
|
58
|
+
"voice_application_sid": null,
|
59
|
+
"sms_application_sid": "",
|
60
|
+
"trunk_sid": null,
|
61
|
+
"emergency_status": "Inactive",
|
62
|
+
"emergency_address_sid": null,
|
63
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
49
64
|
}
|
50
65
|
],
|
51
66
|
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DependentPhoneNumbers.json?Page=0&PageSize=50",
|
@@ -35,8 +35,12 @@ describe 'Recording' do
|
|
35
35
|
"date_created": "Mon, 22 Aug 2011 20:58:45 +0000",
|
36
36
|
"date_updated": "Mon, 22 Aug 2011 20:58:45 +0000",
|
37
37
|
"duration": "6",
|
38
|
-
"price": null,
|
39
38
|
"sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
39
|
+
"price": "0.04",
|
40
|
+
"price_unit": "USD",
|
41
|
+
"status": "completed",
|
42
|
+
"channels": 1,
|
43
|
+
"source": "Trunking",
|
40
44
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
41
45
|
"encryption_details": {
|
42
46
|
"encryption_public_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -123,8 +127,12 @@ describe 'Recording' do
|
|
123
127
|
"date_created": "Mon, 22 Aug 2011 20:58:45 +0000",
|
124
128
|
"date_updated": "Mon, 22 Aug 2011 20:58:45 +0000",
|
125
129
|
"duration": "6",
|
126
|
-
"price": null,
|
127
130
|
"sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
131
|
+
"price": "0.04",
|
132
|
+
"price_unit": "USD",
|
133
|
+
"status": "completed",
|
134
|
+
"channels": 1,
|
135
|
+
"source": "Trunking",
|
128
136
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
129
137
|
"encryption_details": {
|
130
138
|
"encryption_public_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -101,4 +101,34 @@ describe 'Interaction' do
|
|
101
101
|
|
102
102
|
expect(actual).to_not eq(nil)
|
103
103
|
end
|
104
|
+
|
105
|
+
it "can delete" do
|
106
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
107
|
+
|
108
|
+
expect {
|
109
|
+
@client.proxy.v1.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
110
|
+
.sessions("KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
111
|
+
.interactions("KIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
112
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
113
|
+
|
114
|
+
values = {}
|
115
|
+
expect(
|
116
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
117
|
+
method: 'delete',
|
118
|
+
url: 'https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Interactions/KIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
119
|
+
))).to eq(true)
|
120
|
+
end
|
121
|
+
|
122
|
+
it "receives delete responses" do
|
123
|
+
@holodeck.mock(Twilio::Response.new(
|
124
|
+
204,
|
125
|
+
nil,
|
126
|
+
))
|
127
|
+
|
128
|
+
actual = @client.proxy.v1.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
129
|
+
.sessions("KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
130
|
+
.interactions("KIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
131
|
+
|
132
|
+
expect(actual).to eq(true)
|
133
|
+
end
|
104
134
|
end
|
@@ -29,7 +29,7 @@ describe 'Service' do
|
|
29
29
|
{
|
30
30
|
"sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
31
31
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
32
|
-
"
|
32
|
+
"unique_name": "unique_name",
|
33
33
|
"default_ttl": 3600,
|
34
34
|
"callback_url": "http://www.example.com",
|
35
35
|
"geo_match_level": "country",
|
@@ -96,14 +96,15 @@ describe 'Service' do
|
|
96
96
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
97
97
|
|
98
98
|
expect {
|
99
|
-
@client.proxy.v1.services.create()
|
99
|
+
@client.proxy.v1.services.create(unique_name: "unique_name")
|
100
100
|
}.to raise_exception(Twilio::REST::TwilioError)
|
101
101
|
|
102
|
-
values = {}
|
102
|
+
values = {'UniqueName' => "unique_name"}
|
103
103
|
expect(
|
104
104
|
@holodeck.has_request?(Holodeck::Request.new(
|
105
105
|
method: 'post',
|
106
106
|
url: 'https://proxy.twilio.com/v1/Services',
|
107
|
+
data: values,
|
107
108
|
))).to eq(true)
|
108
109
|
end
|
109
110
|
|
@@ -114,7 +115,7 @@ describe 'Service' do
|
|
114
115
|
{
|
115
116
|
"sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
116
117
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
117
|
-
"
|
118
|
+
"unique_name": "unique_name",
|
118
119
|
"default_ttl": 3600,
|
119
120
|
"callback_url": "http://www.example.com",
|
120
121
|
"geo_match_level": "country",
|
@@ -133,7 +134,7 @@ describe 'Service' do
|
|
133
134
|
]
|
134
135
|
))
|
135
136
|
|
136
|
-
actual = @client.proxy.v1.services.create()
|
137
|
+
actual = @client.proxy.v1.services.create(unique_name: "unique_name")
|
137
138
|
|
138
139
|
expect(actual).to_not eq(nil)
|
139
140
|
end
|
@@ -186,7 +187,7 @@ describe 'Service' do
|
|
186
187
|
{
|
187
188
|
"sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
188
189
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
189
|
-
"
|
190
|
+
"unique_name": "unique_name",
|
190
191
|
"default_ttl": 3600,
|
191
192
|
"callback_url": "http://www.example.com",
|
192
193
|
"geo_match_level": "country",
|
@@ -43,6 +43,7 @@ describe 'Room' do
|
|
43
43
|
"video_codecs": [
|
44
44
|
"VP8"
|
45
45
|
],
|
46
|
+
"media_region": "us1",
|
46
47
|
"end_time": "2015-07-30T20:00:00Z",
|
47
48
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
48
49
|
"links": {
|
@@ -94,6 +95,7 @@ describe 'Room' do
|
|
94
95
|
"video_codecs": [
|
95
96
|
"VP8"
|
96
97
|
],
|
98
|
+
"media_region": "us1",
|
97
99
|
"end_time": "2015-07-30T20:00:00Z",
|
98
100
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
99
101
|
"links": {
|
@@ -172,6 +174,7 @@ describe 'Room' do
|
|
172
174
|
"video_codecs": [
|
173
175
|
"VP8"
|
174
176
|
],
|
177
|
+
"media_region": "us1",
|
175
178
|
"url": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c",
|
176
179
|
"links": {
|
177
180
|
"participants": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c/Participants",
|
@@ -233,6 +236,7 @@ describe 'Room' do
|
|
233
236
|
"video_codecs": [
|
234
237
|
"VP8"
|
235
238
|
],
|
239
|
+
"media_region": "us1",
|
236
240
|
"end_time": "2015-07-30T20:00:00Z",
|
237
241
|
"duration": 10,
|
238
242
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -34,8 +34,8 @@ describe 'DataSession' do
|
|
34
34
|
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
35
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
36
|
"radio_link": "LTE",
|
37
|
-
"operator_mcc":
|
38
|
-
"operator_mnc":
|
37
|
+
"operator_mcc": "",
|
38
|
+
"operator_mnc": "",
|
39
39
|
"operator_country": "",
|
40
40
|
"operator_name": "",
|
41
41
|
"cell_id": "",
|
@@ -51,8 +51,8 @@ describe 'DataSession' do
|
|
51
51
|
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
52
52
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
53
53
|
"radio_link": "3G",
|
54
|
-
"operator_mcc":
|
55
|
-
"operator_mnc":
|
54
|
+
"operator_mcc": "",
|
55
|
+
"operator_mnc": "",
|
56
56
|
"operator_country": "",
|
57
57
|
"operator_name": "",
|
58
58
|
"cell_id": "",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|