twilio-ruby 5.10.2 → 5.10.3
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 +14 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +33 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +43 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +33 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +43 -19
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +4 -3
- data/lib/twilio-ruby/rest/video/v1/composition.rb +28 -18
- data/lib/twilio-ruby/twiml/twiml.rb +17 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/lookups/v1/phone_number_spec.rb +9 -0
- data/spec/twiml/messaging_response_spec.rb +6 -0
- data/spec/twiml/voice_response_spec.rb +6 -0
- data/twilio-ruby.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b37be8aeab93417e7fe86ce12826f450a22f333
|
4
|
+
data.tar.gz: 9e77d51ce0e0d7825dbad1fed1a88810abff0a18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 882f6fa1a1b4220bbd2b14783ec0832114ca4322e6c37ab687f27f435f9c4ee49f70004be406a35115e9958b12eb0618b6940ee9f4f125a2d0bd749eaaa013c1
|
7
|
+
data.tar.gz: 3ceb3919d9890622266da701edc5aa13531021516a40d28f317f6b21c7f01b197bf33f4160a6ff3b66de281018d9042fbfa8e49ab6ebff481643613df06b5fd2
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-06-04] Version 5.10.3
|
5
|
+
----------------------------
|
6
|
+
**Library**
|
7
|
+
- PR #409: Switch to single quotes for rubocop. Thanks to @cjcodes!
|
8
|
+
- PR #407: Allows developers to add comments to TwiML. Thanks to @philnash!
|
9
|
+
- PR #405: Update description. Thanks to @efossier!
|
10
|
+
|
11
|
+
**Chat**
|
12
|
+
- Add Binding and UserBinding documentation
|
13
|
+
|
14
|
+
**Lookups**
|
15
|
+
- Add back support for `fraud` lookup type
|
16
|
+
|
17
|
+
|
4
18
|
[2018-05-25] Version 5.10.2
|
5
19
|
----------------------------
|
6
20
|
**Studio**
|
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.10.
|
30
|
+
gem 'twilio-ruby', '~> 5.10.3'
|
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.10.
|
36
|
+
gem install twilio-ruby -v 5.10.3
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -15,7 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the BindingList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] service_sid The
|
18
|
+
# @param [String] service_sid The unique id of the
|
19
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
20
|
+
# belongs to.
|
19
21
|
# @return [BindingList] BindingList
|
20
22
|
def initialize(version, service_sid: nil)
|
21
23
|
super(version)
|
@@ -29,7 +31,11 @@ module Twilio
|
|
29
31
|
# Lists BindingInstance records from the API as a list.
|
30
32
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
33
|
# memory before returning.
|
32
|
-
# @param [binding.BindingType] binding_type The
|
34
|
+
# @param [binding.BindingType] binding_type The push technology used for the
|
35
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
36
|
+
# notification
|
37
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
38
|
+
# for more information.
|
33
39
|
# @param [String] identity The identity
|
34
40
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
35
41
|
# guarantees to never return more than limit. Default is no limit
|
@@ -51,7 +57,11 @@ module Twilio
|
|
51
57
|
# Streams BindingInstance records from the API as an Enumerable.
|
52
58
|
# This operation lazily loads records as efficiently as possible until the limit
|
53
59
|
# is reached.
|
54
|
-
# @param [binding.BindingType] binding_type The
|
60
|
+
# @param [binding.BindingType] binding_type The push technology used for the
|
61
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
62
|
+
# notification
|
63
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
64
|
+
# for more information.
|
55
65
|
# @param [String] identity The identity
|
56
66
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
67
|
# guarantees to never return more than limit. Default is no limit.
|
@@ -85,7 +95,11 @@ module Twilio
|
|
85
95
|
##
|
86
96
|
# Retrieve a single page of BindingInstance records from the API.
|
87
97
|
# Request is executed immediately.
|
88
|
-
# @param [binding.BindingType] binding_type The
|
98
|
+
# @param [binding.BindingType] binding_type The push technology used for the
|
99
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
100
|
+
# notification
|
101
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
102
|
+
# for more information.
|
89
103
|
# @param [String] identity The identity
|
90
104
|
# @param [String] page_token PageToken provided by the API
|
91
105
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
@@ -206,7 +220,9 @@ module Twilio
|
|
206
220
|
# Initialize the BindingInstance
|
207
221
|
# @param [Version] version Version that contains the resource
|
208
222
|
# @param [Hash] payload payload that contains response from Twilio
|
209
|
-
# @param [String] service_sid The
|
223
|
+
# @param [String] service_sid The unique id of the
|
224
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
225
|
+
# belongs to.
|
210
226
|
# @param [String] sid The sid
|
211
227
|
# @return [BindingInstance] BindingInstance
|
212
228
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
@@ -245,73 +261,73 @@ module Twilio
|
|
245
261
|
end
|
246
262
|
|
247
263
|
##
|
248
|
-
# @return [String]
|
264
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
249
265
|
def sid
|
250
266
|
@properties['sid']
|
251
267
|
end
|
252
268
|
|
253
269
|
##
|
254
|
-
# @return [String] The
|
270
|
+
# @return [String] The unique id of the Account responsible for this binding.
|
255
271
|
def account_sid
|
256
272
|
@properties['account_sid']
|
257
273
|
end
|
258
274
|
|
259
275
|
##
|
260
|
-
# @return [String] The
|
276
|
+
# @return [String] The unique id of the Service this binding belongs to.
|
261
277
|
def service_sid
|
262
278
|
@properties['service_sid']
|
263
279
|
end
|
264
280
|
|
265
281
|
##
|
266
|
-
# @return [Time] The
|
282
|
+
# @return [Time] The date that this resource was created.
|
267
283
|
def date_created
|
268
284
|
@properties['date_created']
|
269
285
|
end
|
270
286
|
|
271
287
|
##
|
272
|
-
# @return [Time] The
|
288
|
+
# @return [Time] The date that this resource was last updated.
|
273
289
|
def date_updated
|
274
290
|
@properties['date_updated']
|
275
291
|
end
|
276
292
|
|
277
293
|
##
|
278
|
-
# @return [String] The endpoint
|
294
|
+
# @return [String] The unique endpoint identifier for this Binding.
|
279
295
|
def endpoint
|
280
296
|
@properties['endpoint']
|
281
297
|
end
|
282
298
|
|
283
299
|
##
|
284
|
-
# @return [String]
|
300
|
+
# @return [String] A unique string identifier for the Binding for this User in this Service.
|
285
301
|
def identity
|
286
302
|
@properties['identity']
|
287
303
|
end
|
288
304
|
|
289
305
|
##
|
290
|
-
# @return [String] The
|
306
|
+
# @return [String] The unique id of the Credential for this binding.
|
291
307
|
def credential_sid
|
292
308
|
@properties['credential_sid']
|
293
309
|
end
|
294
310
|
|
295
311
|
##
|
296
|
-
# @return [binding.BindingType] The
|
312
|
+
# @return [binding.BindingType] The push technology to use for this binding.
|
297
313
|
def binding_type
|
298
314
|
@properties['binding_type']
|
299
315
|
end
|
300
316
|
|
301
317
|
##
|
302
|
-
# @return [String]
|
318
|
+
# @return [String] List of message types for this binding.
|
303
319
|
def message_types
|
304
320
|
@properties['message_types']
|
305
321
|
end
|
306
322
|
|
307
323
|
##
|
308
|
-
# @return [String]
|
324
|
+
# @return [String] An absolute URL for this binding.
|
309
325
|
def url
|
310
326
|
@properties['url']
|
311
327
|
end
|
312
328
|
|
313
329
|
##
|
314
|
-
# @return [String]
|
330
|
+
# @return [String] Absolute URLs to access the Users for this Binding.
|
315
331
|
def links
|
316
332
|
@properties['links']
|
317
333
|
end
|
@@ -16,8 +16,14 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the UserBindingList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] service_sid The
|
20
|
-
#
|
19
|
+
# @param [String] service_sid The unique id of the
|
20
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
21
|
+
# belongs to.
|
22
|
+
# @param [String] user_sid The unique id of the
|
23
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) for this binding. See
|
24
|
+
# [push notification
|
25
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
26
|
+
# for more information.
|
21
27
|
# @return [UserBindingList] UserBindingList
|
22
28
|
def initialize(version, service_sid: nil, user_sid: nil)
|
23
29
|
super(version)
|
@@ -31,7 +37,11 @@ module Twilio
|
|
31
37
|
# Lists UserBindingInstance records from the API as a list.
|
32
38
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
39
|
# memory before returning.
|
34
|
-
# @param [user_binding.BindingType] binding_type The
|
40
|
+
# @param [user_binding.BindingType] binding_type The push technology used for the
|
41
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
42
|
+
# notification
|
43
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
44
|
+
# for more information.
|
35
45
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
36
46
|
# guarantees to never return more than limit. Default is no limit
|
37
47
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -47,7 +57,11 @@ module Twilio
|
|
47
57
|
# Streams UserBindingInstance records from the API as an Enumerable.
|
48
58
|
# This operation lazily loads records as efficiently as possible until the limit
|
49
59
|
# is reached.
|
50
|
-
# @param [user_binding.BindingType] binding_type The
|
60
|
+
# @param [user_binding.BindingType] binding_type The push technology used for the
|
61
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
62
|
+
# notification
|
63
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
64
|
+
# for more information.
|
51
65
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
52
66
|
# guarantees to never return more than limit. Default is no limit.
|
53
67
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -80,7 +94,11 @@ module Twilio
|
|
80
94
|
##
|
81
95
|
# Retrieve a single page of UserBindingInstance records from the API.
|
82
96
|
# Request is executed immediately.
|
83
|
-
# @param [user_binding.BindingType] binding_type The
|
97
|
+
# @param [user_binding.BindingType] binding_type The push technology used for the
|
98
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
99
|
+
# notification
|
100
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
101
|
+
# for more information.
|
84
102
|
# @param [String] page_token PageToken provided by the API
|
85
103
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
86
104
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -211,8 +229,14 @@ module Twilio
|
|
211
229
|
# Initialize the UserBindingInstance
|
212
230
|
# @param [Version] version Version that contains the resource
|
213
231
|
# @param [Hash] payload payload that contains response from Twilio
|
214
|
-
# @param [String] service_sid The
|
215
|
-
#
|
232
|
+
# @param [String] service_sid The unique id of the
|
233
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
234
|
+
# belongs to.
|
235
|
+
# @param [String] user_sid The unique id of the
|
236
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) for this binding. See
|
237
|
+
# [push notification
|
238
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
239
|
+
# for more information.
|
216
240
|
# @param [String] sid The sid
|
217
241
|
# @return [UserBindingInstance] UserBindingInstance
|
218
242
|
def initialize(version, payload, service_sid: nil, user_sid: nil, sid: nil)
|
@@ -256,73 +280,73 @@ module Twilio
|
|
256
280
|
end
|
257
281
|
|
258
282
|
##
|
259
|
-
# @return [String]
|
283
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
260
284
|
def sid
|
261
285
|
@properties['sid']
|
262
286
|
end
|
263
287
|
|
264
288
|
##
|
265
|
-
# @return [String] The
|
289
|
+
# @return [String] The unique id of the Account responsible for this binding.
|
266
290
|
def account_sid
|
267
291
|
@properties['account_sid']
|
268
292
|
end
|
269
293
|
|
270
294
|
##
|
271
|
-
# @return [String] The
|
295
|
+
# @return [String] The unique id of the Service this binding belongs to.
|
272
296
|
def service_sid
|
273
297
|
@properties['service_sid']
|
274
298
|
end
|
275
299
|
|
276
300
|
##
|
277
|
-
# @return [Time] The
|
301
|
+
# @return [Time] The date that this resource was created.
|
278
302
|
def date_created
|
279
303
|
@properties['date_created']
|
280
304
|
end
|
281
305
|
|
282
306
|
##
|
283
|
-
# @return [Time] The
|
307
|
+
# @return [Time] The date that this resource was last updated.
|
284
308
|
def date_updated
|
285
309
|
@properties['date_updated']
|
286
310
|
end
|
287
311
|
|
288
312
|
##
|
289
|
-
# @return [String] The endpoint
|
313
|
+
# @return [String] The unique endpoint identifier for this Binding.
|
290
314
|
def endpoint
|
291
315
|
@properties['endpoint']
|
292
316
|
end
|
293
317
|
|
294
318
|
##
|
295
|
-
# @return [String]
|
319
|
+
# @return [String] A unique string identifier for the Binding for this User in this Service.
|
296
320
|
def identity
|
297
321
|
@properties['identity']
|
298
322
|
end
|
299
323
|
|
300
324
|
##
|
301
|
-
# @return [String] The
|
325
|
+
# @return [String] The unique id of the User for this binding.
|
302
326
|
def user_sid
|
303
327
|
@properties['user_sid']
|
304
328
|
end
|
305
329
|
|
306
330
|
##
|
307
|
-
# @return [String] The
|
331
|
+
# @return [String] The unique id of the Credential for this binding.
|
308
332
|
def credential_sid
|
309
333
|
@properties['credential_sid']
|
310
334
|
end
|
311
335
|
|
312
336
|
##
|
313
|
-
# @return [user_binding.BindingType] The
|
337
|
+
# @return [user_binding.BindingType] The push technology to use for this binding.
|
314
338
|
def binding_type
|
315
339
|
@properties['binding_type']
|
316
340
|
end
|
317
341
|
|
318
342
|
##
|
319
|
-
# @return [String]
|
343
|
+
# @return [String] List of message types for this binding.
|
320
344
|
def message_types
|
321
345
|
@properties['message_types']
|
322
346
|
end
|
323
347
|
|
324
348
|
##
|
325
|
-
# @return [String]
|
349
|
+
# @return [String] An absolute URL for this binding.
|
326
350
|
def url
|
327
351
|
@properties['url']
|
328
352
|
end
|
@@ -15,7 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the BindingList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] service_sid The
|
18
|
+
# @param [String] service_sid The unique id of the
|
19
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
20
|
+
# belongs to.
|
19
21
|
# @return [BindingList] BindingList
|
20
22
|
def initialize(version, service_sid: nil)
|
21
23
|
super(version)
|
@@ -29,7 +31,11 @@ module Twilio
|
|
29
31
|
# Lists BindingInstance records from the API as a list.
|
30
32
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
33
|
# memory before returning.
|
32
|
-
# @param [binding.BindingType] binding_type The
|
34
|
+
# @param [binding.BindingType] binding_type The push technology used for the
|
35
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
36
|
+
# notification
|
37
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
38
|
+
# for more information.
|
33
39
|
# @param [String] identity The identity
|
34
40
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
35
41
|
# guarantees to never return more than limit. Default is no limit
|
@@ -51,7 +57,11 @@ module Twilio
|
|
51
57
|
# Streams BindingInstance records from the API as an Enumerable.
|
52
58
|
# This operation lazily loads records as efficiently as possible until the limit
|
53
59
|
# is reached.
|
54
|
-
# @param [binding.BindingType] binding_type The
|
60
|
+
# @param [binding.BindingType] binding_type The push technology used for the
|
61
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
62
|
+
# notification
|
63
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
64
|
+
# for more information.
|
55
65
|
# @param [String] identity The identity
|
56
66
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
67
|
# guarantees to never return more than limit. Default is no limit.
|
@@ -85,7 +95,11 @@ module Twilio
|
|
85
95
|
##
|
86
96
|
# Retrieve a single page of BindingInstance records from the API.
|
87
97
|
# Request is executed immediately.
|
88
|
-
# @param [binding.BindingType] binding_type The
|
98
|
+
# @param [binding.BindingType] binding_type The push technology used for the
|
99
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
100
|
+
# notification
|
101
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
102
|
+
# for more information.
|
89
103
|
# @param [String] identity The identity
|
90
104
|
# @param [String] page_token PageToken provided by the API
|
91
105
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
@@ -206,7 +220,9 @@ module Twilio
|
|
206
220
|
# Initialize the BindingInstance
|
207
221
|
# @param [Version] version Version that contains the resource
|
208
222
|
# @param [Hash] payload payload that contains response from Twilio
|
209
|
-
# @param [String] service_sid The
|
223
|
+
# @param [String] service_sid The unique id of the
|
224
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
225
|
+
# belongs to.
|
210
226
|
# @param [String] sid The sid
|
211
227
|
# @return [BindingInstance] BindingInstance
|
212
228
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
@@ -245,73 +261,73 @@ module Twilio
|
|
245
261
|
end
|
246
262
|
|
247
263
|
##
|
248
|
-
# @return [String]
|
264
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
249
265
|
def sid
|
250
266
|
@properties['sid']
|
251
267
|
end
|
252
268
|
|
253
269
|
##
|
254
|
-
# @return [String] The
|
270
|
+
# @return [String] The unique id of the Account responsible for this binding.
|
255
271
|
def account_sid
|
256
272
|
@properties['account_sid']
|
257
273
|
end
|
258
274
|
|
259
275
|
##
|
260
|
-
# @return [String] The
|
276
|
+
# @return [String] The unique id of the Service this binding belongs to.
|
261
277
|
def service_sid
|
262
278
|
@properties['service_sid']
|
263
279
|
end
|
264
280
|
|
265
281
|
##
|
266
|
-
# @return [Time] The
|
282
|
+
# @return [Time] The date that this resource was created.
|
267
283
|
def date_created
|
268
284
|
@properties['date_created']
|
269
285
|
end
|
270
286
|
|
271
287
|
##
|
272
|
-
# @return [Time] The
|
288
|
+
# @return [Time] The date that this resource was last updated.
|
273
289
|
def date_updated
|
274
290
|
@properties['date_updated']
|
275
291
|
end
|
276
292
|
|
277
293
|
##
|
278
|
-
# @return [String] The endpoint
|
294
|
+
# @return [String] The unique endpoint identifier for this Binding.
|
279
295
|
def endpoint
|
280
296
|
@properties['endpoint']
|
281
297
|
end
|
282
298
|
|
283
299
|
##
|
284
|
-
# @return [String]
|
300
|
+
# @return [String] A unique string identifier for the Binding for this User in this Service.
|
285
301
|
def identity
|
286
302
|
@properties['identity']
|
287
303
|
end
|
288
304
|
|
289
305
|
##
|
290
|
-
# @return [String] The
|
306
|
+
# @return [String] The unique id of the Credential for this binding.
|
291
307
|
def credential_sid
|
292
308
|
@properties['credential_sid']
|
293
309
|
end
|
294
310
|
|
295
311
|
##
|
296
|
-
# @return [binding.BindingType] The
|
312
|
+
# @return [binding.BindingType] The push technology to use for this binding.
|
297
313
|
def binding_type
|
298
314
|
@properties['binding_type']
|
299
315
|
end
|
300
316
|
|
301
317
|
##
|
302
|
-
# @return [String]
|
318
|
+
# @return [String] List of message types for this binding.
|
303
319
|
def message_types
|
304
320
|
@properties['message_types']
|
305
321
|
end
|
306
322
|
|
307
323
|
##
|
308
|
-
# @return [String]
|
324
|
+
# @return [String] An absolute URL for this binding.
|
309
325
|
def url
|
310
326
|
@properties['url']
|
311
327
|
end
|
312
328
|
|
313
329
|
##
|
314
|
-
# @return [String]
|
330
|
+
# @return [String] Absolute URLs to access the Users for this Binding.
|
315
331
|
def links
|
316
332
|
@properties['links']
|
317
333
|
end
|
@@ -16,8 +16,14 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the UserBindingList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] service_sid The
|
20
|
-
#
|
19
|
+
# @param [String] service_sid The unique id of the
|
20
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
21
|
+
# belongs to.
|
22
|
+
# @param [String] user_sid The unique id of the
|
23
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) for this binding. See
|
24
|
+
# [push notification
|
25
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
26
|
+
# for more information.
|
21
27
|
# @return [UserBindingList] UserBindingList
|
22
28
|
def initialize(version, service_sid: nil, user_sid: nil)
|
23
29
|
super(version)
|
@@ -31,7 +37,11 @@ module Twilio
|
|
31
37
|
# Lists UserBindingInstance records from the API as a list.
|
32
38
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
39
|
# memory before returning.
|
34
|
-
# @param [user_binding.BindingType] binding_type The
|
40
|
+
# @param [user_binding.BindingType] binding_type The push technology used for the
|
41
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
42
|
+
# notification
|
43
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
44
|
+
# for more information.
|
35
45
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
36
46
|
# guarantees to never return more than limit. Default is no limit
|
37
47
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -47,7 +57,11 @@ module Twilio
|
|
47
57
|
# Streams UserBindingInstance records from the API as an Enumerable.
|
48
58
|
# This operation lazily loads records as efficiently as possible until the limit
|
49
59
|
# is reached.
|
50
|
-
# @param [user_binding.BindingType] binding_type The
|
60
|
+
# @param [user_binding.BindingType] binding_type The push technology used for the
|
61
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
62
|
+
# notification
|
63
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
64
|
+
# for more information.
|
51
65
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
52
66
|
# guarantees to never return more than limit. Default is no limit.
|
53
67
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -80,7 +94,11 @@ module Twilio
|
|
80
94
|
##
|
81
95
|
# Retrieve a single page of UserBindingInstance records from the API.
|
82
96
|
# Request is executed immediately.
|
83
|
-
# @param [user_binding.BindingType] binding_type The
|
97
|
+
# @param [user_binding.BindingType] binding_type The push technology used for the
|
98
|
+
# returned Bindings. Supported values are apn, gcm and fcm. See [push
|
99
|
+
# notification
|
100
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
101
|
+
# for more information.
|
84
102
|
# @param [String] page_token PageToken provided by the API
|
85
103
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
86
104
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -211,8 +229,14 @@ module Twilio
|
|
211
229
|
# Initialize the UserBindingInstance
|
212
230
|
# @param [Version] version Version that contains the resource
|
213
231
|
# @param [Hash] payload payload that contains response from Twilio
|
214
|
-
# @param [String] service_sid The
|
215
|
-
#
|
232
|
+
# @param [String] service_sid The unique id of the
|
233
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this binding
|
234
|
+
# belongs to.
|
235
|
+
# @param [String] user_sid The unique id of the
|
236
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) for this binding. See
|
237
|
+
# [push notification
|
238
|
+
# configuration](https://www.twilio.com/docs/chat/push-notification-configuration)
|
239
|
+
# for more information.
|
216
240
|
# @param [String] sid The sid
|
217
241
|
# @return [UserBindingInstance] UserBindingInstance
|
218
242
|
def initialize(version, payload, service_sid: nil, user_sid: nil, sid: nil)
|
@@ -256,73 +280,73 @@ module Twilio
|
|
256
280
|
end
|
257
281
|
|
258
282
|
##
|
259
|
-
# @return [String]
|
283
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
260
284
|
def sid
|
261
285
|
@properties['sid']
|
262
286
|
end
|
263
287
|
|
264
288
|
##
|
265
|
-
# @return [String] The
|
289
|
+
# @return [String] The unique id of the Account responsible for this binding.
|
266
290
|
def account_sid
|
267
291
|
@properties['account_sid']
|
268
292
|
end
|
269
293
|
|
270
294
|
##
|
271
|
-
# @return [String] The
|
295
|
+
# @return [String] The unique id of the Service this binding belongs to.
|
272
296
|
def service_sid
|
273
297
|
@properties['service_sid']
|
274
298
|
end
|
275
299
|
|
276
300
|
##
|
277
|
-
# @return [Time] The
|
301
|
+
# @return [Time] The date that this resource was created.
|
278
302
|
def date_created
|
279
303
|
@properties['date_created']
|
280
304
|
end
|
281
305
|
|
282
306
|
##
|
283
|
-
# @return [Time] The
|
307
|
+
# @return [Time] The date that this resource was last updated.
|
284
308
|
def date_updated
|
285
309
|
@properties['date_updated']
|
286
310
|
end
|
287
311
|
|
288
312
|
##
|
289
|
-
# @return [String] The endpoint
|
313
|
+
# @return [String] The unique endpoint identifier for this Binding.
|
290
314
|
def endpoint
|
291
315
|
@properties['endpoint']
|
292
316
|
end
|
293
317
|
|
294
318
|
##
|
295
|
-
# @return [String]
|
319
|
+
# @return [String] A unique string identifier for the Binding for this User in this Service.
|
296
320
|
def identity
|
297
321
|
@properties['identity']
|
298
322
|
end
|
299
323
|
|
300
324
|
##
|
301
|
-
# @return [String] The
|
325
|
+
# @return [String] The unique id of the User for this binding.
|
302
326
|
def user_sid
|
303
327
|
@properties['user_sid']
|
304
328
|
end
|
305
329
|
|
306
330
|
##
|
307
|
-
# @return [String] The
|
331
|
+
# @return [String] The unique id of the Credential for this binding.
|
308
332
|
def credential_sid
|
309
333
|
@properties['credential_sid']
|
310
334
|
end
|
311
335
|
|
312
336
|
##
|
313
|
-
# @return [user_binding.BindingType] The
|
337
|
+
# @return [user_binding.BindingType] The push technology to use for this binding.
|
314
338
|
def binding_type
|
315
339
|
@properties['binding_type']
|
316
340
|
end
|
317
341
|
|
318
342
|
##
|
319
|
-
# @return [String]
|
343
|
+
# @return [String] List of message types for this binding.
|
320
344
|
def message_types
|
321
345
|
@properties['message_types']
|
322
346
|
end
|
323
347
|
|
324
348
|
##
|
325
|
-
# @return [String]
|
349
|
+
# @return [String] An absolute URL for this binding.
|
326
350
|
def url
|
327
351
|
@properties['url']
|
328
352
|
end
|
@@ -125,7 +125,8 @@ module Twilio
|
|
125
125
|
# @param [String] language An ISO language-country string of the value.
|
126
126
|
# @param [String] value A user-provided string that uniquely identifies this
|
127
127
|
# resource as an alternative to the sid. Unique up to 64 characters long.
|
128
|
-
# @param [String] synonym_of
|
128
|
+
# @param [String] synonym_of A value that indicates this field value is a synonym
|
129
|
+
# of. Empty if the value is not a synonym.
|
129
130
|
# @return [FieldValueInstance] Newly created FieldValueInstance
|
130
131
|
def create(language: nil, value: nil, synonym_of: :unset)
|
131
132
|
data = Twilio::Values.of({'Language' => language, 'Value' => value, 'SynonymOf' => synonym_of, })
|
@@ -338,7 +339,7 @@ module Twilio
|
|
338
339
|
end
|
339
340
|
|
340
341
|
##
|
341
|
-
# @return [String] The
|
342
|
+
# @return [String] The Field Value itself.
|
342
343
|
def value
|
343
344
|
@properties['value']
|
344
345
|
end
|
@@ -350,7 +351,7 @@ module Twilio
|
|
350
351
|
end
|
351
352
|
|
352
353
|
##
|
353
|
-
# @return [String]
|
354
|
+
# @return [String] A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
|
354
355
|
def synonym_of
|
355
356
|
@properties['synonym_of']
|
356
357
|
end
|
@@ -34,7 +34,7 @@ module Twilio
|
|
34
34
|
# this ISO8601 date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
|
35
35
|
# @param [Time] date_created_before Only show Compositions that started before
|
36
36
|
# this this ISO8601 date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
|
37
|
-
# @param [String] room_sid
|
37
|
+
# @param [String] room_sid Only show Compositions with the given Room SID.
|
38
38
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
39
39
|
# guarantees to never return more than limit. Default is no limit
|
40
40
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -62,7 +62,7 @@ module Twilio
|
|
62
62
|
# this ISO8601 date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
|
63
63
|
# @param [Time] date_created_before Only show Compositions that started before
|
64
64
|
# this this ISO8601 date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
|
65
|
-
# @param [String] room_sid
|
65
|
+
# @param [String] room_sid Only show Compositions with the given Room SID.
|
66
66
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
67
67
|
# guarantees to never return more than limit. Default is no limit.
|
68
68
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -106,7 +106,7 @@ module Twilio
|
|
106
106
|
# this ISO8601 date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
|
107
107
|
# @param [Time] date_created_before Only show Compositions that started before
|
108
108
|
# this this ISO8601 date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
|
109
|
-
# @param [String] room_sid
|
109
|
+
# @param [String] room_sid Only show Compositions with the given Room SID.
|
110
110
|
# @param [String] page_token PageToken provided by the API
|
111
111
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
112
112
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -151,27 +151,37 @@ module Twilio
|
|
151
151
|
# Composition in terms of regions. See the section [Managing Video
|
152
152
|
# Layouts](#managing-video-layouts) below for further information.
|
153
153
|
# @param [String] audio_sources An array of audio sources to merge. All the
|
154
|
-
# specified sources must belong to the same Group Room. It can
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
154
|
+
# specified sources must belong to the same Group Room. It can include:
|
155
|
+
# * Zero or more `RecordingTrackSid`
|
156
|
+
# * Zero or more `MediaTrackSid`
|
157
|
+
# * Zero or more `ParticipantSid`
|
158
|
+
# * Zero or more Track names. These can be specified using wildcards (e.g.
|
159
|
+
# `student*`)
|
158
160
|
# @param [String] audio_sources_excluded An array of audio sources to exclude from
|
159
161
|
# the Composition. Any new Composition shall include all audio sources specified
|
160
162
|
# in `AudioSources` except for the ones specified in `AudioSourcesExcluded`. This
|
161
|
-
# parameter may include
|
162
|
-
#
|
163
|
-
#
|
163
|
+
# parameter may include:
|
164
|
+
# * Zero or more `RecordingTrackSid`
|
165
|
+
# * Zero or more `MediaTrackSid`
|
166
|
+
# * Zero or more `ParticipantSid`
|
167
|
+
# * Zero or more Track names. These can be specified using wildcards (e.g.
|
168
|
+
# `student*`)
|
164
169
|
# @param [String] resolution A string representing the numbers of pixels for rows
|
165
170
|
# (width) and columns (height) of the generated composed video. This string must
|
166
171
|
# have the format `{width}x{height}`. This parameter must comply with the
|
167
|
-
# following constraints
|
168
|
-
# 16 &&
|
169
|
-
#
|
170
|
-
# `
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
172
|
+
# following constraints:
|
173
|
+
# * `width >= 16 && width <= 1280`
|
174
|
+
# * `height >= 16 && height <= 1280`
|
175
|
+
# * `width * height <= 921,600`
|
176
|
+
# Typical values are:
|
177
|
+
# * HD = `1280x720`
|
178
|
+
# * PAL = `1024x576`
|
179
|
+
# * VGA = `640x480`
|
180
|
+
# * CIF = `320x240`
|
181
|
+
# Note that the `Resolution` implicitly imposes an aspect ratio to the resulting
|
182
|
+
# composition. When the original video tracks get constrained by this aspect ratio
|
183
|
+
# they are scaled-down to fit. You can find detailed information in the [Managing
|
184
|
+
# Video Layouts](#managing-video-layouts) section. Defaults to `640x480`.
|
175
185
|
# @param [composition.Format] format Container format of the Composition media
|
176
186
|
# file. Can be any of the following: `mp4`, `webm`. The use of `mp4` or `webm`
|
177
187
|
# makes mandatory the specification of `AudioSources` and/or one `VideoLayout`
|
@@ -12,6 +12,16 @@ module Twilio
|
|
12
12
|
module TwiML
|
13
13
|
class TwiMLError < StandardError; end
|
14
14
|
|
15
|
+
class Comment
|
16
|
+
def initialize(body)
|
17
|
+
@body = body
|
18
|
+
end
|
19
|
+
|
20
|
+
def xml(document)
|
21
|
+
Nokogiri::XML::Comment.new(document, @body)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
15
25
|
class TwiML
|
16
26
|
attr_accessor :name
|
17
27
|
|
@@ -68,12 +78,18 @@ module Twilio
|
|
68
78
|
end
|
69
79
|
|
70
80
|
def append(verb)
|
71
|
-
|
81
|
+
unless verb.is_a?(TwiML) || verb.is_a?(Comment)
|
82
|
+
raise TwiMLError, 'Only appending of TwiML is allowed'
|
83
|
+
end
|
72
84
|
|
73
85
|
@verbs << verb
|
74
86
|
self
|
75
87
|
end
|
76
88
|
|
89
|
+
def comment(body)
|
90
|
+
append(Comment.new(body))
|
91
|
+
end
|
92
|
+
|
77
93
|
alias to_xml to_s
|
78
94
|
end
|
79
95
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -41,6 +41,15 @@ describe 'PhoneNumber' do
|
|
41
41
|
"name": "verizon",
|
42
42
|
"type": "mobile"
|
43
43
|
},
|
44
|
+
"fraud": {
|
45
|
+
"error_code": null,
|
46
|
+
"mobile_country_code": "310",
|
47
|
+
"mobile_network_code": "456",
|
48
|
+
"advanced_line_type": "voip",
|
49
|
+
"caller_name": "Delicious Cheese Cake",
|
50
|
+
"is_ported": false,
|
51
|
+
"last_ported_date": "2018-05-01 04:05:11"
|
52
|
+
},
|
44
53
|
"country_code": "US",
|
45
54
|
"national_format": "(510) 867-5309",
|
46
55
|
"phone_number": "+15108675309",
|
@@ -20,6 +20,12 @@ describe Twilio::TwiML::MessagingResponse do
|
|
20
20
|
expect(doc).to be_equivalent_to(expected_doc).respecting_element_order
|
21
21
|
end
|
22
22
|
|
23
|
+
it 'should allow comments' do
|
24
|
+
twiml = Twilio::TwiML::MessagingResponse.new
|
25
|
+
twiml.comment 'This is awesome'
|
26
|
+
expect(twiml.to_xml).to match(/<!--This is awesome-->/)
|
27
|
+
end
|
28
|
+
|
23
29
|
it 'should allow populated response' do
|
24
30
|
expected_doc = parse <<-XML
|
25
31
|
<Response>
|
@@ -30,6 +30,12 @@ describe Twilio::TwiML::VoiceResponse do
|
|
30
30
|
expect(twiml).not_to match(/\A<\?xml version="1.0" encoding="UTF-8"\?>/)
|
31
31
|
end
|
32
32
|
|
33
|
+
it 'should allow comments' do
|
34
|
+
twiml = Twilio::TwiML::VoiceResponse.new
|
35
|
+
twiml.comment 'This is awesome'
|
36
|
+
expect(twiml.to_xml).to match(/<!--This is awesome-->/)
|
37
|
+
end
|
38
|
+
|
33
39
|
it 'should allow populated response' do
|
34
40
|
expected_doc = parse <<-XML
|
35
41
|
<Response>
|
data/twilio-ruby.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'twilio-ruby'
|
9
9
|
spec.version = Twilio::VERSION
|
10
10
|
spec.authors = ['Twilio API Team']
|
11
|
-
spec.summary = '
|
11
|
+
spec.summary = 'The official library for communicating with the Twilio REST API, '\
|
12
12
|
'building TwiML, and generating Twilio JWT Capability Tokens'
|
13
|
-
spec.description = '
|
13
|
+
spec.description = 'The official library for communicating with the Twilio REST API, '\
|
14
14
|
'building TwiML, and generating Twilio JWT Capability Tokens'
|
15
15
|
spec.homepage = 'http://github.com/twilio/twilio-ruby'
|
16
16
|
spec.license = 'MIT'
|
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.10.
|
4
|
+
version: 5.10.3
|
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: 2018-05
|
11
|
+
date: 2018-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: 0.9.9
|
109
|
-
description:
|
109
|
+
description: The official library for communicating with the Twilio REST API, building
|
110
110
|
TwiML, and generating Twilio JWT Capability Tokens
|
111
111
|
email:
|
112
112
|
executables: []
|
@@ -755,8 +755,8 @@ rubyforge_project:
|
|
755
755
|
rubygems_version: 2.5.2
|
756
756
|
signing_key:
|
757
757
|
specification_version: 4
|
758
|
-
summary:
|
759
|
-
and generating Twilio JWT Capability Tokens
|
758
|
+
summary: The official library for communicating with the Twilio REST API, building
|
759
|
+
TwiML, and generating Twilio JWT Capability Tokens
|
760
760
|
test_files:
|
761
761
|
- spec/framework/request_spec.rb
|
762
762
|
- spec/framework/serialize_spec.rb
|