twilio-ruby 5.40.4 → 5.45.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +104 -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/accounts.rb +12 -0
  9. data/lib/twilio-ruby/rest/accounts/v1.rb +14 -0
  10. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +186 -0
  11. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +200 -0
  12. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
  13. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  14. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
  15. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
  16. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
  17. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
  18. data/lib/twilio-ruby/rest/client.rb +29 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +10 -2
  20. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +13 -3
  21. data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
  22. data/lib/twilio-ruby/rest/insights.rb +8 -0
  23. data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
  24. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
  25. data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
  26. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
  27. data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
  28. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
  29. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
  30. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
  31. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
  32. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
  33. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
  34. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
  35. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
  36. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
  37. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
  38. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
  39. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
  40. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
  41. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
  42. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
  43. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
  44. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
  45. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
  46. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
  47. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
  48. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
  49. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
  50. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
  51. data/lib/twilio-ruby/rest/preview.rb +5 -18
  52. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
  53. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
  54. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +12 -27
  55. data/lib/twilio-ruby/rest/preview/trusted_comms/{business.rb → branded_channel.rb} +63 -77
  56. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +165 -0
  57. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  58. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  59. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  60. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  62. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  63. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  64. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  65. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  66. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  67. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  68. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  69. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
  70. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
  71. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
  72. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
  73. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
  74. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
  75. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  76. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  77. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
  78. data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
  79. data/lib/twilio-ruby/rest/verify/v2/service.rb +54 -33
  80. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
  81. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
  82. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -61
  83. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +59 -57
  84. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
  85. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  86. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  87. data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
  88. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
  89. data/lib/twilio-ruby/twiml/voice_response.rb +7 -4
  90. data/lib/twilio-ruby/util/configuration.rb +5 -1
  91. data/lib/twilio-ruby/version.rb +1 -1
  92. data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +44 -0
  93. data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +69 -0
  94. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  95. data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
  96. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  97. data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
  98. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
  99. data/spec/integration/conversations/v1/conversation_spec.rb +1 -1
  100. data/spec/integration/conversations/v1/service/conversation_spec.rb +1 -1
  101. data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
  102. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  103. data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
  104. data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
  105. data/spec/integration/insights/v1/room_spec.rb +164 -0
  106. data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
  107. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
  108. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
  109. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
  110. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
  111. data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
  112. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
  113. data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
  114. data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
  115. data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
  116. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
  117. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
  118. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
  119. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
  120. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
  121. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
  122. data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
  123. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
  124. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
  125. data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
  126. data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
  127. data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
  128. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
  129. data/spec/integration/preview/trusted_comms/{business/brand/branded_channel → branded_channel}/channel_spec.rb +4 -8
  130. data/spec/integration/preview/trusted_comms/{business/brand/branded_channel_spec.rb → branded_channel_spec.rb} +5 -9
  131. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
  132. data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
  133. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +56 -20
  134. data/spec/integration/verify/v2/service/entity/factor_spec.rb +11 -26
  135. data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
  136. data/spec/integration/verify/v2/service_spec.rb +8 -4
  137. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
  138. data/spec/integration/video/v1/room_spec.rb +10 -5
  139. data/spec/jwt/access_token_spec.rb +9 -1
  140. data/spec/rest/client_spec.rb +24 -2
  141. data/twilio-ruby.gemspec +2 -1
  142. metadata +42 -28
  143. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  144. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +0 -233
  145. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +0 -260
  146. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +0 -189
  147. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  148. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  149. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  150. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  151. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +0 -48
  152. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  153. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  154. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -46
  155. 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.
@@ -47,16 +47,21 @@ module Twilio
47
47
  # @param [Boolean] custom_code_enabled Whether to allow sending verifications with
48
48
  # a custom code instead of a randomly generated one. Not available for all
49
49
  # customers.
