twilio-ruby 5.29.1 → 5.30.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ec8654fb02b245c684ef8a655d33073b3e68d0ed6ca6ae480f37c7d45e24bb0
4
- data.tar.gz: '09d78250aafbab55b56c9021c7a64543da01e79f0310fe166b53aa2a23605004'
3
+ metadata.gz: 16cae4a8b8149fc5353e25a78e727c65e1e01d40905818cff2b7f9989b65a848
4
+ data.tar.gz: 647c86d08f7647d4fd3eb9ce7aadfa293f6e3d431240467e08332af10a541484
5
5
  SHA512:
6
- metadata.gz: 93d6216dc5efe1f3aff1f56d1f48a76de195190a1206bdbdcedacff17049b5eb17359bd36575a0daf7d3a53af5b157856c3dad9a870c96e8cf599b0133e2e89b
7
- data.tar.gz: 6bd94d4c90099bdfa8317ddf7194ad81ef61e59a1876a510b07f45459d55c9296175ee290b7b99b2908dde597038ff7b2f1c60fe7f16bf3d95f72b9e06d2277f
6
+ metadata.gz: 0644cc5a3031b3d9df99d7da4f25db0e04b16b394697f2cdfd02e3db89614e58462f3b8d34188606f005f8130f3ad02d82b3577d44bd14cd74cd3abbdddbf05e
7
+ data.tar.gz: 726e3cd4dfd182e20ce9b4e23ac61b065b411d9e2ed9004dc61ae85773eb75f57ba4254b424bc4b436ae4f1a90ab60d294e266dc6ea9c7d81285d5cb7633290a
data/CHANGES.md CHANGED
@@ -1,6 +1,29 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2019-12-04] Version 5.30.0
5
+ ---------------------------
6
+ **Library**
7
+ - [PR #485](https://github.com/twilio/twilio-ruby/pull/485): docs: add supported language versions to README. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
8
+ - [PR #445](https://github.com/twilio/twilio-ruby/pull/445): fix: handle building the HTTP client proxy URI without authentication. Thanks to [@laka3000](https://github.com/laka3000)!
9
+
10
+ **Api**
11
+ - Add optional `twiml` parameter for call create
12
+
13
+ **Chat**
14
+ - Added `delete` method in UserChannel resource
15
+
16
+ **Conversations**
17
+ - Allow Messaging Service update
18
+
19
+ **Taskrouter**
20
+ - Support ReEvaluateTasks parameter on Workflow update
21
+
22
+ **Twiml**
23
+ - Remove unsupported `mixed_track` value from `<Stream>` **(breaking change)**
24
+ - Add missing fax `<Receive>` optional attributes
25
+
26
+
4
27
  [2019-11-13] Version 5.29.1
5
28
  ---------------------------
6
29
  **Api**
data/README.md CHANGED
@@ -10,33 +10,34 @@ The documentation for the Twilio API can be found [here][apidocs].
10
10
 
11
11
  The Ruby library documentation can be found [here][libdocs] and individual releases [here][refdocs].
12
12
 
13
- ## Recent Update
13
+ ## Versions
14
+
15
+ `twilio-ruby` uses a modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.
16
+
17
+ ### Supported Ruby Versions
14
18
 
15
- As of release 5.1.0, Beta and Developer Preview products are now exposed via
16
- the main `twilio-ruby` artifact. Releases of the `alpha` branch have been
17
- discontinued.
19
+ This library supports the following Ruby implementations:
18
20
 
19
- If you were using the `alpha` release line, you should be able to switch back
20
- to the normal release line without issue.
21
+ * Ruby 2.4
22
+ * Ruby 2.5
23
+ * Ruby 2.6
21
24
 
22
- If you were using the normal release line, you should now see several new
23
- product lines that were historically hidden from you due to their Beta or
24
- Developer Preview status. Such products are explicitly documented as
25
- Beta/Developer Preview both in the Twilio docs and console, as well as through
26
- in-line code documentation here in the library.
25
+ ### Migrating from 4.x
26
+
27
+ [Upgrade Guide][upgrade]
27
28
 
28
29
  ## Installation
29
30
 
30
31
  To install using [Bundler][bundler] grab the latest stable version:
31
32
 
32
33
  ```ruby
33
- gem 'twilio-ruby', '~> 5.29.1'
34
+ gem 'twilio-ruby', '~> 5.30.0'
34
35
  ```
35
36
 
36
37
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
37
38
 
38
39
  ```bash
39
- gem install twilio-ruby -v 5.29.1
40
+ gem install twilio-ruby -v 5.30.0
40
41
  ```
41
42
 
42
43
  To build and install the development branch yourself from the latest source:
@@ -47,24 +48,6 @@ cd twilio-ruby
47
48
  make install
48
49
  ```
49
50
 
50
- ## Versions
51
-
52
- `twilio-ruby` uses a modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.
53
-
54
- ### Migration from 4.x
55
-
56
- [Upgrade Guide][upgrade]
57
-
58
- ## Docker Image
59
-
60
- The `Dockerfile` present in this repository and its respective `twilio/twilio-ruby` Docker image are currently used by Twilio for testing purposes only.
61
-
62
- ## Getting help
63
-
64
- If you need help installing or using the library, please check the [Twilio Support Help Center](https://support.twilio.com) first, and [file a support ticket](https://twilio.com/help/contact) if you don't find an answer to your question.
65
-
66
- If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
67
-
68
51
  ## Getting Started
69
52
 
70
53
  ### Setup Work
@@ -192,13 +175,15 @@ This will print the following (except for the whitespace):
192
175
  </Response>
193
176
  ```
194
177
 
195
- ## Supported Ruby Versions
178
+ ## Docker Image
179
+
180
+ The `Dockerfile` present in this repository and its respective `twilio/twilio-ruby` Docker image are currently used by Twilio for testing purposes only.
196
181
 
197
- This library supports and is [tested against][travis] the following Ruby implementations:
182
+ ## Getting help
198
183
 
199
- - Ruby 2.6.X
200
- - Ruby 2.5.X
201
- - Ruby 2.4.X
184
+ If you need help installing or using the library, please check the [Twilio Support Help Center](https://support.twilio.com) first, and [file a support ticket](https://twilio.com/help/contact) if you don't find an answer to your question.
185
+
186
+ If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
202
187
 
203
188
  [apidocs]: https://www.twilio.com/docs/api
204
189
  [twiml]: https://www.twilio.com/docs/api/twiml
@@ -11,10 +11,8 @@ module Twilio
11
11
  def initialize(proxy_prot = nil, proxy_addr = nil, proxy_port = nil, proxy_user = nil, proxy_pass = nil,
12
12
  ssl_ca_file = nil, timeout: nil)
13
13
  @proxy_prot = proxy_prot
14
- @proxy_addr = proxy_addr
15
- @proxy_port = proxy_port
16
- @proxy_user = proxy_user
17
- @proxy_pass = proxy_pass
14
+ @proxy_path = "#{proxy_addr}:#{proxy_port}" if proxy_addr && proxy_port
15
+ @proxy_auth = "#{proxy_user}:#{proxy_pass}@" if proxy_pass && proxy_user
18
16
  @ssl_ca_file = ssl_ca_file
19
17
  @timeout = timeout
20
18
  @adapter = Faraday.default_adapter
@@ -27,9 +25,7 @@ module Twilio
27
25
  f.adapter @adapter
28
26
  f.headers = request.headers
29
27
  f.basic_auth(request.auth[0], request.auth[1])
30
- if @proxy_addr
31
- f.proxy = "#{@proxy_prot}://#{@proxy_user}:#{@proxy_pass}@#{@proxy_addr}:#{@proxy_port}"
32
- end
28
+ f.proxy = "#{@proxy_prot}://#{@proxy_auth}#{@proxy_path}" if @proxy_prot && @proxy_path
33
29
  f.options.open_timeout = request.timeout || @timeout
34
30
  f.options.timeout = request.timeout || @timeout
35
31
  end
@@ -199,6 +199,13 @@ module Twilio
199
199
  )
200
200
  end
201
201
 
202
+ ##
203
+ # Deletes the UserChannelInstance
204
+ # @return [Boolean] true if delete succeeds, false otherwise
205
+ def delete
206
+ @version.delete('delete', @uri)
207
+ end
208
+
202
209
  ##
203
210
  # Update the UserChannelInstance
204
211
  # @param [user_channel.NotificationLevel] notification_level The push notification
@@ -369,6 +376,13 @@ module Twilio
369
376
  context.fetch
370
377
  end
371
378
 
379
+ ##
380
+ # Deletes the UserChannelInstance
381
+ # @return [Boolean] true if delete succeeds, false otherwise
382
+ def delete
383
+ context.delete
384
+ end
385
+
372
386
  ##
373
387
  # Update the UserChannelInstance
374
388
  # @param [user_channel.NotificationLevel] notification_level The push notification
@@ -210,13 +210,17 @@ module Twilio
210
210
  # store any data you wish. The string value must contain structurally valid JSON
211
211
  # if specified. **Note** that if the attributes are not set "{}" will be
212
212
  # returned.
213
+ # @param [String] messaging_service_sid The unique id of the [SMS
214
+ # Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs
215
+ # to.
213
216
  # @return [ConversationInstance] Updated ConversationInstance
214
- def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
217
+ def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_service_sid: :unset)
215
218
  data = Twilio::Values.of({
216
219
  'FriendlyName' => friendly_name,
217
220
  'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
218
221
  'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
219
222
  'Attributes' => attributes,
223
+ 'MessagingServiceSid' => messaging_service_sid,
220
224
  })
221
225
 
222
226
  payload = @version.update(
@@ -432,13 +436,17 @@ module Twilio
432
436
  # store any data you wish. The string value must contain structurally valid JSON
433
437
  # if specified. **Note** that if the attributes are not set "{}" will be
434
438
  # returned.
439
+ # @param [String] messaging_service_sid The unique id of the [SMS
440
+ # Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs
441
+ # to.
435
442
  # @return [ConversationInstance] Updated ConversationInstance
436
- def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
443
+ def update(friendly_name: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, messaging_service_sid: :unset)
437
444
  context.update(
438
445
  friendly_name: friendly_name,
439
446
  date_created: date_created,
440
447
  date_updated: date_updated,
441
448
  attributes: attributes,
449
+ messaging_service_sid: messaging_service_sid,
442
450
  )
443
451
  end
444
452
 
@@ -199,6 +199,13 @@ module Twilio
199
199
  )
200
200
  end
201
201
 
202
+ ##
203
+ # Deletes the UserChannelInstance
204
+ # @return [Boolean] true if delete succeeds, false otherwise
205
+ def delete
206
+ @version.delete('delete', @uri)
207
+ end
208
+
202
209
  ##
203
210
  # Update the UserChannelInstance
204
211
  # @param [user_channel.NotificationLevel] notification_level The push notification
@@ -369,6 +376,13 @@ module Twilio
369
376
  context.fetch
370
377
  end
371
378
 
379
+ ##
380
+ # Deletes the UserChannelInstance
381
+ # @return [Boolean] true if delete succeeds, false otherwise
382
+ def delete
383
+ context.delete
384
+ end
385
+
372
386
  ##
373
387
  # Update the UserChannelInstance
374
388
  # @param [user_channel.NotificationLevel] notification_level The push notification
@@ -290,8 +290,11 @@ module Twilio
290
290
  # `false` and the default is `true`.
291
291
  # @param [String] alexa_skill_id Deprecated.
292
292
  # @param [String] default_alexa_notification_protocol_version Deprecated.
293
+ # @param [String] delivery_callback_url URL to send delivery status callback.
294
+ # @param [Boolean] delivery_callback_enabled Callback configuration that enables
295
+ # delivery callbacks, default false
293
296
  # @return [ServiceInstance] Updated ServiceInstance
294
- def update(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset)
297
+ def update(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset, delivery_callback_url: :unset, delivery_callback_enabled: :unset)
295
298
  data = Twilio::Values.of({
296
299
  'FriendlyName' => friendly_name,
297
300
  'ApnCredentialSid' => apn_credential_sid,
@@ -305,6 +308,8 @@ module Twilio
305
308
  'LogEnabled' => log_enabled,
306
309
  'AlexaSkillId' => alexa_skill_id,
307
310
  'DefaultAlexaNotificationProtocolVersion' => default_alexa_notification_protocol_version,
311
+ 'DeliveryCallbackUrl' => delivery_callback_url,
312
+ 'DeliveryCallbackEnabled' => delivery_callback_enabled,
308
313
  })
309
314
 
310
315
  payload = @version.update(
@@ -568,8 +573,11 @@ module Twilio
568
573
  # `false` and the default is `true`.
569
574
  # @param [String] alexa_skill_id Deprecated.
570
575
  # @param [String] default_alexa_notification_protocol_version Deprecated.
576
+ # @param [String] delivery_callback_url URL to send delivery status callback.
577
+ # @param [Boolean] delivery_callback_enabled Callback configuration that enables
578
+ # delivery callbacks, default false
571
579
  # @return [ServiceInstance] Updated ServiceInstance
572
- def update(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset)
580
+ def update(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset, delivery_callback_url: :unset, delivery_callback_enabled: :unset)
573
581
  context.update(
574
582
  friendly_name: friendly_name,
575
583
  apn_credential_sid: apn_credential_sid,
@@ -583,6 +591,8 @@ module Twilio
583
591
  log_enabled: log_enabled,
584
592
  alexa_skill_id: alexa_skill_id,
585
593
  default_alexa_notification_protocol_version: default_alexa_notification_protocol_version,
594
+ delivery_callback_url: delivery_callback_url,
595
+ delivery_callback_enabled: delivery_callback_enabled,
586
596
  )
587
597
  end
588
598
 
@@ -107,6 +107,7 @@ module Twilio
107
107
  # Multiple `to_binding` parameters can be included but the total size of the
108
108
  # request entity should not exceed 1MB. This is typically sufficient for 10,000
109
109
  # phone numbers.
110
+ # @param [String] delivery_callback_url URL to send webhooks.
110
111
  # @param [String] identity The `identity` value that uniquely identifies the new
111
112
  # resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within
112
113
  # the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery
@@ -118,7 +119,7 @@ module Twilio
118
119
  # the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are
119
120
  # available to notify all Bindings in a specific channel.
120
121
  # @return [NotificationInstance] Newly created NotificationInstance
121
- def create(body: :unset, priority: :unset, ttl: :unset, title: :unset, sound: :unset, action: :unset, data: :unset, apn: :unset, gcm: :unset, sms: :unset, facebook_messenger: :unset, fcm: :unset, segment: :unset, alexa: :unset, to_binding: :unset, identity: :unset, tag: :unset)
122
+ def create(body: :unset, priority: :unset, ttl: :unset, title: :unset, sound: :unset, action: :unset, data: :unset, apn: :unset, gcm: :unset, sms: :unset, facebook_messenger: :unset, fcm: :unset, segment: :unset, alexa: :unset, to_binding: :unset, delivery_callback_url: :unset, identity: :unset, tag: :unset)
122
123
  data = Twilio::Values.of({
123
124
  'Identity' => Twilio.serialize_list(identity) { |e| e },
124
125
  'Tag' => Twilio.serialize_list(tag) { |e| e },
@@ -137,6 +138,7 @@ module Twilio
137
138
  'Segment' => Twilio.serialize_list(segment) { |e| e },
138
139
  'Alexa' => Twilio.serialize_object(alexa),
139
140
  'ToBinding' => Twilio.serialize_list(to_binding) { |e| e },
141
+ 'DeliveryCallbackUrl' => delivery_callback_url,
140
142
  })
141
143
 
142
144
  payload = @version.create(
@@ -18,7 +18,7 @@ module Twilio
18
18
  ##
19
19
  # Initialize the AssetVersionList
20
20
  # @param [Version] version Version that contains the resource
21
- # @param [String] service_sid The SID of the Service that the AssetVersion
21
+ # @param [String] service_sid The SID of the Service that the Asset Version
22
22
  # resource is associated with.
23
23
  # @param [String] asset_sid The SID of the Asset resource that is the parent of
24
24
  # the asset version.
@@ -162,11 +162,11 @@ module Twilio
162
162
  ##
163
163
  # Initialize the AssetVersionContext
164
164
  # @param [Version] version Version that contains the resource
165
- # @param [String] service_sid The SID of the Service to fetch the AssetVersion
165
+ # @param [String] service_sid The SID of the Service to fetch the Asset Version
166
166
  # resource from.
167
167
  # @param [String] asset_sid The SID of the Asset resource that is the parent of
168
- # the AssetVersion resource to fetch.
169
- # @param [String] sid The SID of the AssetVersion resource to fetch.
168
+ # the Asset Version resource to fetch.
169
+ # @param [String] sid The SID of the Asset Version resource to fetch.
170
170
  # @return [AssetVersionContext] AssetVersionContext
171
171
  def initialize(version, service_sid, asset_sid, sid)
172
172
  super(version)
@@ -219,11 +219,11 @@ module Twilio
219
219
  # Initialize the AssetVersionInstance
220
220
  # @param [Version] version Version that contains the resource
221
221
  # @param [Hash] payload payload that contains response from Twilio
222
- # @param [String] service_sid The SID of the Service that the AssetVersion
222
+ # @param [String] service_sid The SID of the Service that the Asset Version
223
223
  # resource is associated with.
224
224
  # @param [String] asset_sid The SID of the Asset resource that is the parent of
225
225
  # the asset version.
226
- # @param [String] sid The SID of the AssetVersion resource to fetch.
226
+ # @param [String] sid The SID of the Asset Version resource to fetch.
227
227
  # @return [AssetVersionInstance] AssetVersionInstance
228
228
  def initialize(version, payload, service_sid: nil, asset_sid: nil, sid: nil)
229
229
  super(version)
@@ -266,19 +266,19 @@ module Twilio
266
266
  end
267
267
 
268
268
  ##
269
- # @return [String] The unique string that identifies the AssetVersion resource
269
+ # @return [String] The unique string that identifies the Asset Version resource
270
270
  def sid
271
271
  @properties['sid']
272
272
  end
273
273
 
274
274
  ##
275
- # @return [String] The SID of the Account that created the AssetVersion resource
275
+ # @return [String] The SID of the Account that created the Asset Version resource
276
276
  def account_sid
277
277
  @properties['account_sid']
278
278
  end
279
279
 
280
280
  ##
281
- # @return [String] The SID of the Service that the AssetVersion resource is associated with
281
+ # @return [String] The SID of the Service that the Asset Version resource is associated with
282
282
  def service_sid
283
283
  @properties['service_sid']
284
284
  end
@@ -302,13 +302,13 @@ module Twilio
302
302
  end
303
303
 
304
304
  ##
305
- # @return [Time] The ISO 8601 date and time in GMT when the AssetVersion resource was created
305
+ # @return [Time] The ISO 8601 date and time in GMT when the Asset Version resource was created
306
306
  def date_created
307
307
  @properties['date_created']
308
308
  end
309
309
 
310
310
  ##
311
- # @return [String] The absolute URL of the AssetVersion resource
311
+ # @return [String] The absolute URL of the Asset Version resource
312
312
  def url
313
313
  @properties['url']
314
314
  end
@@ -113,8 +113,8 @@ module Twilio
113
113
  ##
114
114
  # Retrieve a single page of BuildInstance records from the API.
115
115
  # Request is executed immediately.
116
- # @param [String] asset_versions The list of AssetVersion resource SIDs to include
117
- # in the build.
116
+ # @param [String] asset_versions The list of Asset Version resource SIDs to
117
+ # include in the build.
118
118
  # @param [String] function_versions The list of the Variable resource SIDs to
119
119
  # include in the build.
120
120
  # @param [String] dependencies A list of objects that describe the Dependencies
@@ -299,13 +299,13 @@ module Twilio
299
299
  end
300
300
 
301
301
  ##
302
- # @return [Hash] The list of AssetVersion resource SIDs that are included in the build
302
+ # @return [Hash] The list of Asset Version resource SIDs that are included in the build
303
303
  def asset_versions
304
304
  @properties['asset_versions']
305
305
  end
306
306
 
307
307
  ##
308
- # @return [Hash] List of the Variable resource SIDs
308
+ # @return [Hash] The list of Function Version resource SIDs that are included in the build
309
309
  def function_versions
310
310
  @properties['function_versions']
311
311
  end
@@ -18,7 +18,7 @@ module Twilio
18
18
  ##
19
19
  # Initialize the FunctionVersionList
20
20
  # @param [Version] version Version that contains the resource
21
- # @param [String] service_sid The SID of the Service that the FunctionVersion
21
+ # @param [String] service_sid The SID of the Service that the Function Version
22
22
  # resource is associated with.
23
23
  # @param [String] function_sid The SID of the function that is the parent of the
24
24
  # function version.
@@ -162,11 +162,11 @@ module Twilio
162
162
  ##
163
163
  # Initialize the FunctionVersionContext
164
164
  # @param [Version] version Version that contains the resource
165
- # @param [String] service_sid The SID of the Service to fetch the FunctionVersion
165
+ # @param [String] service_sid The SID of the Service to fetch the Function Version
166
166
  # resource from.
167
167
  # @param [String] function_sid The SID of the function that is the parent of the
168
- # FunctionVersion resource to fetch.
169
- # @param [String] sid The SID of the FunctionVersion resource to fetch.
168
+ # Function Version resource to fetch.
169
+ # @param [String] sid The SID of the Function Version resource to fetch.
170
170
  # @return [FunctionVersionContext] FunctionVersionContext
171
171
  def initialize(version, service_sid, function_sid, sid)
172
172
  super(version)
@@ -219,11 +219,11 @@ module Twilio
219
219
  # Initialize the FunctionVersionInstance
220
220
  # @param [Version] version Version that contains the resource
221
221
  # @param [Hash] payload payload that contains response from Twilio
222
- # @param [String] service_sid The SID of the Service that the FunctionVersion
222
+ # @param [String] service_sid The SID of the Service that the Function Version
223
223
  # resource is associated with.
224
224
  # @param [String] function_sid The SID of the function that is the parent of the
225
225
  # function version.
226
- # @param [String] sid The SID of the FunctionVersion resource to fetch.
226
+ # @param [String] sid The SID of the Function Version resource to fetch.
227
227
  # @return [FunctionVersionInstance] FunctionVersionInstance
228
228
  def initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil)
229
229
  super(version)
@@ -266,19 +266,19 @@ module Twilio
266
266
  end
267
267
 
268
268
  ##
269
- # @return [String] The unique string that identifies the FunctionVersion resource
269
+ # @return [String] The unique string that identifies the Function Version resource
270
270
  def sid
271
271
  @properties['sid']
272
272
  end
273
273
 
274
274
  ##
275
- # @return [String] The SID of the Account that created the FunctionVersion resource
275
+ # @return [String] The SID of the Account that created the Function Version resource
276
276
  def account_sid
277
277
  @properties['account_sid']
278
278
  end
279
279
 
280
280
  ##
281
- # @return [String] The SID of the Service that the FunctionVersion resource is associated with
281
+ # @return [String] The SID of the Service that the Function Version resource is associated with
282
282
  def service_sid
283
283
  @properties['service_sid']
284
284
  end
@@ -302,13 +302,13 @@ module Twilio
302
302
  end
303
303
 
304
304
  ##
305
- # @return [Time] The ISO 8601 date and time in GMT when the FunctionVersion resource was created
305
+ # @return [Time] The ISO 8601 date and time in GMT when the Function Version resource was created
306
306
  def date_created
307
307
  @properties['date_created']
308
308
  end
309
309
 
310
310
  ##
311
- # @return [String] The absolute URL of the FunctionVersion resource
311
+ # @return [String] The absolute URL of the Function Version resource
312
312
  def url
313
313
  @properties['url']
314
314
  end
@@ -248,14 +248,18 @@ module Twilio
248
248
  # @param [String] task_reservation_timeout How long TaskRouter will wait for a
249
249
  # confirmation response from your application after it assigns a Task to a Worker.
250
250
  # Can be up to `86,400` (24 hours) and the default is `120`.
251
+ # @param [String] re_evaluate_tasks Whether or not to re-evaluate Tasks. The
252
+ # default is `false`, which means Tasks in the Workflow will not be processed
253
+ # through the assignment loop again.
251
254
  # @return [WorkflowInstance] Updated WorkflowInstance
252
- def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, configuration: :unset, task_reservation_timeout: :unset)
255
+ def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, configuration: :unset, task_reservation_timeout: :unset, re_evaluate_tasks: :unset)
253
256
  data = Twilio::Values.of({
254
257
  'FriendlyName' => friendly_name,
255
258
  'AssignmentCallbackUrl' => assignment_callback_url,
256
259
  'FallbackAssignmentCallbackUrl' => fallback_assignment_callback_url,
257
260
  'Configuration' => configuration,
258
261
  'TaskReservationTimeout' => task_reservation_timeout,
262
+ 'ReEvaluateTasks' => re_evaluate_tasks,
259
263
  })
