twilio-ruby 5.28.0 → 5.29.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.
Files changed (63) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +11 -6
  3. data/CHANGES.md +33 -0
  4. data/README.md +3 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +18 -20
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +7 -6
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +7 -6
  8. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +0 -14
  10. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +6 -4
  12. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -6
  13. data/lib/twilio-ruby/rest/authy.rb +8 -8
  14. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  15. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +6 -3
  16. data/lib/twilio-ruby/rest/flex_api.rb +15 -15
  17. data/lib/twilio-ruby/rest/flex_api/v1.rb +20 -20
  18. data/lib/twilio-ruby/rest/messaging.rb +9 -9
  19. data/lib/twilio-ruby/rest/messaging/v1.rb +13 -13
  20. data/lib/twilio-ruby/rest/preview.rb +20 -20
  21. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +38 -0
  22. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +298 -0
  23. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +232 -0
  24. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  25. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +14 -14
  26. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +40 -5
  27. data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +7 -7
  28. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +51 -51
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +10 -10
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +96 -19
  31. data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
  32. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +8 -2
  33. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +10 -6
  34. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +10 -6
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +271 -176
  36. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +282 -137
  37. data/lib/twilio-ruby/rest/video.rb +9 -9
  38. data/lib/twilio-ruby/rest/video/v1.rb +15 -15
  39. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +2 -1
  40. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +9 -7
  41. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +3 -3
  42. data/lib/twilio-ruby/rest/wireless.rb +6 -6
  43. data/lib/twilio-ruby/rest/wireless/v1.rb +8 -8
  44. data/lib/twilio-ruby/rest/wireless/v1/command.rb +5 -4
  45. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -5
  46. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +114 -98
  47. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +4 -4
  48. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +16 -10
  49. data/lib/twilio-ruby/security/request_validator.rb +61 -8
  50. data/lib/twilio-ruby/version.rb +1 -1
  51. data/spec/integration/api/v2010/account/message_spec.rb +4 -4
  52. data/spec/integration/api/v2010/account/notification_spec.rb +0 -28
  53. data/spec/integration/conversations/v1/conversation/participant_spec.rb +27 -0
  54. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +129 -0
  55. data/spec/integration/preview/bulk_exports/export/job_spec.rb +77 -0
  56. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +6 -1
  57. data/spec/integration/preview/trusted_comms/cps_spec.rb +1 -1
  58. data/spec/integration/preview/trusted_comms/current_call_spec.rb +10 -10
  59. data/spec/integration/preview/trusted_comms/device_spec.rb +1 -1
  60. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +15 -4
  61. data/spec/integration/wireless/v1/sim_spec.rb +84 -0
  62. data/spec/security/request_validator_spec.rb +41 -0
  63. metadata +9 -4
@@ -120,20 +120,20 @@ module Twilio
120
120
 
121
121
  # Marshaled Properties
122
122
  @properties = {
123
- 'sid' => payload['sid'],
124
- 'from' => payload['from'],
125
- 'to' => payload['to'],
126
- 'status' => payload['status'],
127
- 'reason' => payload['reason'],
128
- 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
129
- 'caller' => payload['caller'],
130
- 'logo' => payload['logo'],
131
123
  'bg_color' => payload['bg_color'],
124
+ 'caller' => payload['caller'],
125
+ 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
132
126
  'font_color' => payload['font_color'],
133
- 'use_case' => payload['use_case'],
127
+ 'from' => payload['from'],
128
+ 'logo' => payload['logo'],
134
129
  'manager' => payload['manager'],
130
+ 'reason' => payload['reason'],
135
131
  'shield_img' => payload['shield_img'],
132
+ 'sid' => payload['sid'],
133
+ 'status' => payload['status'],
134
+ 'to' => payload['to'],
136
135
  'url' => payload['url'],
136
+ 'use_case' => payload['use_case'],
137
137
  }
138
138
 
139
139
  # Context
@@ -153,33 +153,15 @@ module Twilio
153
153
  end
154
154
 
155
155
  ##
