twilio-ruby 5.52.0 → 5.67.3

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 (163) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/pr-lint.yml +15 -0
  3. data/.github/workflows/test-and-deploy.yml +129 -0
  4. data/.gitignore +5 -1
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +91 -28
  7. data/CHANGES.md +563 -0
  8. data/Gemfile +1 -0
  9. data/Makefile +8 -11
  10. data/README.md +13 -6
  11. data/examples/examples.rb +1 -1
  12. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  13. data/lib/twilio-ruby/http/http_client.rb +20 -4
  14. data/lib/twilio-ruby/http.rb +5 -0
  15. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  16. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
  17. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
  21. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
  22. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
  23. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  25. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  26. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  27. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  28. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
  29. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
  32. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
  33. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
  34. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
  35. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
  36. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
  37. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
  38. data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
  39. data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
  40. data/lib/twilio-ruby/rest/chat.rb +16 -0
  41. data/lib/twilio-ruby/rest/client.rb +21 -12
  42. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
  43. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  44. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
  45. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
  46. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  47. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
  48. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
  49. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  50. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
  51. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
  52. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
  53. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
  54. data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
  55. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
  56. data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
  57. data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
  58. data/lib/twilio-ruby/rest/conversations.rb +15 -0
  59. data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
  60. data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
  61. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
  62. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
  63. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
  64. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
  65. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +384 -0
  66. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
  67. data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
  68. data/lib/twilio-ruby/rest/flex_api.rb +9 -0
  69. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +258 -0
  70. data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
  71. data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
  72. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
  73. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
  74. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  75. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  76. data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
  77. data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
  78. data/lib/twilio-ruby/rest/insights.rb +28 -0
  79. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
  80. data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
  81. data/lib/twilio-ruby/rest/lookups.rb +7 -0
  82. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
  83. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
  84. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  85. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
  86. data/lib/twilio-ruby/rest/media/v1.rb +76 -0
  87. data/lib/twilio-ruby/rest/media.rb +65 -0
  88. data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
  89. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
  90. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
  91. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
  92. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
  93. data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
  94. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
  95. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  96. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
  97. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  98. data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
  99. data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
  100. data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
  101. data/lib/twilio-ruby/rest/pricing.rb +19 -0
  102. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  103. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  104. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
  105. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
  106. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  107. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
  108. data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
  109. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
  110. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
  111. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  112. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
  113. data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
  114. data/lib/twilio-ruby/rest/supersim.rb +15 -6
  115. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
  116. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  117. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
  118. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  119. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  120. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
  121. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
  122. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -22
  123. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  124. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
  125. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
  126. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
  127. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
  128. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
  129. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
  130. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
  131. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
  132. data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
  133. data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
  134. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  135. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
  136. data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
  137. data/lib/twilio-ruby/rest/verify.rb +14 -2
  138. data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
  139. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
  140. data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
  141. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
  142. data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
  143. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
  144. data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
  145. data/lib/twilio-ruby/rest/voice.rb +8 -0
  146. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  147. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  148. data/lib/twilio-ruby/rest.rb +13 -0
  149. data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
  150. data/lib/twilio-ruby/version.rb +1 -1
  151. data/lib/twilio-ruby.rb +6 -16
  152. data/sonar-project.properties +13 -0
  153. data/twilio-ruby.gemspec +1 -2
  154. metadata +59 -32
  155. data/.travis.yml +0 -45
  156. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
  157. /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
  158. /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
  159. /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
  160. /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
  161. /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
  162. /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
  163. /data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