260
264
 
261
265
  payload = @version.update(
@@ -466,14 +470,18 @@ module Twilio
466
470
  # @param [String] task_reservation_timeout How long TaskRouter will wait for a
467
471
  # confirmation response from your application after it assigns a Task to a Worker.
468
472
  # Can be up to `86,400` (24 hours) and the default is `120`.
473
+ # @param [String] re_evaluate_tasks Whether or not to re-evaluate Tasks. The
474
+ # default is `false`, which means Tasks in the Workflow will not be processed
475
+ # through the assignment loop again.
469
476
  # @return [WorkflowInstance] Updated WorkflowInstance
470
- def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, configuration: :unset, task_reservation_timeout: :unset)
477
+ def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assignment_callback_url: :unset, configuration: :unset, task_reservation_timeout: :unset, re_evaluate_tasks: :unset)
471
478
  context.update(
472
479
  friendly_name: friendly_name,
473
480
  assignment_callback_url: assignment_callback_url,
474
481
  fallback_assignment_callback_url: fallback_assignment_callback_url,
475
482
  configuration: configuration,
476
483
  task_reservation_timeout: task_reservation_timeout,
484
+ re_evaluate_tasks: re_evaluate_tasks,
477
485
  )
478
486
  end
479
487
 
@@ -34,8 +34,8 @@ module Twilio
34
34
  # Request is executed immediately.
