twilio-ruby 5.15.2 → 5.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES.md +9 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +12 -3
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +9 -3
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +5 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +22 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +34 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +22 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +44 -12
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/twiml/voice_response.rb +2 -3
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 990fdb17dd39d71d342bee9cc7d71f0bd939214b
|
4
|
+
data.tar.gz: af52a8ab2f0fa61c7b0885fdf823e87c5d799a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcda9a64dcc8b8d084aace47dd2c393007fa95c91d0ca1bc76d46ffb47778befc475da8863f7ec3b6cf4b8507e2b858fd2ceee58205fee20af75c8346fb9eb3b
|
7
|
+
data.tar.gz: '09227a35d7584c5fab94983896117435fb15e1adc42372093f308b517f7d25abc91f2cfcbc128015b0fe6d0f3188beda79176e70fe8e8b47e3e5f1b0baadc2b1'
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-11-16] Version 5.16.0
|
5
|
+
----------------------------
|
6
|
+
**Messaging**
|
7
|
+
- Session API
|
8
|
+
|
9
|
+
**Twiml**
|
10
|
+
- Change `master-card` to `mastercard` as `cardType` for `Pay` and `Prompt`, remove attribute `credential_sid` from `Pay` **(breaking change)**
|
11
|
+
|
12
|
+
|
4
13
|
[2018-10-29] Version 5.15.2
|
5
14
|
----------------------------
|
6
15
|
**Api**
|
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.
|
30
|
+
gem 'twilio-ruby', '~> 5.16.0'
|
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.
|
36
|
+
gem install twilio-ruby -v 5.16.0
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -28,6 +28,14 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
+
##
|
32
|
+
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
33
|
+
# @return [Twilio::REST::Authy::V1::ServiceInstance] if sid was passed.
|
34
|
+
# @return [Twilio::REST::Authy::V1::ServiceList]
|
35
|
+
def services(sid=:unset)
|
36
|
+
self.v1.services(sid)
|
37
|
+
end
|
38
|
+
|
31
39
|
##
|
32
40
|
# @param [form.FormType] form_type The Form Type of this Form. One of
|
33
41
|
# `form-app-push`, `form-sms` or `form-totp`.
|
@@ -37,14 +45,6 @@ module Twilio
|
|
37
45
|
self.v1.forms(form_type)
|
38
46
|
end
|
39
47
|
|
40
|
-
##
|
41
|
-
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
42
|
-
# @return [Twilio::REST::Authy::V1::ServiceInstance] if sid was passed.
|
43
|
-
# @return [Twilio::REST::Authy::V1::ServiceList]
|
44
|
-
def services(sid=:unset)
|
45
|
-
self.v1.services(sid)
|
46
|
-
end
|
47
|
-
|
48
48
|
##
|
49
49
|
# Provide a user friendly representation
|
50
50
|
def to_s
|
@@ -15,8 +15,22 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
-
@forms = nil
|
19
18
|
@services = nil
|
19
|
+
@forms = nil
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
24
|
+
# @return [Twilio::REST::Authy::V1::ServiceContext] if sid was passed.
|
25
|
+
# @return [Twilio::REST::Authy::V1::ServiceList]
|
26
|
+
def services(sid=:unset)
|
27
|
+
if sid.nil?
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
elsif sid == :unset
|
30
|
+
@services ||= ServiceList.new self
|
31
|
+
else
|
32
|
+
ServiceContext.new(self, sid)
|
33
|
+
end
|
20
34
|
end
|
21
35
|
|
22
36
|
##
|
@@ -34,20 +48,6 @@ module Twilio
|
|
34
48
|
end
|
35
49
|
end
|
36
50
|
|
37
|
-
##
|
38
|
-
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
39
|
-
# @return [Twilio::REST::Authy::V1::ServiceContext] if sid was passed.
|
40
|
-
# @return [Twilio::REST::Authy::V1::ServiceList]
|
41
|
-
def services(sid=:unset)
|
42
|
-
if sid.nil?
|
43
|
-
raise ArgumentError, 'sid cannot be nil'
|
44
|
-
elsif sid == :unset
|
45
|
-
@services ||= ServiceList.new self
|
46
|
-
else
|
47
|
-
ServiceContext.new(self, sid)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
51
|
##
|
52
52
|
# Provide a user friendly representation
|
53
53
|
def to_s
|
@@ -135,14 +135,6 @@ module Twilio
|
|
135
135
|
self.hosted_numbers.hosted_number_orders(sid)
|
136
136
|
end
|
137
137
|
|
138
|
-
##
|
139
|
-
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
140
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
141
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
142
|
-
def available_add_ons(sid=:unset)
|
143
|
-
self.marketplace.available_add_ons(sid)
|
144
|
-
end
|
145
|
-
|
146
138
|
##
|
147
139
|
# @param [String] sid 34 character string that uniquely identifies the Add-on.
|
148
140
|
# This Sid can also be found in the Console on that specific Add-ons page as the
|
@@ -153,6 +145,14 @@ module Twilio
|
|
153
145
|
self.marketplace.installed_add_ons(sid)
|
154
146
|
end
|
155
147
|
|
148
|
+
##
|
149
|
+
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
150
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
151
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
152
|
+
def available_add_ons(sid=:unset)
|
153
|
+
self.marketplace.available_add_ons(sid)
|
154
|
+
end
|
155
|
+
|
156
156
|
##
|
157
157
|
# @param [String] sid A 34 character string that uniquely identifies this
|
158
158
|
# resource.
|
@@ -15,37 +15,37 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'marketplace'
|
18
|
-
@available_add_ons = nil
|
19
18
|
@installed_add_ons = nil
|
19
|
+
@available_add_ons = nil
|
20
20
|
end
|
21
21
|
|
22
22
|
##
|
23
|
-
# @param [String] sid The
|
23
|
+
# @param [String] sid The Installed Add-on Sid that uniquely identifies this
|
24
24
|
# resource
|
25
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
26
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
27
|
-
def
|
25
|
+
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed.
|
26
|
+
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
|
27
|
+
def installed_add_ons(sid=:unset)
|
28
28
|
if sid.nil?
|
29
29
|
raise ArgumentError, 'sid cannot be nil'
|
30
30
|
elsif sid == :unset
|
31
|
-
@
|
31
|
+
@installed_add_ons ||= InstalledAddOnList.new self
|
32
32
|
else
|
33
|
-
|
33
|
+
InstalledAddOnContext.new(self, sid)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
##
|
38
|
-
# @param [String] sid The
|
38
|
+
# @param [String] sid The Available Add-on Sid that uniquely identifies this
|
39
39
|
# resource
|
40
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
41
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
42
|
-
def
|
40
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed.
|
41
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
42
|
+
def available_add_ons(sid=:unset)
|
43
43
|
if sid.nil?
|
44
44
|
raise ArgumentError, 'sid cannot be nil'
|
45
45
|
elsif sid == :unset
|
46
|
-
@
|
46
|
+
@available_add_ons ||= AvailableAddOnList.new self
|
47
47
|
else
|
48
|
-
|
48
|
+
AvailableAddOnContext.new(self, sid)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -127,7 +127,10 @@ module Twilio
|
|
127
127
|
# Interaction. Returning a 403 status code will prevent the interaction from
|
128
128
|
# continuing.
|
129
129
|
# @param [String] out_of_session_callback_url A URL for Twilio call when a new
|
130
|
-
# Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session).
|
130
|
+
# Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session). See
|
131
|
+
# [Out-of-Session Callback Response
|
132
|
+
# Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide)
|
133
|
+
# for more information.
|
131
134
|
# @param [String] chat_instance_sid The Chat Service Instance sid managed by Proxy
|
132
135
|
# Service. Enables Proxy to forward sms and channel messages to this chat
|
133
136
|
# instance. This is a one-to-one relationship.
|
@@ -253,7 +256,10 @@ module Twilio
|
|
253
256
|
# Interaction. Returning a 403 status code will prevent the interaction from
|
254
257
|
# continuing.
|
255
258
|
# @param [String] out_of_session_callback_url A URL for Twilio call when a new
|
256
|
-
# Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session).
|
259
|
+
# Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session). See
|
260
|
+
# [Out-of-Session Callback Response
|
261
|
+
# Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide)
|
262
|
+
# for more information.
|
257
263
|
# @param [String] chat_instance_sid The Chat Service Instance sid managed by Proxy
|
258
264
|
# Service. Enables Proxy to forward sms and channel messages to this chat
|
259
265
|
# instance. This is a one-to-one relationship.
|
@@ -504,7 +510,10 @@ module Twilio
|
|
504
510
|
# Interaction. Returning a 403 status code will prevent the interaction from
|
505
511
|
# continuing.
|
506
512
|
# @param [String] out_of_session_callback_url A URL for Twilio call when a new
|
507
|
-
# Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session).
|
513
|
+
# Interaction has no [Session](https://www.twilio.com/docs/proxy/api/session). See
|
514
|
+
# [Out-of-Session Callback Response
|
515
|
+
# Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide)
|
516
|
+
# for more information.
|
508
517
|
# @param [String] chat_instance_sid The Chat Service Instance sid managed by Proxy
|
509
518
|
# Service. Enables Proxy to forward sms and channel messages to this chat
|
510
519
|
# instance. This is a one-to-one relationship.
|
@@ -37,7 +37,9 @@ module Twilio
|
|
37
37
|
# would like to assign to your Proxy Service. Provide number in
|
38
38
|
# [E.164](https://en.wikipedia.org/wiki/E.164) format (e.g. `+16175551212`).
|
39
39
|
# @param [Boolean] is_reserved Whether or not the number should be excluded from
|
40
|
-
# being assigned to a participant using proxy pool logic
|
40
|
+
# being assigned to a participant using proxy pool logic. See [Reserved Phone
|
41
|
+
# Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more
|
42
|
+
# information.
|
41
43
|
# @return [PhoneNumberInstance] Newly created PhoneNumberInstance
|
42
44
|
def create(sid: :unset, phone_number: :unset, is_reserved: :unset)
|
43
45
|
data = Twilio::Values.of({'Sid' => sid, 'PhoneNumber' => phone_number, 'IsReserved' => is_reserved, })
|
@@ -220,7 +222,9 @@ module Twilio
|
|
220
222
|
##
|
221
223
|
# Update the PhoneNumberInstance
|
222
224
|
# @param [Boolean] is_reserved Whether or not the number should be excluded from
|
223
|
-
# being assigned to a participant using proxy pool logic
|
225
|
+
# being assigned to a participant using proxy pool logic. See [Reserved Phone
|
226
|
+
# Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more
|
227
|
+
# information.
|
224
228
|
# @return [PhoneNumberInstance] Updated PhoneNumberInstance
|
225
229
|
def update(is_reserved: :unset)
|
226
230
|
data = Twilio::Values.of({'IsReserved' => is_reserved, })
|
@@ -376,7 +380,9 @@ module Twilio
|
|
376
380
|
##
|
377
381
|
# Update the PhoneNumberInstance
|
378
382
|
# @param [Boolean] is_reserved Whether or not the number should be excluded from
|
379
|
-
# being assigned to a participant using proxy pool logic
|
383
|
+
# being assigned to a participant using proxy pool logic. See [Reserved Phone
|
384
|
+
# Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more
|
385
|
+
# information.
|
380
386
|
# @return [PhoneNumberInstance] Updated PhoneNumberInstance
|
381
387
|
def update(is_reserved: :unset)
|
382
388
|
context.update(is_reserved: is_reserved, )
|
@@ -116,11 +116,11 @@ module Twilio
|
|
116
116
|
# from during the Flow Execution, available as variable {{flow.channel.address}}
|
117
117
|
# @param [Hash] parameters JSON data that will be added to your flow's context and
|
118
118
|
# can accessed as variables inside your flow. For example, if you pass in
|
119
|
-
# Parameters={
|
120
|
-
# {{flow.data.name}} which will return the string
|
121
|
-
# must explicitly be passed as a string, not as a hash object.
|
122
|
-
# particular HTTP library, you may need to add quotes or URL
|
123
|
-
# string.
|
119
|
+
# `Parameters={"name":"Zeke"}`, then inside a widget you can reference the
|
120
|
+
# variable `{{flow.data.name}}` which will return the string "Zeke". Note: the
|
121
|
+
# JSON value must explicitly be passed as a string, not as a hash object.
|
122
|
+
# Depending on your particular HTTP library, you may need to add quotes or URL
|
123
|
+
# encode your JSON string.
|
124
124
|
# @return [ExecutionInstance] Newly created ExecutionInstance
|
125
125
|
def create(to: nil, from: nil, parameters: :unset)
|
126
126
|
data = Twilio::Values.of({
|
@@ -32,11 +32,17 @@ module Twilio
|
|
32
32
|
# Retrieve a single page of SyncListInstance records from the API.
|
33
33
|
# Request is executed immediately.
|
34
34
|
# @param [String] unique_name Human-readable name for this list
|
35
|
-
# @param [String] ttl
|
36
|
-
#
|
35
|
+
# @param [String] ttl Alias for collection_ttl. If both are provided, this value
|
36
|
+
# is ignored.
|
37
|
+
# @param [String] collection_ttl Time-to-live of this List in seconds, defaults to
|
38
|
+
# no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity.
|
37
39
|
# @return [SyncListInstance] Newly created SyncListInstance
|
38
|
-
def create(unique_name: :unset, ttl: :unset)
|
39
|
-
data = Twilio::Values.of({
|
40
|
+
def create(unique_name: :unset, ttl: :unset, collection_ttl: :unset)
|
41
|
+
data = Twilio::Values.of({
|
42
|
+
'UniqueName' => unique_name,
|
43
|
+
'Ttl' => ttl,
|
44
|
+
'CollectionTtl' => collection_ttl,
|
45
|
+
})
|
40
46
|
|
41
47
|
payload = @version.create(
|
42
48
|
'POST',
|
@@ -212,11 +218,13 @@ module Twilio
|
|
212
218
|
|
213
219
|
##
|
214
220
|
# Update the SyncListInstance
|
215
|
-
# @param [String] ttl
|
216
|
-
#
|
221
|
+
# @param [String] ttl Alias for collection_ttl. If both are provided, this value
|
222
|
+
# is ignored.
|
223
|
+
# @param [String] collection_ttl Time-to-live of this List in seconds, defaults to
|
224
|
+
# no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity.
|
217
225
|
# @return [SyncListInstance] Updated SyncListInstance
|
218
|
-
def update(ttl: :unset)
|
219
|
-
data = Twilio::Values.of({'Ttl' => ttl, })
|
226
|
+
def update(ttl: :unset, collection_ttl: :unset)
|
227
|
+
data = Twilio::Values.of({'Ttl' => ttl, 'CollectionTtl' => collection_ttl, })
|
220
228
|
|
221
229
|
payload = @version.update(
|
222
230
|
'POST',
|
@@ -406,11 +414,13 @@ module Twilio
|
|
406
414
|
|
407
415
|
##
|
408
416
|
# Update the SyncListInstance
|
409
|
-
# @param [String] ttl
|
410
|
-
#
|
417
|
+
# @param [String] ttl Alias for collection_ttl. If both are provided, this value
|
418
|
+
# is ignored.
|
419
|
+
# @param [String] collection_ttl Time-to-live of this List in seconds, defaults to
|
420
|
+
# no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity.
|
411
421
|
# @return [SyncListInstance] Updated SyncListInstance
|
412
|
-
def update(ttl: :unset)
|
413
|
-
context.update(ttl: ttl, )
|
422
|
+
def update(ttl: :unset, collection_ttl: :unset)
|
423
|
+
context.update(ttl: ttl, collection_ttl: collection_ttl, )
|
414
424
|
end
|
415
425
|
|
416
426
|
##
|
@@ -36,13 +36,23 @@ module Twilio
|
|
36
36
|
# Request is executed immediately.
|
37
37
|
# @param [Hash] data Contains arbitrary user-defined, schema-less data that this
|
38
38
|
# List Item stores, represented by a JSON object, up to 16KB.
|
39
|
-
# @param [String] ttl
|
39
|
+
# @param [String] ttl Alias for item_ttl. If both are provided, this value is
|
40
|
+
# ignored.
|
41
|
+
# @param [String] item_ttl Time-to-live of this item in seconds, defaults to no
|
40
42
|
# expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity. Upon
|
41
43
|
# expiry, the list item will be cleaned up at least in a matter of hours, and
|
42
44
|
# often within seconds, making this a good tool for garbage management.
|
45
|
+
# @param [String] collection_ttl Time-to-live of this item's parent List in
|
46
|
+
# seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0
|
47
|
+
# for infinity.
|
43
48
|
# @return [SyncListItemInstance] Newly created SyncListItemInstance
|
44
|
-
def create(data: nil, ttl: :unset)
|
45
|
-
data = Twilio::Values.of({
|
49
|
+
def create(data: nil, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
|
50
|
+
data = Twilio::Values.of({
|
51
|
+
'Data' => Twilio.serialize_object(data),
|
52
|
+
'Ttl' => ttl,
|
53
|
+
'ItemTtl' => item_ttl,
|
54
|
+
'CollectionTtl' => collection_ttl,
|
55
|
+
})
|
46
56
|
|
47
57
|
payload = @version.create(
|
48
58
|
'POST',
|
@@ -251,13 +261,23 @@ module Twilio
|
|
251
261
|
# Update the SyncListItemInstance
|
252
262
|
# @param [Hash] data Contains arbitrary user-defined, schema-less data that this
|
253
263
|
# List Item stores, represented by a JSON object, up to 16KB.
|
254
|
-
# @param [String] ttl
|
264
|
+
# @param [String] ttl Alias for item_ttl. If both are provided, this value is
|
265
|
+
# ignored.
|
266
|
+
# @param [String] item_ttl Time-to-live of this item in seconds, defaults to no
|
255
267
|
# expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity. Upon
|
256
268
|
# expiry, the list item will be cleaned up at least in a matter of hours, and
|
257
269
|
# often within seconds, making this a good tool for garbage management.
|
270
|
+
# @param [String] collection_ttl Time-to-live of this item's parent List in
|
271
|
+
# seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0
|
272
|
+
# for infinity.
|
258
273
|
# @return [SyncListItemInstance] Updated SyncListItemInstance
|
259
|
-
def update(data: :unset, ttl: :unset)
|
260
|
-
data = Twilio::Values.of({
|
274
|
+
def update(data: :unset, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
|
275
|
+
data = Twilio::Values.of({
|
276
|
+
'Data' => Twilio.serialize_object(data),
|
277
|
+
'Ttl' => ttl,
|
278
|
+
'ItemTtl' => item_ttl,
|
279
|
+
'CollectionTtl' => collection_ttl,
|
280
|
+
})
|
261
281
|
|
262
282
|
payload = @version.update(
|
263
283
|
'POST',
|
@@ -422,13 +442,18 @@ module Twilio
|
|
422
442
|
# Update the SyncListItemInstance
|
423
443
|
# @param [Hash] data Contains arbitrary user-defined, schema-less data that this
|
424
444
|
# List Item stores, represented by a JSON object, up to 16KB.
|
425
|
-
# @param [String] ttl
|
445
|
+
# @param [String] ttl Alias for item_ttl. If both are provided, this value is
|
446
|
+
# ignored.
|
447
|
+
# @param [String] item_ttl Time-to-live of this item in seconds, defaults to no
|
426
448
|
# expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity. Upon
|
427
449
|
# expiry, the list item will be cleaned up at least in a matter of hours, and
|
428
450
|
# often within seconds, making this a good tool for garbage management.
|
451
|
+
# @param [String] collection_ttl Time-to-live of this item's parent List in
|
452
|
+
# seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0
|
453
|
+
# for infinity.
|
429
454
|
# @return [SyncListItemInstance] Updated SyncListItemInstance
|
430
|
-
def update(data: :unset, ttl: :unset)
|
431
|
-
context.update(data: data, ttl: ttl, )
|
455
|
+
def update(data: :unset, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
|
456
|
+
context.update(data: data, ttl: ttl, item_ttl: item_ttl, collection_ttl: collection_ttl, )
|
432
457
|
end
|
433
458
|
|
434
459
|
##
|
@@ -32,11 +32,17 @@ module Twilio
|
|
32
32
|
# Retrieve a single page of SyncMapInstance records from the API.
|
33
33
|
# Request is executed immediately.
|
34
34
|
# @param [String] unique_name Human-readable name for this map
|
35
|
-
# @param [String] ttl
|
36
|
-
#
|
35
|
+
# @param [String] ttl Alias for collection_ttl. If both are provided, this value
|
36
|
+
# is ignored.
|
37
|
+
# @param [String] collection_ttl Time-to-live of this Map in seconds, defaults to
|
38
|
+
# no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity.
|
37
39
|
# @return [SyncMapInstance] Newly created SyncMapInstance
|
38
|
-
def create(unique_name: :unset, ttl: :unset)
|
39
|
-
data = Twilio::Values.of({
|
40
|
+
def create(unique_name: :unset, ttl: :unset, collection_ttl: :unset)
|
41
|
+
data = Twilio::Values.of({
|
42
|
+
'UniqueName' => unique_name,
|
43
|
+
'Ttl' => ttl,
|
44
|
+
'CollectionTtl' => collection_ttl,
|
45
|
+
})
|
40
46
|
|
41
47
|
payload = @version.create(
|
42
48
|
'POST',
|
@@ -212,11 +218,13 @@ module Twilio
|
|
212
218
|
|
213
219
|
##
|
214
220
|
# Update the SyncMapInstance
|
215
|
-
# @param [String] ttl
|
216
|
-
#
|
221
|
+
# @param [String] ttl Alias for collection_ttl. If both are provided, this value
|
222
|
+
# is ignored.
|
223
|
+
# @param [String] collection_ttl New time-to-live of this Map in seconds. In the
|
224
|
+
# range [1, 31 536 000 (1 year)], or 0 for infinity.
|
217
225
|
# @return [SyncMapInstance] Updated SyncMapInstance
|
218
|
-
def update(ttl: :unset)
|
219
|
-
data = Twilio::Values.of({'Ttl' => ttl, })
|
226
|
+
def update(ttl: :unset, collection_ttl: :unset)
|
227
|
+
data = Twilio::Values.of({'Ttl' => ttl, 'CollectionTtl' => collection_ttl, })
|
220
228
|
|
221
229
|
payload = @version.update(
|
222
230
|
'POST',
|
@@ -406,11 +414,13 @@ module Twilio
|
|
406
414
|
|
407
415
|
##
|
408
416
|
# Update the SyncMapInstance
|
409
|
-
# @param [String] ttl
|
410
|
-
#
|
417
|
+
# @param [String] ttl Alias for collection_ttl. If both are provided, this value
|
418
|
+
# is ignored.
|
419
|
+
# @param [String] collection_ttl New time-to-live of this Map in seconds. In the
|
420
|
+
# range [1, 31 536 000 (1 year)], or 0 for infinity.
|
411
421
|
# @return [SyncMapInstance] Updated SyncMapInstance
|
412
|
-
def update(ttl: :unset)
|
413
|
-
context.update(ttl: ttl, )
|
422
|
+
def update(ttl: :unset, collection_ttl: :unset)
|
423
|
+
context.update(ttl: ttl, collection_ttl: collection_ttl, )
|
414
424
|
end
|
415
425
|
|
416
426
|
##
|
@@ -38,11 +38,24 @@ module Twilio
|
|
38
38
|
# characters long.
|
39
39
|
# @param [Hash] data Contains arbitrary user-defined, schema-less data that this
|
40
40
|
# Map Item stores, represented by a JSON object, up to 16KB.
|
41
|
-
# @param [String] ttl
|
42
|
-
#
|
41
|
+
# @param [String] ttl Alias for item_ttl. If both are provided, this value is
|
42
|
+
# ignored.
|
43
|
+
# @param [String] item_ttl Time-to-live of this item in seconds, defaults to no
|
44
|
+
# expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity. Upon
|
45
|
+
# expiry, the map item will be cleaned up at least in a matter of hours, and often
|
46
|
+
# within seconds, making this a good tool for garbage management.
|
47
|
+
# @param [String] collection_ttl Time-to-live of this item's parent Map in
|
48
|
+
# seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0
|
49
|
+
# for infinity.
|
43
50
|
# @return [SyncMapItemInstance] Newly created SyncMapItemInstance
|
44
|
-
def create(key: nil, data: nil, ttl: :unset)
|
45
|
-
data = Twilio::Values.of({
|
51
|
+
def create(key: nil, data: nil, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
|
52
|
+
data = Twilio::Values.of({
|
53
|
+
'Key' => key,
|
54
|
+
'Data' => Twilio.serialize_object(data),
|
55
|
+
'Ttl' => ttl,
|
56
|
+
'ItemTtl' => item_ttl,
|
57
|
+
'CollectionTtl' => collection_ttl,
|
58
|
+
})
|
46
59
|
|
47
60
|
payload = @version.create(
|
48
61
|
'POST',
|
@@ -260,11 +273,23 @@ module Twilio
|
|
260
273
|
# Update the SyncMapItemInstance
|
261
274
|
# @param [Hash] data Contains an arbitrary JSON object to be stored in this Map
|
262
275
|
# Item. Serialized to string to respect HTTP form input, up to 16KB.
|
263
|
-
# @param [String] ttl
|
264
|
-
#
|
276
|
+
# @param [String] ttl Alias for item_ttl. If both are provided, this value is
|
277
|
+
# ignored.
|
278
|
+
# @param [String] item_ttl Time-to-live of this item in seconds, defaults to no
|
279
|
+
# expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity. Upon
|
280
|
+
# expiry, the map item will be cleaned up at least in a matter of hours, and often
|
281
|
+
# within seconds, making this a good tool for garbage management.
|
282
|
+
# @param [String] collection_ttl Time-to-live of this item's parent Map in
|
283
|
+
# seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0
|
284
|
+
# for infinity.
|
265
285
|
# @return [SyncMapItemInstance] Updated SyncMapItemInstance
|
266
|
-
def update(data: :unset, ttl: :unset)
|
267
|
-
data = Twilio::Values.of({
|
286
|
+
def update(data: :unset, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
|
287
|
+
data = Twilio::Values.of({
|
288
|
+
'Data' => Twilio.serialize_object(data),
|
289
|
+
'Ttl' => ttl,
|
290
|
+
'ItemTtl' => item_ttl,
|
291
|
+
'CollectionTtl' => collection_ttl,
|
292
|
+
})
|
268
293
|
|
269
294
|
payload = @version.update(
|
270
295
|
'POST',
|
@@ -425,11 +450,18 @@ module Twilio
|
|
425
450
|
# Update the SyncMapItemInstance
|
426
451
|
# @param [Hash] data Contains an arbitrary JSON object to be stored in this Map
|
427
452
|
# Item. Serialized to string to respect HTTP form input, up to 16KB.
|
428
|
-
# @param [String] ttl
|
429
|
-
#
|
453
|
+
# @param [String] ttl Alias for item_ttl. If both are provided, this value is
|
454
|
+
# ignored.
|
455
|
+
# @param [String] item_ttl Time-to-live of this item in seconds, defaults to no
|
456
|
+
# expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity. Upon
|
457
|
+
# expiry, the map item will be cleaned up at least in a matter of hours, and often
|
458
|
+
# within seconds, making this a good tool for garbage management.
|
459
|
+
# @param [String] collection_ttl Time-to-live of this item's parent Map in
|
460
|
+
# seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0
|
461
|
+
# for infinity.
|
430
462
|
# @return [SyncMapItemInstance] Updated SyncMapItemInstance
|
431
|
-
def update(data: :unset, ttl: :unset)
|
432
|
-
context.update(data: data, ttl: ttl, )
|
463
|
+
def update(data: :unset, ttl: :unset, item_ttl: :unset, collection_ttl: :unset)
|
464
|
+
context.update(data: data, ttl: ttl, item_ttl: item_ttl, collection_ttl: collection_ttl, )
|
433
465
|
end
|
434
466
|
|
435
467
|
##
|
@@ -28,15 +28,6 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
-
##
|
32
|
-
# @param [String] sid `CJxx…xx` A system-generated 34-character string that
|
33
|
-
# uniquely identifies this Composition.
|
34
|
-
# @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
|
35
|
-
# @return [Twilio::REST::Video::V1::CompositionList]
|
36
|
-
def compositions(sid=:unset)
|
37
|
-
self.v1.compositions(sid)
|
38
|
-
end
|
39
|
-
|
40
31
|
##
|
41
32
|
# @param [String] sid `HKxx…xx` A system-generated 34-character string that
|
42
33
|
# uniquely identifies this Composition Hook.
|
@@ -67,6 +58,15 @@ module Twilio
|
|
67
58
|
self.v1.recording_settings()
|
68
59
|
end
|
69
60
|
|
61
|
+
##
|
62
|
+
# @param [String] sid `CJxx…xx` A system-generated 34-character string that
|
63
|
+
# uniquely identifies this Composition.
|
64
|
+
# @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
|
65
|
+
# @return [Twilio::REST::Video::V1::CompositionList]
|
66
|
+
def compositions(sid=:unset)
|
67
|
+
self.v1.compositions(sid)
|
68
|
+
end
|
69
|
+
|
70
70
|
##
|
71
71
|
# @param [String] sid A system-generated 34-character string that uniquely
|
72
72
|
# identifies this resource.
|
@@ -15,29 +15,14 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
-
@compositions = nil
|
19
18
|
@composition_hooks = nil
|
20
19
|
@composition_settings = nil
|
21
20
|
@recordings = nil
|
22
21
|
@recording_settings = nil
|
22
|
+
@compositions = nil
|
23
23
|
@rooms = nil
|
24
24
|
end
|
25
25
|
|
26
|
-
##
|
27
|
-
# @param [String] sid The Composition Sid that uniquely identifies the Composition
|
28
|
-
# to fetch.
|
29
|
-
# @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
|
30
|
-
# @return [Twilio::REST::Video::V1::CompositionList]
|
31
|
-
def compositions(sid=:unset)
|
32
|
-
if sid.nil?
|
33
|
-
raise ArgumentError, 'sid cannot be nil'
|
34
|
-
elsif sid == :unset
|
35
|
-
@compositions ||= CompositionList.new self
|
36
|
-
else
|
37
|
-
CompositionContext.new(self, sid)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
26
|
##
|
42
27
|
# @param [String] sid The Composition Hook Sid that uniquely identifies the
|
43
28
|
# Composition Hook to fetch.
|
@@ -80,6 +65,21 @@ module Twilio
|
|
80
65
|
@recording_settings ||= RecordingSettingsContext.new self
|
81
66
|
end
|
82
67
|
|
68
|
+
##
|
69
|
+
# @param [String] sid The Composition Sid that uniquely identifies the Composition
|
70
|
+
# to fetch.
|
71
|
+
# @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
|
72
|
+
# @return [Twilio::REST::Video::V1::CompositionList]
|
73
|
+
def compositions(sid=:unset)
|
74
|
+
if sid.nil?
|
75
|
+
raise ArgumentError, 'sid cannot be nil'
|
76
|
+
elsif sid == :unset
|
77
|
+
@compositions ||= CompositionList.new self
|
78
|
+
else
|
79
|
+
CompositionContext.new(self, sid)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
83
|
##
|
84
84
|
# @param [String] sid The Room Sid or name that uniquely identifies this resource.
|
85
85
|
# @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.
|
@@ -222,13 +222,12 @@ module Twilio
|
|
222
222
|
# token_type:: Type of token
|
223
223
|
# charge_amount:: Amount to process. If value is greater than 0 then make the payment else create a payment token
|
224
224
|
# currency:: Currency of the amount attribute
|
225
|
-
# credential_sid:: SID for API keys to communicate with payment provider
|
226
225
|
# description:: Details regarding the payment
|
227
226
|
# valid_card_types:: Comma separated accepted card types
|
228
227
|
# language:: Language to use
|
229
228
|
# keyword_args:: additional attributes
|
230
|
-
def pay(input: nil, action: nil, status_callback: nil, status_callback_method: nil, timeout: nil, max_attempts: nil, security_code: nil, postal_code: nil, payment_connector: nil, token_type: nil, charge_amount: nil, currency: nil,
|
231
|
-
pay = Pay.new(input: input, action: action, status_callback: status_callback, status_callback_method: status_callback_method, timeout: timeout, max_attempts: max_attempts, security_code: security_code, postal_code: postal_code, payment_connector: payment_connector, token_type: token_type, charge_amount: charge_amount, currency: currency,
|
229
|
+
def pay(input: nil, action: nil, status_callback: nil, status_callback_method: nil, timeout: nil, max_attempts: nil, security_code: nil, postal_code: nil, payment_connector: nil, token_type: nil, charge_amount: nil, currency: nil, description: nil, valid_card_types: nil, language: nil, **keyword_args)
|
230
|
+
pay = Pay.new(input: input, action: action, status_callback: status_callback, status_callback_method: status_callback_method, timeout: timeout, max_attempts: max_attempts, security_code: security_code, postal_code: postal_code, payment_connector: payment_connector, token_type: token_type, charge_amount: charge_amount, currency: currency, description: description, valid_card_types: valid_card_types, language: language, **keyword_args)
|
232
231
|
|
233
232
|
yield(pay) if block_given?
|
234
233
|
append(pay)
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -44,7 +44,7 @@ describe 'Query' do
|
|
44
44
|
"task_sid": "UDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
45
45
|
"confidence": 0.9
|
46
46
|
},
|
47
|
-
"
|
47
|
+
"fields": [
|
48
48
|
{
|
49
49
|
"name": "name",
|
50
50
|
"value": "value",
|
@@ -128,7 +128,7 @@ describe 'Query' do
|
|
128
128
|
"task_sid": "UDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
129
129
|
"confidence": 0.9
|
130
130
|
},
|
131
|
-
"
|
131
|
+
"fields": [
|
132
132
|
{
|
133
133
|
"name": "name",
|
134
134
|
"value": "value",
|
@@ -197,7 +197,7 @@ describe 'Query' do
|
|
197
197
|
"task_sid": "UDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
198
198
|
"confidence": 0.9
|
199
199
|
},
|
200
|
-
"
|
200
|
+
"fields": [
|
201
201
|
{
|
202
202
|
"name": "name",
|
203
203
|
"value": "value",
|
@@ -254,7 +254,7 @@ describe 'Query' do
|
|
254
254
|
"task_sid": "UDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
255
255
|
"confidence": 0.9
|
256
256
|
},
|
257
|
-
"
|
257
|
+
"fields": [
|
258
258
|
{
|
259
259
|
"name": "name",
|
260
260
|
"value": "value",
|
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.
|
4
|
+
version: 5.16.0
|
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-
|
11
|
+
date: 2018-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -835,7 +835,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
835
835
|
version: '0'
|
836
836
|
requirements: []
|
837
837
|
rubyforge_project:
|
838
|
-
rubygems_version: 2.
|
838
|
+
rubygems_version: 2.5.2.3
|
839
839
|
signing_key:
|
840
840
|
specification_version: 4
|
841
841
|
summary: The official library for communicating with the Twilio REST API, building
|