@@ -0,0 +1,234 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Verify < Domain
12
+ class V2 < Version
13
+ class VerificationAttemptsSummaryList < ListResource
14
+ ##
15
+ # Initialize the VerificationAttemptsSummaryList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [VerificationAttemptsSummaryList] VerificationAttemptsSummaryList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ end
24
+
25
+ ##
26
+ # Provide a user friendly representation
27
+ def to_s
28
+ '#<Twilio.Verify.V2.VerificationAttemptsSummaryList>'
29
+ end
30
+ end
31
+
32
+ class VerificationAttemptsSummaryPage < Page
33
+ ##
34
+ # Initialize the VerificationAttemptsSummaryPage
35
+ # @param [Version] version Version that contains the resource
36
+ # @param [Response] response Response from the API
37
+ # @param [Hash] solution Path solution for the resource
38
+ # @return [VerificationAttemptsSummaryPage] VerificationAttemptsSummaryPage
39
+ def initialize(version, response, solution)
40
+ super(version, response)
41
+
42
+ # Path Solution
43
+ @solution = solution
44
+ end
45
+
46
+ ##
47
+ # Build an instance of VerificationAttemptsSummaryInstance
48
+ # @param [Hash] payload Payload response from the API
49
+ # @return [VerificationAttemptsSummaryInstance] VerificationAttemptsSummaryInstance
50
+ def get_instance(payload)
51
+ VerificationAttemptsSummaryInstance.new(@version, payload, )
52
+ end
53
+
54
+ ##
55
+ # Provide a user friendly representation
56
+ def to_s
57
+ '<Twilio.Verify.V2.VerificationAttemptsSummaryPage>'
58
+ end
59
+ end
60
+
61
+ class VerificationAttemptsSummaryContext < InstanceContext
62
+ ##
63
+ # Initialize the VerificationAttemptsSummaryContext
64
+ # @param [Version] version Version that contains the resource
65
+ # @return [VerificationAttemptsSummaryContext] VerificationAttemptsSummaryContext
66
+ def initialize(version)
67
+ super(version)
68
+
69
+ # Path Solution
70
+ @solution = {}
71
+ @uri = "/Attempts/Summary"
72
+ end
73
+
74
+ ##
75
+ # Fetch the VerificationAttemptsSummaryInstance
76
+ # @param [String] verify_service_sid Filter used to consider only Verification
77
+ # Attempts of the given verify service on the summary aggregation.
78
+ # @param [Time] date_created_after Datetime filter used to consider only
79
+ # Verification Attempts created after this datetime on the summary aggregation.
80
+ # Given as GMT in RFC 2822 format.
81
+ # @param [Time] date_created_before Datetime filter used to consider only
82
+ # Verification Attempts created before this datetime on the summary aggregation.
83
+ # Given as GMT in RFC 2822 format.
84
+ # @param [String] country Filter used to consider only Verification Attempts sent
85
+ # to the specified destination country on the summary aggregation.
86
+ # @param [verification_attempts_summary.Channels] channel Filter Verification
87
+ # Attempts considered on the summary aggregation by communication channel. Valid
88
+ # values are `SMS` and `CALL`
89
+ # @param [String] destination_prefix Filter the Verification Attempts considered
90
+ # on the summary aggregation by Destination prefix. It is the prefix of a phone
91
+ # number in E.164 format.
92
+ # @return [VerificationAttemptsSummaryInstance] Fetched VerificationAttemptsSummaryInstance
93
+ def fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
94
+ params = Twilio::Values.of({
95
+ 'VerifyServiceSid' => verify_service_sid,
96
+ 'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
97
+ 'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
98
+ 'Country' => country,
99
+ 'Channel' => channel,
100
+ 'DestinationPrefix' => destination_prefix,
101
+ })
102
+
103
+ payload = @version.fetch('GET', @uri, params: params)
104
+
105
+ VerificationAttemptsSummaryInstance.new(@version, payload, )
106
+ end
107
+
108
+ ##
109
+ # Provide a user friendly representation
110
+ def to_s
111
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
112
+ "#<Twilio.Verify.V2.VerificationAttemptsSummaryContext #{context}>"
113
+ end
114
+
115
+ ##
116
+ # Provide a detailed, user friendly representation
117
+ def inspect
118
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
119
+ "#<Twilio.Verify.V2.VerificationAttemptsSummaryContext #{context}>"
120
+ end
121
+ end
122
+
123
+ class VerificationAttemptsSummaryInstance < InstanceResource
124
+ ##
125
+ # Initialize the VerificationAttemptsSummaryInstance
126
+ # @param [Version] version Version that contains the resource
127
+ # @param [Hash] payload payload that contains response from Twilio
128
+ # @return [VerificationAttemptsSummaryInstance] VerificationAttemptsSummaryInstance
129
+ def initialize(version, payload)
130
+ super(version)
131
+
132
+ # Marshaled Properties
133
+ @properties = {
134
+ 'total_attempts' => payload['total_attempts'].to_i,
135
+ 'total_converted' => payload['total_converted'].to_i,
136
+ 'total_unconverted' => payload['total_unconverted'].to_i,
137
+ 'conversion_rate_percentage' => payload['conversion_rate_percentage'].to_f,
138
+ 'url' => payload['url'],
139
+ }
140
+
141
+ # Context
142
+ @instance_context = nil
143
+ @params = {}
144
+ end
145
+
146
+ ##
147
+ # Generate an instance context for the instance, the context is capable of
148
+ # performing various actions. All instance actions are proxied to the context
149
+ # @return [VerificationAttemptsSummaryContext] VerificationAttemptsSummaryContext for this VerificationAttemptsSummaryInstance
150
+ def context
151
+ unless @instance_context
152
+ @instance_context = VerificationAttemptsSummaryContext.new(@version, )
153
+ end
154
+ @instance_context
155
+ end
156
+
157
+ ##
158
+ # @return [String] Total of attempts made.
159
+ def total_attempts
160
+ @properties['total_attempts']
161
+ end
162
+
163
+ ##
164
+ # @return [String] Total of attempts confirmed by the end user.
165
+ def total_converted
166
+ @properties['total_converted']
167
+ end
168
+
169
+ ##
170
+ # @return [String] Total of attempts made that were not confirmed by the end user.
171
+ def total_unconverted
172
+ @properties['total_unconverted']
173
+ end
174
+
175
+ ##
176
+ # @return [String] Percentage of the confirmed messages over the total.
177
+ def conversion_rate_percentage
178
+ @properties['conversion_rate_percentage']
179
+ end
180
+
181
+ ##
182
+ # @return [String] The url
183
+ def url
184
+ @properties['url']
185
+ end
186
+
187
+ ##
188
+ # Fetch the VerificationAttemptsSummaryInstance
189
+ # @param [String] verify_service_sid Filter used to consider only Verification
190
+ # Attempts of the given verify service on the summary aggregation.
191
+ # @param [Time] date_created_after Datetime filter used to consider only
192
+ # Verification Attempts created after this datetime on the summary aggregation.
193
+ # Given as GMT in RFC 2822 format.
194
+ # @param [Time] date_created_before Datetime filter used to consider only
195
+ # Verification Attempts created before this datetime on the summary aggregation.
196
+ # Given as GMT in RFC 2822 format.
197
+ # @param [String] country Filter used to consider only Verification Attempts sent
198
+ # to the specified destination country on the summary aggregation.
199
+ # @param [verification_attempts_summary.Channels] channel Filter Verification
200
+ # Attempts considered on the summary aggregation by communication channel. Valid
201
+ # values are `SMS` and `CALL`
202
+ # @param [String] destination_prefix Filter the Verification Attempts considered
203
+ # on the summary aggregation by Destination prefix. It is the prefix of a phone
204
+ # number in E.164 format.
205
+ # @return [VerificationAttemptsSummaryInstance] Fetched VerificationAttemptsSummaryInstance
206
+ def fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
207
+ context.fetch(
208
+ verify_service_sid: verify_service_sid,
209
+ date_created_after: date_created_after,
210
+ date_created_before: date_created_before,
211
+ country: country,
212
+ channel: channel,
213
+ destination_prefix: destination_prefix,
214
+ )
215
+ end
216
+
217
+ ##
218
+ # Provide a user friendly representation
219
+ def to_s
220
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
221
+ "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>"
222
+ end
223
+
224
+ ##
225
+ # Provide a detailed, user friendly representation
226
+ def inspect
227
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
228
+ "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>"
229
+ end
230
+ end
231
+ end
232
+ end
233
+ end
234
+ end
@@ -18,6 +18,8 @@ module Twilio
18
18
  @forms = nil