35
35
  # @param [String] to The phone number or email to verify. Phone numbers must be in
36
36
  # [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
37
- # @param [String] channel The verification method to use. Can be: `email`, `sms`
38
- # or `call`.
37
+ # @param [String] channel The verification method to use. Can be:
38
+ # `email`([*])[#email-channel-availability], `sms` or `call`.
39
39
  # @param [String] custom_message The text of a custom message to use for the
40
40
  # verification.
41
41
  # @param [String] send_digits The digits to send after a phone call is answered,
@@ -271,7 +271,7 @@ module Twilio
271
271
  end
272
272
 
273
273
  ##
274
- # @return [verification.Channel] The verification method to use
274
+ # @return [verification.Channel] The verification method used.
275
275
  def channel
276
276
  @properties['channel']
277
277
  end
@@ -36,7 +36,7 @@ module Twilio
36
36
  # The default is the current time.
37
37
  # @param [Time] start Only include usage that has occurred on or after this date,
38
38
  # specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
39
- # The default is on month before the `end` parameter value.
39
+ # The default is one month before the `end` parameter value.
40
40
  # @param [usage_record.Granularity] granularity How to summarize the usage by
41
41
  # time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of
42
42
  # `all` returns one Usage Record that describes the usage for the entire period.
@@ -66,7 +66,7 @@ module Twilio
66
66
  # The default is the current time.
