twilio-ruby 5.41.0 → 5.45.1

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 (150) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +99 -0
  3. data/{LICENSE.md → LICENSE} +0 -0
  4. data/PULL_REQUEST_TEMPLATE.md +3 -3
  5. data/README.md +18 -2
  6. data/lib/twilio-ruby.rb +1 -1
  7. data/lib/twilio-ruby/jwt/access_token.rb +7 -2
  8. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
  12. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
  13. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
  14. data/lib/twilio-ruby/rest/client.rb +29 -3
  15. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
  16. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
  17. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
  18. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
  19. data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
  20. data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
  21. data/lib/twilio-ruby/rest/flex_api.rb +1 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
  23. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
  24. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
  25. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
  26. data/lib/twilio-ruby/rest/insights.rb +8 -0
  27. data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
  28. data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
  29. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
  30. data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
  31. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
  32. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
  33. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
  34. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
  35. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
  36. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
  37. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
  38. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
  39. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
  40. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
  41. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
  42. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
  43. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
  44. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
  45. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
  46. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
  47. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
  48. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
  49. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
  50. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
  51. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
  52. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
  53. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
  54. data/lib/twilio-ruby/rest/preview.rb +0 -21
  55. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
  56. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
  57. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
  58. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  59. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  60. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
  62. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  63. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  64. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  65. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  66. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  67. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  68. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  69. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  70. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
  71. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
  72. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
  73. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
  74. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
  75. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
  76. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  77. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  78. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
  79. data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
  80. data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
  81. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
  82. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
  83. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +27 -49
  84. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
  85. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
  86. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  87. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  88. data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
  89. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
  90. data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
  91. data/lib/twilio-ruby/util/configuration.rb +5 -1
  92. data/lib/twilio-ruby/version.rb +1 -1
  93. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  94. data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
  95. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  96. data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
  97. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
  98. data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
  99. data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
  100. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
  101. data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
  102. data/spec/integration/conversations/v1/user_spec.rb +9 -4
  103. data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
  104. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  105. data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
  106. data/spec/integration/insights/v1/room_spec.rb +164 -0
  107. data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
  108. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
  109. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
  110. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
  111. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
  112. data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
  113. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
  114. data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
  115. data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
  116. data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
  117. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
  118. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
  119. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
  120. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
  121. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
  122. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
  123. data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
  124. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
  125. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
  126. data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
  127. data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
  128. data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
  129. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
  130. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
  131. data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
  132. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
  133. data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
  134. data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
  135. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
  136. data/spec/integration/video/v1/room_spec.rb +10 -5
  137. data/spec/jwt/access_token_spec.rb +9 -1
  138. data/spec/rest/client_spec.rb +24 -2
  139. data/twilio-ruby.gemspec +2 -1
  140. metadata +30 -19
  141. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  142. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
  143. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  144. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  145. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  146. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  147. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  148. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  149. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
  150. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -53,6 +53,9 @@ module Twilio
53
53
  # Lists SyncStreamInstance records from the API as a list.
54
54
  # Unlike stream(), this operation is eager and will load `limit` records into
55
55
  # memory before returning.
56
+ # @param [sync_stream.HideExpiredType] hide_expired The default list of Sync
57
+ # Streams will show both active and expired items. It is possible to filter only
58
+ # the active ones by hiding the expired ones.
56
59
  # @param [Integer] limit Upper limit for the number of records to return. stream()
57
60
  # guarantees to never return more than limit. Default is no limit
58
61
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -60,14 +63,17 @@ module Twilio
60
63
  # but a limit is defined, stream() will attempt to read the limit with the most
61
64
  # efficient page size, i.e. min(limit, 1000)
62
65
  # @return [Array] Array of up to limit results
63
- def list(limit: nil, page_size: nil)
64
- self.stream(limit: limit, page_size: page_size).entries
66
+ def list(hide_expired: :unset, limit: nil, page_size: nil)
67
+ self.stream(hide_expired: hide_expired, limit: limit, page_size: page_size).entries
65
68
  end