19
19
  @services = nil
20
20
  @verification_attempts = nil
21
+ @verification_attempts_summary = nil
22
+ @templates = nil
21
23
  end
22
24
 
23
25
  ##
@@ -67,6 +69,18 @@ module Twilio
67
69
  end
68
70
  end
69
71
 
72
+ ##
73
+ # @return [Twilio::REST::Verify::V2::VerificationAttemptsSummaryContext]
74
+ def verification_attempts_summary
75
+ @verification_attempts_summary ||= VerificationAttemptsSummaryContext.new self
76
+ end
77
+
78
+ ##
79
+ # @return [Twilio::REST::Verify::V2::TemplateContext]
80
+ def templates
81
+ @templates ||= TemplateList.new self
82
+ end
83
+
70
84
  ##
71
85
  # Provide a user friendly representation
72
86
  def to_s
@@ -47,14 +47,26 @@ module Twilio
47
47
  end
48
48
 
49
49
  ##
50
- # @param [String] sid A 34 character string that uniquely identifies this
51
- # Verification Attempt.
50
+ # @param [String] sid The SID that uniquely identifies the verification attempt
51
+ # resource.
52
52
  # @return [Twilio::REST::Verify::V2::VerificationAttemptInstance] if sid was passed.
53
53
  # @return [Twilio::REST::Verify::V2::VerificationAttemptList]