67
67
  # @param [Time] start Only include usage that has occurred on or after this date,
68
68
  # specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
69
- # The default is on month before the `end` parameter value.
69
+ # The default is one month before the `end` parameter value.
70
70
  # @param [usage_record.Granularity] granularity How to summarize the usage by
71
71
  # time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of
72
72
  # `all` returns one Usage Record that describes the usage for the entire period.
@@ -107,7 +107,7 @@ module Twilio
107
107
  # The default is the current time.
108
108
  # @param [Time] start Only include usage that has occurred on or after this date,
109
109
  # specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
110
- # The default is on month before the `end` parameter value.
110
+ # The default is one month before the `end` parameter value.
111
111
  # @param [usage_record.Granularity] granularity How to summarize the usage by
112
112
  # time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of
113
113
  # `all` returns one Usage Record that describes the usage for the entire period.
@@ -22,9 +22,12 @@ module Twilio
22
22
  # Create a new <Receive> element
23
23
  # action:: Receive action URL
24
24
  # method:: Receive action URL method
25
+ # media_type:: The media type used to store media in the fax media store
26
+ # page_size:: What size to interpret received pages as
27
+ # store_media:: Whether or not to store received media in the fax media store
25
28
  # keyword_args:: additional attributes
26
- def receive(action: nil, method: nil, **keyword_args)
27
- append(Receive.new(action: action, method: method, **keyword_args))
29
+ def receive(action: nil, method: nil, media_type: nil, page_size: nil, store_media: nil, **keyword_args)
30
+ append(Receive.new(action: action, method: method, media_type: media_type, page_size: page_size, store_media: store_media, **keyword_args))
28
31
  end