50
- # @param [Hash] push Configurations for the Push factors (channel) created under
51
- # this Service. If present, it must be a json string with the following format:
52
- # {"notify_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "include_date":
53
- # true}. If `include_date` is set to `true`, which is the default, that means that
54
- # the push challenge’s response will include the date created value. If
55
- # `include_date` is set to `false`, then the date created value will not be
56
- # included. See {Challenge}[https://www.twilio.com/docs/verify/api/challenge]
57
- # resource’s details parameter for more info
50
+ # @param [Boolean] push_include_date Optional configuration for the Push factors.
51
+ # If true, include the date in the Challenge's reponse. Otherwise, the date is
52
+ # omitted from the response. See
53
+ # {Challenge}[https://www.twilio.com/docs/verify/api/challenge] resource’s details
54
+ # parameter for more info. Default: true
55
+ # @param [String] push_apn_credential_sid Optional configuration for the Push
56
+ # factors. Set the APN Credential for this service. This will allow to send push
57
+ # notifications to iOS devices. See {Credential
58
+ # Resource}[https://www.twilio.com/docs/notify/api/credential-resource]
59
+ # @param [String] push_fcm_credential_sid Optional configuration for the Push
60
+ # factors. Set the FCM Credential for this service. This will allow to send push
61
+ # notifications to Android devices. See {Credential
62
+ # Resource}[https://www.twilio.com/docs/notify/api/credential-resource]
58
63
  # @return [ServiceInstance] Created ServiceInstance
59
- def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push: :unset)
64
+ def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset)
60
65
  data = Twilio::Values.of({
61
66
  'FriendlyName' => friendly_name,
62
67
  'CodeLength' => code_length,
@@ -67,7 +72,9 @@ module Twilio
67
72
  'Psd2Enabled' => psd2_enabled,
68
73
  'DoNotShareWarningEnabled' => do_not_share_warning_enabled,
69
74
  'CustomCodeEnabled' => custom_code_enabled,
70
- 'Push' => Twilio.serialize_object(push),
75
+ 'Push.IncludeDate' => push_include_date,
76
+ 'Push.ApnCredentialSid' => push_apn_credential_sid,
77
+ 'Push.FcmCredentialSid' => push_fcm_credential_sid,
71
78
  })
72
79
 
73
80
  payload = @version.create('POST', @uri, data: data)
@@ -234,7 +241,7 @@ module Twilio
234
241
  ##
235
242
  # Update the ServiceInstance
236
243
  # @param [String] friendly_name A descriptive string that you create to describe
237
- # 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
238
245
  # should not contain PII.**
239
246
  # @param [String] code_length The length of the verification code to generate.
240
247
  # Must be an integer value between 4 and 10, inclusive.
@@ -253,16 +260,21 @@ module Twilio
253
260
  # @param [Boolean] custom_code_enabled Whether to allow sending verifications with
254
261
  # a custom code instead of a randomly generated one. Not available for all
255
262
  # customers.
256
- # @param [Hash] push Configurations for the Push factors (channel) created under
257
- # this Service. If present, it must be a json string with the following format:
258
- # {"notify_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "include_date":
259
- # true}. If `include_date` is set to `true`, which is the default, that means that
260
- # the push challenge’s response will include the date created value. If
261
- # `include_date` is set to `false`, then the date created value will not be
262
- # included. See {Challenge}[https://www.twilio.com/docs/verify/api/challenge]
263
- # resource’s details parameter for more info
263
+ # @param [Boolean] push_include_date Optional configuration for the Push factors.
264
+ # If true, include the date in the Challenge's reponse. Otherwise, the date is
265
+ # omitted from the response. See
266
+ # {Challenge}[https://www.twilio.com/docs/verify/api/challenge] resource’s details
267
+ # parameter for more info. Default: true
268
+ # @param [String] push_apn_credential_sid Optional configuration for the Push
269
+ # factors. Set the APN Credential for this service. This will allow to send push
270
+ # notifications to iOS devices. See {Credential
271
+ # Resource}[https://www.twilio.com/docs/notify/api/credential-resource]
272
+ # @param [String] push_fcm_credential_sid Optional configuration for the Push
273
+ # factors. Set the FCM Credential for this service. This will allow to send push
274
+ # notifications to Android devices. See {Credential
275
+ # Resource}[https://www.twilio.com/docs/notify/api/credential-resource]
264
276
  # @return [ServiceInstance] Updated ServiceInstance