54
54
  def verification_attempts(sid=:unset)
55
55
  self.v2.verification_attempts(sid)
56
56
  end
57
57
 
58
+ ##
59
+ # @return [Twilio::REST::Verify::V2::VerificationAttemptsSummaryInstance]
60
+ def verification_attempts_summary
61
+ self.v2.verification_attempts_summary()
62
+ end
63
+
64
+ ##
65
+ # @return [Twilio::REST::Verify::V2::TemplateInstance]
66
+ def templates
67
+ self.v2.templates()
68
+ end
69
+
58
70
  ##
59
71
  # Provide a user friendly representation
60
72
  def to_s
@@ -10,8 +10,6 @@ module Twilio
10
10
  module REST
11
11
  class Video < Domain
12
12
  class V1 < Version
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.
15
13
  class CompositionList < ListResource
16
14
  ##
17
15
  # Initialize the CompositionList
@@ -234,8 +232,6 @@ module Twilio
234
232
  end
235
233
  end
236
234
 
237
- ##
238
- # 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.
239
235
  class CompositionPage < Page
240
236
  ##
241
237
  # Initialize the CompositionPage
@@ -265,8 +261,6 @@ module Twilio
265
261
  end
266
262
  end
267
263
 
268
- ##
269
- # 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.
270
264
  class CompositionContext < InstanceContext
271
265
  ##
272
266
  # Initialize the CompositionContext
@@ -312,8 +306,6 @@ module Twilio
312
306
  end
313
307
  end
314
308
 
315
- ##
316
- # 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.
317
309
  class CompositionInstance < InstanceResource
318
310
  ##
319
311
  # Initialize the CompositionInstance
@@ -342,6 +334,9 @@ module Twilio
342
334
  'bitrate' => payload['bitrate'].to_i,
343
335
  'size' => payload['size'].to_i,
344
336
  'duration' => payload['duration'].to_i,
337
+ 'media_external_location' => payload['media_external_location'],
338
+ 'status_callback' => payload['status_callback'],
339
+ 'status_callback_method' => payload['status_callback_method'],
345
340
  'url' => payload['url'],
346
341
  'links' => payload['links'],
347
342
  }
@@ -458,6 +453,24 @@ module Twilio
458
453
  @properties['duration']
459
454
  end
460
455
 
456
+ ##
457
+ # @return [String] The URL of the media file associated with the composition when stored externally
458
+ def media_external_location
459
+ @properties['media_external_location']
460
+ end
461
+
462
+ ##
463
+ # @return [String] The URL called to send status information on every composition event.
464
+ def status_callback
465
+ @properties['status_callback']
466
+ end
467
+
468
+ ##
469
+ # @return [String] The HTTP method used to call `status_callback`
470
+ def status_callback_method
471
+ @properties['status_callback_method']
472
+ end
473
+
461
474
  ##
462
475
  # @return [String] The absolute URL of the resource
463
476
  def url
@@ -10,8 +10,6 @@ module Twilio
10
10
  module REST
11
11
  class Video < Domain
12
12
  class V1 < Version
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.
15
13
  class CompositionHookList < ListResource
16
14
  ##
17
15
  # Initialize the CompositionHookList
@@ -248,8 +246,6 @@ module Twilio
248
246
  end
249
247
  end
250
248
 