156
- # @return [String] A string that uniquely identifies this current phone call.
157
- def sid
158
- @properties['sid']
159
- end
160
-
161
- ##
162
- # @return [String] The originating phone number
163
- def from
164
- @properties['from']
165
- end
166
-
167
- ##
168
- # @return [String] The terminating phone number
169
- def to
170
- @properties['to']
171
- end
172
-
173
- ##
174
- # @return [String] The status of the current phone call
175
- def status
176
- @properties['status']
156
+ # @return [String] Background color of the current phone call
157
+ def bg_color
158
+ @properties['bg_color']
177
159
  end
178
160
 
179
161
  ##
180
- # @return [String] The business reason for this current phone call
181
- def reason
182
- @properties['reason']
162
+ # @return [String] Caller name of the current phone call
163
+ def caller
164
+ @properties['caller']
183
165
  end
184
166
 
185
167
  ##
@@ -189,9 +171,15 @@ module Twilio
189
171
  end
190
172
 
191
173
  ##
192
- # @return [String] Caller name of the current phone call
193
- def caller
194
- @properties['caller']
174
+ # @return [String] Font color of the current phone call
175
+ def font_color
176
+ @properties['font_color']
177
+ end
178
+
179
+ ##
180
+ # @return [String] The originating phone number
181
+ def from
182
+ @properties['from']
195
183
  end
196
184
 
197
185
  ##
@@ -201,33 +189,39 @@ module Twilio
201
189
  end
202
190
 
203
191
  ##
204
- # @return [String] Background color of the current phone call
205
- def bg_color
206
- @properties['bg_color']
192
+ # @return [String] The name of the CPS organization
193
+ def manager
194
+ @properties['manager']
207
195
  end
208
196
 
209
197
  ##
210
- # @return [String] Font color of the current phone call
211
- def font_color
212
- @properties['font_color']
198
+ # @return [String] The business reason for this current phone call
199
+ def reason
200
+ @properties['reason']
213
201
  end
214
202
 
215
203
  ##
216
- # @return [String] The use case for the current phone call
217
- def use_case
218
- @properties['use_case']
204
+ # @return [String] Shield image URL that serves as authenticity proof of the current phone call
205
+ def shield_img
206
+ @properties['shield_img']
219
207
  end
220
208
 
221
209
  ##
222
- # @return [String] The name of the CPS organization
223
- def manager
224
- @properties['manager']
210
+ # @return [String] A string that uniquely identifies this current branded phone call.
211
+ def sid
212
+ @properties['sid']
225
213
  end
226
214
 
227
215
  ##
228
- # @return [String] Shield image URL that serves as authenticity proof of the current phone call
229
- def shield_img
230
- @properties['shield_img']
216
+ # @return [String] The status of the current phone call
217
+ def status
218
+ @properties['status']
219
+ end
220
+
221
+ ##
222
+ # @return [String] The terminating phone number
223
+ def to
224
+ @properties['to']
231
225
  end
232
226
 
233
227
  ##
@@ -236,6 +230,12 @@ module Twilio
236
230
  @properties['url']
237
231
  end
238
232
 
233
+ ##
234
+ # @return [String] The use case for the current phone call
235
+ def use_case
236
+ @properties['use_case']
237
+ end
238
+
239
239
  ##
240
240
  # Fetch a CurrentCallInstance
241
241
  # @return [CurrentCallInstance] Fetched CurrentCallInstance
@@ -29,8 +29,8 @@ module Twilio
29
29
  # Retrieve a single page of DeviceInstance records from the API.
30
30
  # Request is executed immediately.
31
31
  # @param [String] phone_number The end user Phone Number linked to the device,
32
- # given in [E.164 format](https://en.wikipedia.org/wiki/E.164). The SDK or partner
33
- # app is responsible of verifying this phone number veracity.
32
+ # given in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). The SDK
33
+ # or partner app is responsible of verifying this phone number veracity.
34
34
  # @param [String] push_token The Push Token for this Phone Number, linked to the
35
35
  # correct SDK's application, certificate and keys.
36
36
  # @return [DeviceInstance] Newly created DeviceInstance
@@ -97,17 +97,17 @@ module Twilio
97
97
 
98
98
  # Marshaled Properties
99
99
  @properties = {
100
- 'sid' => payload['sid'],
101
- 'phone_number' => payload['phone_number'],
102
100
  'binding_sid' => payload['binding_sid'],
101
+ 'phone_number' => payload['phone_number'],
102
+ 'sid' => payload['sid'],
103
103
  'url' => payload['url'],
104
104
  }