66
69
 
67
70
  ##
68
71
  # Streams SyncStreamInstance records from the API as an Enumerable.
69
72
  # This operation lazily loads records as efficiently as possible until the limit
70
73
  # is reached.
74
+ # @param [sync_stream.HideExpiredType] hide_expired The default list of Sync
75
+ # Streams will show both active and expired items. It is possible to filter only
76
+ # the active ones by hiding the expired ones.
71
77
  # @param [Integer] limit Upper limit for the number of records to return. stream()
72
78
  # guarantees to never return more than limit. Default is no limit.
73
79
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -75,10 +81,10 @@ module Twilio
75
81
  # but a limit is defined, stream() will attempt to read the limit with the most
76
82
  # efficient page size, i.e. min(limit, 1000)
77
83
  # @return [Enumerable] Enumerable that will yield up to limit results
78
- def stream(limit: nil, page_size: nil)
84
+ def stream(hide_expired: :unset, limit: nil, page_size: nil)
79
85
  limits = @version.read_limits(limit, page_size)
80
86
 
81
- page = self.page(page_size: limits[:page_size], )
87
+ page = self.page(hide_expired: hide_expired, page_size: limits[:page_size], )
82
88
 
83
89
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
84
90
  end
@@ -100,12 +106,16 @@ module Twilio
100
106
  ##
101
107
  # Retrieve a single page of SyncStreamInstance records from the API.
102
108
  # Request is executed immediately.
109
+ # @param [sync_stream.HideExpiredType] hide_expired The default list of Sync
110
+ # Streams will show both active and expired items. It is possible to filter only
111
+ # the active ones by hiding the expired ones.
103
112
  # @param [String] page_token PageToken provided by the API
104
113
  # @param [Integer] page_number Page Number, this value is simply for client state
105
114
  # @param [Integer] page_size Number of records to return, defaults to 50
106
115
  # @return [Page] Page of SyncStreamInstance