251
- ##
252
- # 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.
253
249
  class CompositionHookPage < Page
254
250
  ##
255
251
  # Initialize the CompositionHookPage
@@ -279,8 +275,6 @@ module Twilio
279
275
  end
280
276
  end
281
277
 
282
- ##
283
- # 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.
284
278
  class CompositionHookContext < InstanceContext
285
279
  ##
286
280
  # Initialize the CompositionHookContext
@@ -412,8 +406,6 @@ module Twilio
412
406
  end
413
407
  end
414
408
 
415
- ##
416
- # 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.
417
409
  class CompositionHookInstance < InstanceResource
418
410
  ##
419
411
  # Initialize the CompositionHookInstance
@@ -272,6 +272,9 @@ module Twilio
272
272
  'grouping_sids' => payload['grouping_sids'],
273
273
  'track_name' => payload['track_name'],
274
274
  'offset' => payload['offset'].to_i,
275
+ 'media_external_location' => payload['media_external_location'],
276
+ 'status_callback' => payload['status_callback'],
277
+ 'status_callback_method' => payload['status_callback_method'],
275
278
  'links' => payload['links'],
276
279
  }
277
280
 
@@ -375,6 +378,24 @@ module Twilio
375
378
  @properties['offset']
376
379
  end
377
380
 
381
+ ##
382
+ # @return [String] The URL of the media file associated with the recording when stored externally
383
+ def media_external_location
384
+ @properties['media_external_location']
385
+ end
386
+
387
+ ##
388
+ # @return [String] The URL called to send status information on every recording event.
389
+ def status_callback
390
+ @properties['status_callback']
391
+ end
392
+
393
+ ##
394
+ # @return [String] The HTTP method used to call `status_callback`
395
+ def status_callback_method
396
+ @properties['status_callback_method']
397
+ end
398
+
378
399
  ##
379
400
  # @return [String] The URLs of related resources
380
401
  def links
@@ -255,6 +255,7 @@ module Twilio
255
255
  'grouping_sids' => payload['grouping_sids'],
256
256
  'track_name' => payload['track_name'],
257
257
  'offset' => payload['offset'].to_i,
258
+ 'media_external_location' => payload['media_external_location'],
258
259
  'room_sid' => payload['room_sid'],
259
260
  'links' => payload['links'],
260
261
  }
@@ -359,6 +360,12 @@ module Twilio
359
360
  @properties['offset']
360
361
  end
361
362
 
363
+ ##
364
+ # @return [String] The URL of the media file associated with the recording when stored externally
365
+ def media_external_location
366
+ @properties['media_external_location']
367
+ end
368
+
362
369
  ##
363
370
  # @return [String] The SID of the Room resource the recording is associated with
364
371
  def room_sid
@@ -30,10 +30,13 @@ module Twilio
30
30
  # `group-small`, or `group`. The default value is `group`.
31
31
  # @param [String] unique_name An application-defined string that uniquely
32
32
  # identifies the resource. It can be used as a `room_sid` in place of the
33
- # resource's `sid` in the URL to address the resource. This value is unique for
34
- # `in-progress` rooms. SDK clients can use this name to connect to the room. REST
35
- # API clients can use this name in place of the Room SID to interact with the room
36
- # as long as the room is `in-progress`.
33
+ # resource's `sid` in the URL to address the resource, assuming it does not
34
+ # contain any {reserved
35
+ # characters}[https://tools.ietf.org/html/rfc3986#section-2.2] that would need to
36
+ # be URL encoded. This value is unique for `in-progress` rooms. SDK clients can
37
+ # use this name to connect to the room. REST API clients can use this name in
38
+ # place of the Room SID to interact with the room as long as the room is
39
+ # `in-progress`.
37
40
  # @param [String] status_callback The URL we should call using the
38
41
  # `status_callback_method` to send status information to your application on every
39
42
  # room event. See {Status
@@ -57,8 +60,22 @@ module Twilio
57
60
  # ***This feature is not available in `peer-to-peer` rooms.***
58
61
  # @param [Hash] recording_rules A collection of Recording Rules that describe how
59
62
  # to include or exclude matching tracks for recording