105
105
  end
106
106
 
107
107
  ##
108
- # @return [String] A string that uniquely identifies this Device.
109
- def sid
110
- @properties['sid']
108
+ # @return [String] Binding Sid.
109
+ def binding_sid
110
+ @properties['binding_sid']
111
111
  end
112
112
 
113
113
  ##
@@ -117,9 +117,9 @@ module Twilio
117
117
  end
118
118
 
119
119
  ##
120
- # @return [String] Binding Sid.
121
- def binding_sid
122
- @properties['binding_sid']
120
+ # @return [String] A string that uniquely identifies this Device.
121
+ def sid
122
+ @properties['sid']
123
123
  end
124
124
 
125
125
  ##
@@ -29,11 +29,11 @@ module Twilio
29
29
  # Retrieve a single page of PhoneCallInstance records from the API.
30
30
  # Request is executed immediately.
31
31
  # @param [String] from The phone number to use as the caller id, given in [E.164
32
- # format](https://en.wikipedia.org/wiki/E.164). It must be a Twilio number that
33
- # has been set up as a Branded Number in the Business Profile section for your
34
- # account.
32
+ # format](https://www.twilio.com/docs/glossary/what-e164). It must be a Twilio
33
+ # number that has been set up as a Branded Number in the Business Profile section
34
+ # for your account.
35
35
  # @param [String] to The terminating Phone Number, given in [E.164
36
- # format](https://en.wikipedia.org/wiki/E.164).
36
+ # format](https://www.twilio.com/docs/glossary/what-e164).
37
37
  # @param [String] reason The business reason for this phone call that will appear
38
38
  # in the terminating device's screen. Max 50 characters.
39
39
  # @param [String] application_sid Refers to the parameter with the same name when
@@ -200,28 +200,81 @@ module Twilio
200
200
 
201
201
  # Marshaled Properties
202
202
  @properties = {
203
- 'sid' => payload['sid'],
204
203
  'account_sid' => payload['account_sid'],
204
+ 'bg_color' => payload['bg_color'],
205
+ 'brand_sid' => payload['brand_sid'],
206
+ 'branded_channel_sid' => payload['branded_channel_sid'],
207
+ 'business_sid' => payload['business_sid'],
208
+ 'call_sid' => payload['call_sid'],
209
+ 'caller' => payload['caller'],
210
+ 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
211
+ 'font_color' => payload['font_color'],
205
212
  'from' => payload['from'],
206
- 'to' => payload['to'],
213
+ 'logo' => payload['logo'],
214
+ 'phone_number_sid' => payload['phone_number_sid'],
207
215
  'reason' => payload['reason'],
208
- 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
216
+ 'sid' => payload['sid'],
217
+ 'status' => payload['status'],
218
+ 'to' => payload['to'],
209
219
  'url' => payload['url'],
220
+ 'use_case' => payload['use_case'],
210
221
  }
211
222
  end
212
223
 
213
- ##
214
- # @return [String] A string that uniquely identifies this Current Call.
215
- def sid
216
- @properties['sid']
217
- end
218
-
219
224
  ##
220
225
  # @return [String] Account Sid.
221
226
  def account_sid
222
227
  @properties['account_sid']
223
228
  end
224
229
 
230
+ ##
231
+ # @return [String] Background color of the current phone call
232
+ def bg_color
233
+ @properties['bg_color']
234
+ end
235
+
236
+ ##
237
+ # @return [String] Brand Sid.
238
+ def brand_sid
239
+ @properties['brand_sid']
240
+ end
241
+
242
+ ##
243
+ # @return [String] Branded Channel Sid.
244
+ def branded_channel_sid
245
+ @properties['branded_channel_sid']
246
+ end
247
+
248
+ ##
249
+ # @return [String] Business Sid.
250
+ def business_sid
251
+ @properties['business_sid']
252
+ end
253
+
254
+ ##
255
+ # @return [String] A string that uniquely identifies this phone call.
256
+ def call_sid
257
+ @properties['call_sid']
258
+ end
259
+
260
+ ##
261
+ # @return [String] Caller name of the current phone call
262
+ def caller
263
+ @properties['caller']
264
+ end
265
+
266
+ ##
267
+ # @return [Time] The date this Current Call was created
268
+ def created_at
269
+ @properties['created_at']
270
+ end
271
+
272
+ ##
273
+ # @return [String] Font color of the current phone call
274
+ def font_color
275
+ @properties['font_color']
276
+ end
277
+
225
278
  ##