107
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
116
+ def page(hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
108
117
  params = Twilio::Values.of({
118
+ 'HideExpired' => hide_expired,
109
119
  'PageToken' => page_token,
110
120
  'Page' => page_number,
111
121
  'PageSize' => page_size,
@@ -31,9 +31,10 @@ module Twilio
31
31
  # memory before returning.
32
32
  # @param [String] priority The priority value of the Tasks to read. Returns the
33
33
  # list of all Tasks in the Workspace with the specified priority.
34
- # @param [String] assignment_status The `assignment_status` of the Tasks to read.
35
- # Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
36
- # all Tasks in the Workspace with the specified `assignment_status`.
34
+ # @param [String] assignment_status The `assignment_status` of the Tasks you want
35
+ # to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or
36
+ # `completed`. Returns all Tasks in the Workspace with the specified
37
+ # `assignment_status`.
37
38
  # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
38
39
  # Returns the Tasks controlled by the Workflow identified by this SID.
39
40
  # @param [String] workflow_name The friendly name of the Workflow with the Tasks
@@ -85,9 +86,10 @@ module Twilio
85
86
  # is reached.
86
87
  # @param [String] priority The priority value of the Tasks to read. Returns the
87
88
  # list of all Tasks in the Workspace with the specified priority.
88
- # @param [String] assignment_status The `assignment_status` of the Tasks to read.
89
- # Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
90
- # all Tasks in the Workspace with the specified `assignment_status`.
89
+ # @param [String] assignment_status The `assignment_status` of the Tasks you want
90
+ # to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or
91
+ # `completed`. Returns all Tasks in the Workspace with the specified
92
+ # `assignment_status`.
91
93
  # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
92
94
  # Returns the Tasks controlled by the Workflow identified by this SID.
93
95
  # @param [String] workflow_name The friendly name of the Workflow with the Tasks
@@ -155,9 +157,10 @@ module Twilio
155
157
  # Request is executed immediately.
156
158
  # @param [String] priority The priority value of the Tasks to read. Returns the
157
159
  # list of all Tasks in the Workspace with the specified priority.
158
- # @param [String] assignment_status The `assignment_status` of the Tasks to read.
159
- # Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
160
- # all Tasks in the Workspace with the specified `assignment_status`.
160
+ # @param [String] assignment_status The `assignment_status` of the Tasks you want
161
+ # to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or
162
+ # `completed`. Returns all Tasks in the Workspace with the specified
163
+ # `assignment_status`.
161
164
  # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
162
165
  # Returns the Tasks controlled by the Workflow identified by this SID.
163
166
  # @param [String] workflow_name The friendly name of the Workflow with the Tasks
@@ -15,8 +15,8 @@ module Twilio
15
15
  ##
16
16
  # Initialize the TaskChannelList
17
17
  # @param [Version] version Version that contains the resource
18
- # @param [String] workspace_sid The SID of the Workspace that contains the
19
- # TaskChannel.
18
+ # @param [String] workspace_sid The SID of the Workspace that contains the Task
19
+ # Channel.
20
20
  # @return [TaskChannelList] TaskChannelList
21
21
  def initialize(version, workspace_sid: nil)
22
22
  super(version)
@@ -109,10 +109,10 @@ module Twilio
109
109
  ##
110
110
  # Create the TaskChannelInstance
111
111
  # @param [String] friendly_name A descriptive string that you create to describe
112
- # the TaskChannel. It can be up to 64 characters long.
112
+ # the Task Channel. It can be up to 64 characters long.
113
113
  # @param [String] unique_name An application-defined string that uniquely
114
- # identifies the TaskChannel, such as `voice` or `sms`.
115
- # @param [Boolean] channel_optimized_routing Whether the TaskChannel should
114
+ # identifies the Task Channel, such as `voice` or `sms`.
115
+ # @param [Boolean] channel_optimized_routing Whether the Task Channel should
116
116
  # prioritize Workers that have been idle. If `true`, Workers that have been idle
117
117
  # the longest are prioritized.
118
118
  # @return [TaskChannelInstance] Created TaskChannelInstance
@@ -168,9 +168,9 @@ module Twilio
168
168
  ##
169
169
  # Initialize the TaskChannelContext
170
170
  # @param [Version] version Version that contains the resource
171
- # @param [String] workspace_sid The SID of the Workspace with the TaskChannel to
171
+ # @param [String] workspace_sid The SID of the Workspace with the Task Channel to
172
172
  # fetch.
173
- # @param [String] sid The SID of the TaskChannel resource to fetch.
173
+ # @param [String] sid The SID of the Task Channel resource to fetch.
174
174
  # @return [TaskChannelContext] TaskChannelContext
175
175
  def initialize(version, workspace_sid, sid)
176
176
  super(version)
@@ -197,7 +197,7 @@ module Twilio
197
197
  ##
198
198
  # Update the TaskChannelInstance
199
199
  # @param [String] friendly_name A descriptive string that you create to describe
200
- # the TaskChannel. It can be up to 64 characters long.
200
+ # the Task Channel. It can be up to 64 characters long.
201
201
  # @param [Boolean] channel_optimized_routing Whether the TaskChannel should
202
202
  # prioritize Workers that have been idle. If `true`, Workers that have been idle
203
203
  # the longest are prioritized.
@@ -245,9 +245,9 @@ module Twilio
245
245
  # Initialize the TaskChannelInstance
246
246
  # @param [Version] version Version that contains the resource
247
247
  # @param [Hash] payload payload that contains response from Twilio
248
- # @param [String] workspace_sid The SID of the Workspace that contains the
249
- # TaskChannel.
250
- # @param [String] sid The SID of the TaskChannel resource to fetch.
248
+ # @param [String] workspace_sid The SID of the Workspace that contains the Task
249
+ # Channel.
250
+ # @param [String] sid The SID of the Task Channel resource to fetch.
251
251
  # @return [TaskChannelInstance] TaskChannelInstance
252
252
  def initialize(version, payload, workspace_sid: nil, sid: nil)
253
253
  super(version)
@@ -313,25 +313,25 @@ module Twilio
313
313
  end
314
314
 
315
315
  ##
316
- # @return [String] An application-defined string that uniquely identifies the TaskChannel
316
+ # @return [String] An application-defined string that uniquely identifies the Task Channel
317
317
  def unique_name
318
318
  @properties['unique_name']
319
319
  end
320
320
 
321
321
  ##
322
- # @return [String] The SID of the Workspace that contains the TaskChannel
322
+ # @return [String] The SID of the Workspace that contains the Task Channel
323
323
  def workspace_sid
324
324
  @properties['workspace_sid']
325
325
  end
326
326
 
327
327
  ##
328
- # @return [Boolean] Whether the TaskChannel will prioritize Workers that have been idle
328
+ # @return [Boolean] Whether the Task Channel will prioritize Workers that have been idle
329
329
  def channel_optimized_routing
330
330
  @properties['channel_optimized_routing']
331
331
  end
332
332
 
333
333
  ##
334
- # @return [String] The absolute URL of the TaskChannel resource
334
+ # @return [String] The absolute URL of the Task Channel resource
335
335
  def url
336
336
  @properties['url']
337
337
  end
@@ -352,7 +352,7 @@ module Twilio
352
352
  ##
353
353
  # Update the TaskChannelInstance
354
354
  # @param [String] friendly_name A descriptive string that you create to describe
355
- # the TaskChannel. It can be up to 64 characters long.
355
+ # the Task Channel. It can be up to 64 characters long.
356
356
  # @param [Boolean] channel_optimized_routing Whether the TaskChannel should
357
357
  # prioritize Workers that have been idle. If `true`, Workers that have been idle
358
358
  # the longest are prioritized.
@@ -15,7 +15,8 @@ module Twilio
15
15
  ##
16
16
  # Initialize the RecordingList
17
17
  # @param [Version] version Version that contains the resource
18
- # @param [String] trunk_sid The trunk_sid
18
+ # @param [String] trunk_sid The unique string that we created to identify the
19
+ # Trunk resource.
19
20
  # @return [RecordingList] RecordingList
20
21
  def initialize(version, trunk_sid: nil)
21
22
  super(version)
@@ -86,9 +87,16 @@ module Twilio
86
87
 
87
88
  ##
88
89
  # Update the RecordingInstance
90
+ # @param [recording.RecordingMode] mode The recording mode for the trunk. Can be
91
+ # do-not-record (default), record-from-ringing, record-from-answer,
92
+ # record-from-ringing-dual, or record-from-answer-dual.
93
+ # @param [recording.RecordingTrim] trim The recording trim setting for the trunk.
94
+ # Can be do-not-trim (default) or trim-silence.
89
95
  # @return [RecordingInstance] Updated RecordingInstance
90
- def update
91
- payload = @version.update('POST', @uri)
96
+ def update(mode: :unset, trim: :unset)
97
+ data = Twilio::Values.of({'Mode' => mode, 'Trim' => trim, })
98
+
99
+ payload = @version.update('POST', @uri, data: data)
92
100
 
93
101
  RecordingInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], )
94
102
  end
@@ -113,18 +121,14 @@ module Twilio
113
121
  # Initialize the RecordingInstance
114
122
  # @param [Version] version Version that contains the resource
115
123
  # @param [Hash] payload payload that contains response from Twilio
116
- # @param [String] trunk_sid The trunk_sid
124
+ # @param [String] trunk_sid The unique string that we created to identify the
125
+ # Trunk resource.
117
126
  # @return [RecordingInstance] RecordingInstance
118
127
  def initialize(version, payload, trunk_sid: nil)
119
128
  super(version)
120
129
 
121
130
  # Marshaled Properties
122
- @properties = {
123
- 'mode' => payload['mode'],
124
- 'trim' => payload['trim'],
125
- 'url' => payload['url'],
126
- 'trunk_sid' => payload['trunk_sid'],
127
- }
131
+ @properties = {'mode' => payload['mode'], 'trim' => payload['trim'], }
128
132
 
129
133
  # Context
130
134
  @instance_context = nil
@@ -154,18 +158,6 @@ module Twilio
154
158
  @properties['trim']
155
159
  end
156
160
 
157
- ##
158
- # @return [String] The url
159
- def url
160
- @properties['url']
161
- end
162
-
163
- ##
164
- # @return [String] The trunk_sid
165
- def trunk_sid
166
- @properties['trunk_sid']
167
- end
168
-
169
161
  ##
170
162
  # Fetch the RecordingInstance
171
163
  # @return [RecordingInstance] Fetched RecordingInstance
@@ -175,9 +167,14 @@ module Twilio
175
167
 
176
168
  ##
177
169
  # Update the RecordingInstance
170
+ # @param [recording.RecordingMode] mode The recording mode for the trunk. Can be
171
+ # do-not-record (default), record-from-ringing, record-from-answer,
172
+ # record-from-ringing-dual, or record-from-answer-dual.
173
+ # @param [recording.RecordingTrim] trim The recording trim setting for the trunk.
174
+ # Can be do-not-trim (default) or trim-silence.
178
175
  # @return [RecordingInstance] Updated RecordingInstance
179
- def update
180
- context.update
176
+ def update(mode: :unset, trim: :unset)
177
+ context.update(mode: mode, trim: trim, )
181
178
  end
182
179
 
183
180
  ##
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Verify < Domain
12
12
  class V2 < Version
13
13
  ##
14
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
14
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
15
  class FormList < ListResource
16
16
  ##
17
17
  # Initialize the FormList
@@ -32,7 +32,7 @@ module Twilio
32
32
  end
33
33
 
34
34
  ##
35
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
35
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
36
36
  class FormPage < Page
37
37
  ##
38
38
  # Initialize the FormPage
@@ -63,7 +63,7 @@ module Twilio
63
63
  end
64
64
 
65
65
  ##
66
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
66
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
67
67
  class FormContext < InstanceContext
68
68
  ##
69
69
  # Initialize the FormContext
@@ -104,7 +104,7 @@ module Twilio
104
104
  end
105
105
 
106
106
  ##
107
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
107
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
108
108
  class FormInstance < InstanceResource
109
109
  ##
110
110
  # Initialize the FormInstance
@@ -26,7 +26,7 @@ module Twilio
26
26
  ##
27
27
  # Create the ServiceInstance
28
28
  # @param [String] friendly_name A descriptive string that you create to describe
29
- # the verification service. It can be up to 64 characters long. **This value
29
+ # the verification service. It can be up to 30 characters long. **This value
30
30
  # should not contain PII.**
31
31
  # @param [String] code_length The length of the verification code to generate.
32
32
  # Must be an integer value between 4 and 10, inclusive.
@@ -241,7 +241,7 @@ module Twilio
241
241
  ##
242
242
  # Update the ServiceInstance
243
243
  # @param [String] friendly_name A descriptive string that you create to describe
244
- # the verification service. It can be up to 64 characters long. **This value
244
+ # the verification service. It can be up to 30 characters long. **This value
245
245
  # should not contain PII.**
246
246
  # @param [String] code_length The length of the verification code to generate.
247
247
  # Must be an integer value between 4 and 10, inclusive.
@@ -584,7 +584,7 @@ module Twilio
584
584
  ##
585
585
  # Update the ServiceInstance
586
586
  # @param [String] friendly_name A descriptive string that you create to describe
587
- # the verification service. It can be up to 64 characters long. **This value
587
+ # the verification service. It can be up to 30 characters long. **This value
588
588
  # should not contain PII.**
589
589
  # @param [String] code_length The length of the verification code to generate.
590
590
  # Must be an integer value between 4 and 10, inclusive.
@@ -12,7 +12,7 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  ##
15
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
16
  class AccessTokenList < ListResource
17
17
  ##
18
18
  # Initialize the AccessTokenList
@@ -52,7 +52,7 @@ module Twilio
52
52
  end
53
53
 
54
54
  ##
55
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
55
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
56
56
  class AccessTokenPage < Page
57
57
  ##
58
58
  # Initialize the AccessTokenPage
@@ -83,7 +83,7 @@ module Twilio
83
83
  end
84
84
 
85
85
  ##
86
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
86
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
87
87
  class AccessTokenInstance < InstanceResource
88
88
  ##
89
89
  # Initialize the AccessTokenInstance
@@ -12,7 +12,7 @@ module Twilio
12
12
  class V2 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  ##
15
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
16
  class EntityList < ListResource
17
17
  ##
18
18
  # Initialize the EntityList
@@ -30,14 +30,14 @@ module Twilio
30
30
  ##
31
31
  # Create the EntityInstance
32
32
  # @param [String] identity The unique external identifier for the Entity of the
33
- # Service
34
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
33
+ # Service. This identifier should be immutable, not PII, length between 8 and 64
34
+ # characters, and generated by your external system, such as your user's UUID,
35
+ # GUID, or SID.
35
36
  # @return [EntityInstance] Created EntityInstance
36
- def create(identity: nil, twilio_sandbox_mode: :unset)
37
+ def create(identity: nil)
37
38
  data = Twilio::Values.of({'Identity' => identity, })
38
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
39
39
 
40
- payload = @version.create('POST', @uri, data: data, headers: headers)
40
+ payload = @version.create('POST', @uri, data: data)
41
41
 
42
42
  EntityInstance.new(@version, payload, service_sid: @solution[:service_sid], )
43
43
  end
@@ -46,7 +46,6 @@ module Twilio
46
46
  # Lists EntityInstance records from the API as a list.
47
47
  # Unlike stream(), this operation is eager and will load `limit` records into
48
48
  # memory before returning.
49
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
50
49
  # @param [Integer] limit Upper limit for the number of records to return. stream()
51
50
  # guarantees to never return more than limit. Default is no limit
52
51
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -54,15 +53,14 @@ module Twilio
54
53
  # but a limit is defined, stream() will attempt to read the limit with the most
55
54
  # efficient page size, i.e. min(limit, 1000)
56
55
  # @return [Array] Array of up to limit results
57
- def list(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
58
- self.stream(twilio_sandbox_mode: twilio_sandbox_mode, limit: limit, page_size: page_size).entries
56
+ def list(limit: nil, page_size: nil)
57
+ self.stream(limit: limit, page_size: page_size).entries
59
58
  end
60
59
 
61
60
  ##
62
61
  # Streams EntityInstance records from the API as an Enumerable.
63
62
  # This operation lazily loads records as efficiently as possible until the limit
64
63
  # is reached.
65
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
66
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
67
65
  # guarantees to never return more than limit. Default is no limit.
68
66
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -70,10 +68,10 @@ module Twilio
70
68
  # but a limit is defined, stream() will attempt to read the limit with the most
71
69
  # efficient page size, i.e. min(limit, 1000)
72
70
  # @return [Enumerable] Enumerable that will yield up to limit results
73
- def stream(twilio_sandbox_mode: :unset, limit: nil, page_size: nil)
71
+ def stream(limit: nil, page_size: nil)
74
72
  limits = @version.read_limits(limit, page_size)
75
73
 
76
- page = self.page(twilio_sandbox_mode: twilio_sandbox_mode, page_size: limits[:page_size], )
74
+ page = self.page(page_size: limits[:page_size], )
77
75
 
78
76
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
79
77
  end
@@ -95,20 +93,18 @@ module Twilio
95
93
  ##
96
94
  # Retrieve a single page of EntityInstance records from the API.
97
95
  # Request is executed immediately.
98
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
99
96
  # @param [String] page_token PageToken provided by the API
100
97
  # @param [Integer] page_number Page Number, this value is simply for client state
101
98
  # @param [Integer] page_size Number of records to return, defaults to 50
102
99
  # @return [Page] Page of EntityInstance
103
- def page(twilio_sandbox_mode: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
100
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
104
101
  params = Twilio::Values.of({
105
102
  'PageToken' => page_token,
106
103
  'Page' => page_number,
107
104
  'PageSize' => page_size,
108
105
  })
109
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
110
106
 
111
- response = @version.page('GET', @uri, params: params, headers: headers)
107
+ response = @version.page('GET', @uri, params: params)
112
108
 
113
109
  EntityPage.new(@version, response, @solution)
114
110
  end
@@ -134,7 +130,7 @@ module Twilio
134
130
  end
135
131
 
136
132
  ##
137
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
133
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
138
134
  class EntityPage < Page
139
135
  ##
140
136
  # Initialize the EntityPage
@@ -165,7 +161,7 @@ module Twilio
165
161
  end
166
162
 
167
163
  ##
168
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
164
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
169
165
  class EntityContext < InstanceContext
170
166
  ##
171
167
  # Initialize the EntityContext
@@ -188,22 +184,16 @@ module Twilio
188
184
 
189
185
  ##
190
186
  # Delete the EntityInstance
191
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
192
187
  # @return [Boolean] true if delete succeeds, false otherwise
193
- def delete(twilio_sandbox_mode: :unset)
194
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
195
-
196
- @version.delete('DELETE', @uri, headers: headers)
188
+ def delete
189
+ @version.delete('DELETE', @uri)
197
190
  end
198
191
 
199
192
  ##
200
193
  # Fetch the EntityInstance
201
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
202
194
  # @return [EntityInstance] Fetched EntityInstance
203
- def fetch(twilio_sandbox_mode: :unset)
204
- headers = Twilio::Values.of({'Twilio-Sandbox-Mode' => twilio_sandbox_mode, })
205
-
206
- payload = @version.fetch('GET', @uri, headers: headers)
195
+ def fetch
196
+ payload = @version.fetch('GET', @uri)
207
197
 
208
198
  EntityInstance.new(
209
199
  @version,
@@ -273,7 +263,7 @@ module Twilio
273
263
  end
274
264
 
275
265
  ##
276
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
266
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
277
267
  class EntityInstance < InstanceResource
278
268
  ##
279
269
  # Initialize the EntityInstance
@@ -364,18 +354,16 @@ module Twilio
364
354
 
365
355
  ##
366
356
  # Delete the EntityInstance
367
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
368
357
  # @return [Boolean] true if delete succeeds, false otherwise
369
- def delete(twilio_sandbox_mode: :unset)
370
- context.delete(twilio_sandbox_mode: twilio_sandbox_mode, )
358
+ def delete
359
+ context.delete
371
360
  end
372
361
 
373
362
  ##
374
363
  # Fetch the EntityInstance
375
- # @param [String] twilio_sandbox_mode The Twilio-Sandbox-Mode HTTP request header
376
364
  # @return [EntityInstance] Fetched EntityInstance
377
- def fetch(twilio_sandbox_mode: :unset)
378
- context.fetch(twilio_sandbox_mode: twilio_sandbox_mode, )
365
+ def fetch
366
+ context.fetch
379
367
  end
380
368
 
381
369
  ##