63
+ # @param [Boolean] audio_only When set to true, indicates that the participants in
64
+ # the room will only publish audio. No video tracks will be allowed. Group rooms
65
+ # only.
66
+ # @param [String] max_participant_duration The maximum number of seconds a
67
+ # Participant can be connected to the room. The maximum possible value is 86400
68
+ # seconds (24 hours). The default is 14400 seconds (4 hours).
69
+ # @param [String] empty_room_timeout Configures how long (in minutes) a room will
70
+ # remain active after last participant leaves. Valid values range from 1 to 60
71
+ # minutes (no fractions).
72
+ # @param [String] unused_room_timeout Configures how long (in minutes) a room will
73
+ # remain active if no one joins. Valid values range from 1 to 60 minutes (no
74
+ # fractions).
75
+ # @param [Boolean] large_room When set to true, indicated that this is the large
76
+ # room.
60
77
  # @return [RoomInstance] Created RoomInstance
61
- def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset)
78
+ def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset, empty_room_timeout: :unset, unused_room_timeout: :unset, large_room: :unset)
62
79
  data = Twilio::Values.of({
63
80
  'EnableTurn' => enable_turn,
64
81
  'Type' => type,
@@ -70,6 +87,11 @@ module Twilio
70
87
  'VideoCodecs' => Twilio.serialize_list(video_codecs) { |e| e },
71
88
  'MediaRegion' => media_region,
72
89
  'RecordingRules' => Twilio.serialize_object(recording_rules),
90
+ 'AudioOnly' => audio_only,
91
+ 'MaxParticipantDuration' => max_participant_duration,
92
+ 'EmptyRoomTimeout' => empty_room_timeout,
93
+ 'UnusedRoomTimeout' => unused_room_timeout,
94
+ 'LargeRoom' => large_room,
73
95
  })
74
96
 
75
97
  payload = @version.create('POST', @uri, data: data)
@@ -360,10 +382,15 @@ module Twilio
360
382
  'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
361
383
  'type' => payload['type'],
362
384
  'max_participants' => payload['max_participants'].to_i,
385
+ 'max_participant_duration' => payload['max_participant_duration'].to_i,
363
386
  'max_concurrent_published_tracks' => payload['max_concurrent_published_tracks'] == nil ? payload['max_concurrent_published_tracks'] : payload['max_concurrent_published_tracks'].to_i,
364
387
  'record_participants_on_connect' => payload['record_participants_on_connect'],
365
388
  'video_codecs' => payload['video_codecs'],
366
389
  'media_region' => payload['media_region'],
390
+ 'audio_only' => payload['audio_only'],
391
+ 'empty_room_timeout' => payload['empty_room_timeout'].to_i,
392
+ 'unused_room_timeout' => payload['unused_room_timeout'].to_i,
393
+ 'large_room' => payload['large_room'],
367
394
  'url' => payload['url'],
368
395
  'links' => payload['links'],
369
396
  }
@@ -462,6 +489,12 @@ module Twilio
462
489
  @properties['max_participants']
463
490
  end
464
491
 
492
+ ##
493
+ # @return [String] The maximum number of seconds a Participant can be connected to the room
494
+ def max_participant_duration
495
+ @properties['max_participant_duration']
496
+ end
497
+
465
498
  ##
466
499
  # @return [String] The maximum number of published tracks allowed in the room at the same time
467
500
  def max_concurrent_published_tracks
@@ -486,6 +519,30 @@ module Twilio
486
519
  @properties['media_region']
487
520
  end
488
521
 
522
+ ##
523
+ # @return [Boolean] Indicates whether the room will only contain audio track participants for group rooms.
524
+ def audio_only
525
+ @properties['audio_only']
526
+ end
527
+
528
+ ##
529
+ # @return [String] The time a room will remain active after last participant leaves.
530
+ def empty_room_timeout
531
+ @properties['empty_room_timeout']
532
+ end
533
+
534
+ ##
535
+ # @return [String] The time a room will remain active when no one joins.
536
+ def unused_room_timeout
537
+ @properties['unused_room_timeout']
538
+ end
539
+
540
+ ##
541
+ # @return [Boolean] Indicates if this is a large room.
542
+ def large_room
543
+ @properties['large_room']
544
+ end
545
+
489
546
  ##
490
547
  # @return [String] The absolute URL of the resource
491
548
  def url