226
279
  # @return [String] The originating Phone Number
227
280
  def from
@@ -229,9 +282,15 @@ module Twilio
229
282
  end
230
283
 
231
284
  ##
232
- # @return [String] The terminating Phone Number
233
- def to
234
- @properties['to']
285
+ # @return [String] Logo URL of the caller
286
+ def logo
287
+ @properties['logo']
288
+ end
289
+
290
+ ##
291
+ # @return [String] Phone Number Sid.
292
+ def phone_number_sid
293
+ @properties['phone_number_sid']
235
294
  end
236
295
 
237
296
  ##
@@ -241,9 +300,21 @@ module Twilio
241
300
  end
242
301
 
243
302
  ##
244
- # @return [Time] The date this Current Call was created
245
- def created_at
246
- @properties['created_at']
303
+ # @return [String] A string that uniquely identifies this current branded phone call.
304
+ def sid
305
+ @properties['sid']
306
+ end
307
+
308
+ ##
309
+ # @return [String] The status of the current phone call
310
+ def status
311
+ @properties['status']
312
+ end
313
+
314
+ ##
315
+ # @return [String] The terminating Phone Number
316
+ def to
317
+ @properties['to']
247
318
  end
248
319
 
249
320
  ##
@@ -252,6 +323,12 @@ module Twilio
252
323
  @properties['url']
253
324
  end
254
325
 
326
+ ##
327
+ # @return [String] The use case for the current phone call
328
+ def use_case
329
+ @properties['use_case']
330
+ end
331
+
255
332
  ##
256
333
  # Provide a user friendly representation
257
334
  def to_s
@@ -36,7 +36,7 @@ module Twilio
36
36
  # `false`.
37
37
  # @param [Boolean] acl_enabled Whether token identities in the Service must be
38
38
  # granted access to Sync objects by using the
39
- # [Permissions](https://www.twilio.com/docs/sync/api/permissions) resource.
39
+ # [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
40
40
  # @param [Boolean] reachability_debouncing_enabled Whether every
41
41
  # `endpoint_disconnected` event should occur after a configurable delay. The
42
42
  # default is `false`, where the `endpoint_disconnected` event occurs immediately
@@ -247,7 +247,7 @@ module Twilio
247
247
  # `false`.
248
248
  # @param [Boolean] acl_enabled Whether token identities in the Service must be
249
249
  # granted access to Sync objects by using the
250
- # [Permissions](https://www.twilio.com/docs/sync/api/permissions) resource.
250
+ # [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
251
251
  # @param [Boolean] reachability_debouncing_enabled Whether every
252
252
  # `endpoint_disconnected` event should occur after a configurable delay. The
253
253
  # default is `false`, where the `endpoint_disconnected` event occurs immediately
@@ -525,7 +525,7 @@ module Twilio
525
525
  # `false`.
526
526
  # @param [Boolean] acl_enabled Whether token identities in the Service must be
527
527
  # granted access to Sync objects by using the
528
- # [Permissions](https://www.twilio.com/docs/sync/api/permissions) resource.
528
+ # [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
529
529
  # @param [Boolean] reachability_debouncing_enabled Whether every
530
530
  # `endpoint_disconnected` event should occur after a configurable delay. The
531
531
  # default is `false`, where the `endpoint_disconnected` event occurs immediately
@@ -210,9 +210,12 @@ module Twilio
210
210
 
211
211
  ##
212
212
  # Update the DocumentPermissionInstance
213
- # @param [Boolean] read Whether the identity can read the Sync Document.
213
+ # @param [Boolean] read Whether the identity can read the Sync Document. Default
214
+ # value is `false`.
214
215
  # @param [Boolean] write Whether the identity can update the Sync Document.
216
+ # Default value is `false`.
215
217
  # @param [Boolean] manage Whether the identity can delete the Sync Document.
218
+ # Default value is `false`.
216
219
  # @return [DocumentPermissionInstance] Updated DocumentPermissionInstance