265
- def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push: :unset)
277
+ def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset)
266
278
  data = Twilio::Values.of({
267
279
  'FriendlyName' => friendly_name,
268
280
  'CodeLength' => code_length,
@@ -273,7 +285,9 @@ module Twilio
273
285
  'Psd2Enabled' => psd2_enabled,
274
286
  'DoNotShareWarningEnabled' => do_not_share_warning_enabled,
275
287
  'CustomCodeEnabled' => custom_code_enabled,
276
- 'Push' => Twilio.serialize_object(push),
288
+ 'Push.IncludeDate' => push_include_date,
289
+ 'Push.ApnCredentialSid' => push_apn_credential_sid,
290
+ 'Push.FcmCredentialSid' => push_fcm_credential_sid,
277
291
  })
278
292
 
279
293
  payload = @version.update('POST', @uri, data: data)
@@ -570,7 +584,7 @@ module Twilio
570
584
  ##
571
585
  # Update the ServiceInstance
572
586
  # @param [String] friendly_name A descriptive string that you create to describe
573
- # 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
574
588
  # should not contain PII.**
575
589
  # @param [String] code_length The length of the verification code to generate.
576
590
  # Must be an integer value between 4 and 10, inclusive.
@@ -589,16 +603,21 @@ module Twilio
589
603
  # @param [Boolean] custom_code_enabled Whether to allow sending verifications with
590
604
  # a custom code instead of a randomly generated one. Not available for all
591
605
  # customers.
592
- # @param [Hash] push Configurations for the Push factors (channel) created under
593
- # this Service. If present, it must be a json string with the following format:
594
- # {"notify_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "include_date":
595
- # true}. If `include_date` is set to `true`, which is the default, that means that
596
- # the push challenge’s response will include the date created value. If
597
- # `include_date` is set to `false`, then the date created value will not be
598
- # included. See {Challenge}[https://www.twilio.com/docs/verify/api/challenge]
599
- # resource’s details parameter for more info
606
+ # @param [Boolean] push_include_date Optional configuration for the Push factors.
607
+ # If true, include the date in the Challenge's reponse. Otherwise, the date is
608
+ # omitted from the response. See
609
+ # {Challenge}[https://www.twilio.com/docs/verify/api/challenge] resource’s details
610
+ # parameter for more info. Default: true
611
+ # @param [String] push_apn_credential_sid Optional configuration for the Push
612
+ # factors. Set the APN Credential for this service. This will allow to send push
613
+ # notifications to iOS devices. See {Credential
614
+ # Resource}[https://www.twilio.com/docs/notify/api/credential-resource]
615
+ # @param [String] push_fcm_credential_sid Optional configuration for the Push
616
+ # factors. Set the FCM Credential for this service. This will allow to send push
617
+ # notifications to Android devices. See {Credential
618
+ # Resource}[https://www.twilio.com/docs/notify/api/credential-resource]
600
619
  # @return [ServiceInstance] Updated ServiceInstance
601
- def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push: :unset)
620
+ def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset)
602
621
  context.update(
603
622
  friendly_name: friendly_name,
604
623
  code_length: code_length,
@@ -609,7 +628,9 @@ module Twilio
609
628
  psd2_enabled: psd2_enabled,
610
629
  do_not_share_warning_enabled: do_not_share_warning_enabled,
611
630
  custom_code_enabled: custom_code_enabled,
612
- push: push,
631
+ push_include_date: push_include_date,
632
+ push_apn_credential_sid: push_apn_credential_sid,
633
+ push_fcm_credential_sid: push_fcm_credential_sid,
613
634
  )
614
635
  end
615
636