29
32
  end
30
33
 
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.29.1'
2
+ VERSION = '5.30.0'
3
3
  end
@@ -142,6 +142,36 @@ describe 'UserChannel' do
142
142
  expect(actual).to_not eq(nil)
143
143
  end
144
144
 
145
+ it "can delete" do
146
+ @holodeck.mock(Twilio::Response.new(500, ''))
147
+
148
+ expect {
149
+ @client.chat.v2.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
150
+ .users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
151
+ .user_channels('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
152
+ }.to raise_exception(Twilio::REST::TwilioError)
153
+
154
+ values = {}
155
+ expect(
156
+ @holodeck.has_request?(Holodeck::Request.new(
157
+ method: 'delete',
158
+ url: 'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
159
+ ))).to eq(true)
160
+ end
161
+
162
+ it "receives delete responses" do
163
+ @holodeck.mock(Twilio::Response.new(
164
+ 204,
165
+ nil,
166
+ ))
167
+
168
+ actual = @client.chat.v2.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
169
+ .users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
170
+ .user_channels('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
171
+
172
+ expect(actual).to eq(true)
173
+ end
174
+
145
175
  it "can update" do
146
176
  @holodeck.mock(Twilio::Response.new(500, ''))
147
177
 
@@ -75,7 +75,7 @@ describe 'Conversation' do
75
75
  "sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
76
76
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
77
77
  "chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
78
- "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
78
+ "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
79
79
  "friendly_name": "friendly_name",
80
80
  "attributes": "{ \\"topic\\": \\"feedback\\" }",
81
81
  "date_created": "2015-12-16T22:18:37Z",
@@ -142,6 +142,36 @@ describe 'UserChannel' do
142
142
  expect(actual).to_not eq(nil)
143
143
  end
144
144
 
145
+ it "can delete" do
146
+ @holodeck.mock(Twilio::Response.new(500, ''))
147
+
148
+ expect {
149
+ @client.ip_messaging.v2.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
150
+ .users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
151
+ .user_channels('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
152
+ }.to raise_exception(Twilio::REST::TwilioError)
153
+
154
+ values = {}
155
+ expect(
156
+ @holodeck.has_request?(Holodeck::Request.new(
157
+ method: 'delete',
158
+ url: 'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
159
+ ))).to eq(true)
160
+ end
161
+
162
+ it "receives delete responses" do
163
+ @holodeck.mock(Twilio::Response.new(
164
+ 204,
165
+ nil,
166
+ ))
167
+
168
+ actual = @client.ip_messaging.v2.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
169
+ .users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
170
+ .user_channels('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
171
+
172
+ expect(actual).to eq(true)
173
+ end
174
+
145
175
  it "can update" do
146
176
  @holodeck.mock(Twilio::Response.new(500, ''))
147
177
 
@@ -46,6 +46,8 @@ describe 'Service' do
46
46
  "default_alexa_notification_protocol_version": "3",
47
47
  "log_enabled": true,
48
48
  "type": "S",
49
+ "delivery_callback_url": "Hello",
50
+ "delivery_callback_enabled": true,
49
51
  "url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
50
52
  "links": {
51
53
  "bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
@@ -125,6 +127,8 @@ describe 'Service' do
125
127
  "default_alexa_notification_protocol_version": "3",
126
128
  "log_enabled": true,
127
129
  "type": "S",
130
+ "delivery_callback_url": "Hello",
131
+ "delivery_callback_enabled": true,
128
132
  "url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
129
133
  "links": {
130
134
  "bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
@@ -189,6 +193,8 @@ describe 'Service' do
189
193
  "default_alexa_notification_protocol_version": "3",
190
194
  "log_enabled": true,
191
195
  "type": "S",
196
+ "delivery_callback_url": "Hello",
197
+ "delivery_callback_enabled": true,
192
198
  "url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193
199
  "links": {
194
200
  "bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
@@ -268,6 +274,8 @@ describe 'Service' do
268
274
  "facebook_messenger_page_id": "4",
269
275
  "log_enabled": true,
270
276
  "type": "S",
277
+ "delivery_callback_url": "Hello",
278
+ "delivery_callback_enabled": true,
271
279
  "url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
272
280
  "links": {
273
281
  "bindings": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
@@ -155,14 +155,13 @@ describe 'Workflow' do
155
155
  %q[
156
156
  {
157
157
  "meta": {
158
- "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0",
158
+ "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0",
159
159
  "key": "workflows",
160
- "last_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0",
161
160
  "next_page_url": null,
162
161
  "page": 0,
163
162
  "page_size": 50,
164
163
  "previous_page_url": null,
165
- "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0"
164
+ "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0"
166
165
  },
167
166
  "workflows": [
168
167
  {
@@ -201,14 +200,13 @@ describe 'Workflow' do
201
200
  %q[
202
201
  {
203
202
  "meta": {
204
- "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0",
203
+ "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0",
205
204
  "key": "workflows",
206
- "last_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0",
207
205
  "next_page_url": null,
208
206
  "page": 0,
209
207
  "page_size": 50,
210
208
  "previous_page_url": null,
211
- "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0"
209
+ "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?FriendlyName=friendly_name&PageSize=50&Page=0"
212
210
  },
213
211
  "workflows": []
214
212
  }
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.29.1
4
+ version: 5.30.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: 2019-11-13 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -134,7 +134,6 @@ files:
134
134
  - ISSUE_TEMPLATE.md
135
135
  - LICENSE.md
136
136
  - Makefile
137
- - PULL_REQUEST_TEMPLATE.md
138
137
  - README.md
139
138
  - Rakefile
140
139
  - UPGRADE.md
@@ -1,4 +0,0 @@
1
- Please ensure the following steps have been run before submitting this pull request:
2
-
3
- - [ ] Run `make test` and ensure it passes locally
4
- - [ ] Run `make lint` to appease Rubocop