217
220
  def update(read: nil, write: nil, manage: nil)
218
221
  data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage, })
@@ -366,9 +369,12 @@ module Twilio
366
369
 
367
370
  ##
368
371
  # Update the DocumentPermissionInstance
369
- # @param [Boolean] read Whether the identity can read the Sync Document.
372
+ # @param [Boolean] read Whether the identity can read the Sync Document. Default
373
+ # value is `false`.
370
374
  # @param [Boolean] write Whether the identity can update the Sync Document.
375
+ # Default value is `false`.
371
376
  # @param [Boolean] manage Whether the identity can delete the Sync Document.
377
+ # Default value is `false`.
372
378
  # @return [DocumentPermissionInstance] Updated DocumentPermissionInstance
373
379
  def update(read: nil, write: nil, manage: nil)
374
380
  context.update(read: read, write: write, manage: manage, )
@@ -210,9 +210,11 @@ module Twilio
210
210
  ##
211
211
  # Update the SyncListPermissionInstance
212
212
  # @param [Boolean] read Whether the identity can read the Sync List and its Items.
213
- # @param [Boolean] write Whether the identity can create, update and delete Items
214
- # of the Sync List.
215
- # @param [Boolean] manage Whether the identity can delete the Sync List.
213
+ # Default value is `false`.
214
+ # @param [Boolean] write Whether the identity can create, update, and delete Items
215
+ # in the Sync List. Default value is `false`.
216
+ # @param [Boolean] manage Whether the identity can delete the Sync List. Default
217
+ # value is `false`.
216
218
  # @return [SyncListPermissionInstance] Updated SyncListPermissionInstance
217
219
  def update(read: nil, write: nil, manage: nil)
218
220
  data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage, })
@@ -367,9 +369,11 @@ module Twilio
367
369
  ##
368
370
  # Update the SyncListPermissionInstance
369
371
  # @param [Boolean] read Whether the identity can read the Sync List and its Items.
370
- # @param [Boolean] write Whether the identity can create, update and delete Items
371
- # of the Sync List.
372
- # @param [Boolean] manage Whether the identity can delete the Sync List.
372
+ # Default value is `false`.
373
+ # @param [Boolean] write Whether the identity can create, update, and delete Items
374
+ # in the Sync List. Default value is `false`.
375
+ # @param [Boolean] manage Whether the identity can delete the Sync List. Default
376
+ # value is `false`.
373
377
  # @return [SyncListPermissionInstance] Updated SyncListPermissionInstance
374
378
  def update(read: nil, write: nil, manage: nil)
375
379
  context.update(read: read, write: write, manage: manage, )
@@ -209,9 +209,11 @@ module Twilio
209
209
  ##
210
210
  # Update the SyncMapPermissionInstance
211
211
  # @param [Boolean] read Whether the identity can read the Sync Map and its Items.
212
- # @param [Boolean] write Whether the identity can create, update and delete Items
213
- # of the Sync Map.
214
- # @param [Boolean] manage Whether the identity can delete the Sync Map.
212
+ # Default value is `false`.
213
+ # @param [Boolean] write Whether the identity can create, update, and delete Items
214
+ # in the Sync Map. Default value is `false`.
215
+ # @param [Boolean] manage Whether the identity can delete the Sync Map. Default
216
+ # value is `false`.
215
217
  # @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance
216
218
  def update(read: nil, write: nil, manage: nil)
217
219
  data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage, })
@@ -365,9 +367,11 @@ module Twilio
365
367
  ##
366
368
  # Update the SyncMapPermissionInstance
367
369
  # @param [Boolean] read Whether the identity can read the Sync Map and its Items.
368
- # @param [Boolean] write Whether the identity can create, update and delete Items
369
- # of the Sync Map.
370
- # @param [Boolean] manage Whether the identity can delete the Sync Map.
370
+ # Default value is `false`.
371
+ # @param [Boolean] write Whether the identity can create, update, and delete Items
372
+ # in the Sync Map. Default value is `false`.
373
+ # @param [Boolean] manage Whether the identity can delete the Sync Map. Default
374
+ # value is `false`.
371
375
  # @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance
372
376
  def update(read: nil, write: nil, manage: nil)
373
377
  context.update(read: read, write: write, manage: manage, )