twilio-ruby 5.67.3 → 5.74.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +8 -2
  3. data/.github/workflows/test-and-deploy.yml +3 -3
  4. data/CHANGES.md +288 -0
  5. data/LICENSE +1 -1
  6. data/Makefile +6 -2
  7. data/PULL_REQUEST_TEMPLATE.md +1 -1
  8. data/README.md +2 -2
  9. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
  24. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
  25. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  26. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
  27. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
  28. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
  29. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
  30. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
  31. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
  34. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
  37. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
  39. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
  43. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
  44. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
  45. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
  46. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
  47. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
  48. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
  49. data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
  50. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
  51. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
  52. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  53. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
  54. data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
  55. data/lib/twilio-ruby/rest/client.rb +28 -0
  56. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  57. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  58. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  59. data/lib/twilio-ruby/rest/content/v1.rb +52 -0
  60. data/lib/twilio-ruby/rest/content.rb +53 -0
  61. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
  62. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
  63. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
  64. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
  65. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
  66. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
  67. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
  68. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
  69. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  70. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
  75. data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
  76. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
  77. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
  78. data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
  79. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
  80. data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
  81. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
  82. data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
  83. data/lib/twilio-ruby/rest/flex_api.rb +83 -0
  84. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
  85. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
  86. data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
  87. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
  88. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  89. data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
  90. data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
  91. data/lib/twilio-ruby/rest/insights.rb +0 -8
  92. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
  93. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
  94. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  95. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
  96. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
  97. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
  98. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  99. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
  100. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
  101. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  102. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
  103. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
  104. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  105. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
  106. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
  107. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
  108. data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
  109. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
  110. data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
  111. data/lib/twilio-ruby/rest/messaging.rb +26 -0
  112. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
  113. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
  114. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
  115. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
  116. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
  117. data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
  118. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
  119. data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
  120. data/lib/twilio-ruby/rest/microvisor.rb +70 -0
  121. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  122. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
  123. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
  124. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
  125. data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
  126. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
  127. data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
  128. data/lib/twilio-ruby/rest/oauth.rb +68 -0
  129. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  130. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
  131. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
  132. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
  133. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
  134. data/lib/twilio-ruby/rest/preview.rb +0 -58
  135. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  136. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
  137. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
  138. data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
  139. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
  140. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
  141. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
  142. data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
  143. data/lib/twilio-ruby/rest/routes.rb +62 -0
  144. data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
  145. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  146. data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
  147. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
  148. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
  149. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
  150. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
  151. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
  152. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
  153. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  154. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
  155. data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
  156. data/lib/twilio-ruby/rest/supersim.rb +6 -0
  157. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
  158. data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
  159. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
  160. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
  161. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  162. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
  163. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
  164. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
  165. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
  166. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  167. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  168. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
  169. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
  170. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
  171. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
  172. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
  173. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
  174. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
  175. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
  176. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
  177. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
  178. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
  179. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
  180. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
  181. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
  182. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
  183. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
  184. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
  185. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
  186. data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
  187. data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
  188. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
  189. data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
  190. data/lib/twilio-ruby/rest/verify.rb +8 -0
  191. data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
  192. data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
  193. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
  194. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
  195. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
  196. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
  197. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
  198. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
  199. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
  200. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  201. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
  202. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  203. data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
  204. data/lib/twilio-ruby/version.rb +1 -1
  205. data/twilio-ruby.gemspec +1 -1
  206. metadata +52 -17
  207. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
  208. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  209. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  210. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  211. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  212. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
  213. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  214. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  215. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  216. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -331,9 +331,9 @@ module Twilio
331
331
  'resolution' => payload['resolution'],
332
332
  'trim' => payload['trim'],
333
333
  'format' => payload['format'],
334
- 'bitrate' => payload['bitrate'].to_i,
335
- 'size' => payload['size'].to_i,
336
- 'duration' => payload['duration'].to_i,
334
+ 'bitrate' => payload['bitrate'] == nil ? payload['bitrate'] : payload['bitrate'].to_i,
335
+ 'size' => payload['size'] == nil ? payload['size'] : payload['size'].to_i,
336
+ 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
337
337
  'media_external_location' => payload['media_external_location'],
338
338
  'status_callback' => payload['status_callback'],
339
339
  'status_callback_method' => payload['status_callback_method'],
@@ -263,7 +263,7 @@ module Twilio
263
263
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
264
264
  'sid' => payload['sid'],
265
265
  'source_sid' => payload['source_sid'],
266
- 'size' => payload['size'].to_i,
266
+ 'size' => payload['size'] == nil ? payload['size'] : payload['size'].to_i,
267
267
  'url' => payload['url'],
268
268
  'type' => payload['type'],
269
269
  'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
@@ -271,7 +271,7 @@ module Twilio
271
271
  'codec' => payload['codec'],
272
272
  'grouping_sids' => payload['grouping_sids'],
273
273
  'track_name' => payload['track_name'],
274
- 'offset' => payload['offset'].to_i,
274
+ 'offset' => payload['offset'] == nil ? payload['offset'] : payload['offset'].to_i,
275
275
  'media_external_location' => payload['media_external_location'],
276
276
  'status_callback' => payload['status_callback'],
277
277
  'status_callback_method' => payload['status_callback_method'],
@@ -246,7 +246,7 @@ module Twilio
246
246
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
247
247
  'sid' => payload['sid'],
248
248
  'source_sid' => payload['source_sid'],
249
- 'size' => payload['size'].to_i,
249
+ 'size' => payload['size'] == nil ? payload['size'] : payload['size'].to_i,
250
250
  'url' => payload['url'],
251
251
  'type' => payload['type'],
252
252
  'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
@@ -254,7 +254,7 @@ module Twilio
254
254
  'codec' => payload['codec'],
255
255
  'grouping_sids' => payload['grouping_sids'],
256
256
  'track_name' => payload['track_name'],
257
- 'offset' => payload['offset'].to_i,
257
+ 'offset' => payload['offset'] == nil ? payload['offset'] : payload['offset'].to_i,
258
258
  'media_external_location' => payload['media_external_location'],
259
259
  'room_sid' => payload['room_sid'],
260
260
  'links' => payload['links'],
@@ -0,0 +1,240 @@
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 Video < Domain
12
+ class V1 < Version
13
+ class RoomContext < InstanceContext
14
+ class ParticipantContext < InstanceContext
15
+ class AnonymizeList < ListResource
16
+ ##
17
+ # Initialize the AnonymizeList
18
+ # @param [Version] version Version that contains the resource
19
+ # @param [String] room_sid The SID of the participant's room.
20
+ # @param [String] sid The unique string that we created to identify the
21
+ # RoomParticipant resource.
22
+ # @return [AnonymizeList] AnonymizeList
23
+ def initialize(version, room_sid: nil, sid: nil)
24
+ super(version)
25
+
26
+ # Path Solution
27
+ @solution = {room_sid: room_sid, sid: sid}
28
+ end
29
+
30
+ ##
31
+ # Provide a user friendly representation
32
+ def to_s
33
+ '#<Twilio.Video.V1.AnonymizeList>'
34
+ end
35
+ end
36
+
37
+ class AnonymizePage < Page
38
+ ##
39
+ # Initialize the AnonymizePage
40
+ # @param [Version] version Version that contains the resource
41
+ # @param [Response] response Response from the API
42
+ # @param [Hash] solution Path solution for the resource
43
+ # @return [AnonymizePage] AnonymizePage
44
+ def initialize(version, response, solution)
45
+ super(version, response)
46
+
47
+ # Path Solution
48
+ @solution = solution
49
+ end
50
+
51
+ ##
52
+ # Build an instance of AnonymizeInstance
53
+ # @param [Hash] payload Payload response from the API
54
+ # @return [AnonymizeInstance] AnonymizeInstance
55
+ def get_instance(payload)
56
+ AnonymizeInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
57
+ end
58
+
59
+ ##
60
+ # Provide a user friendly representation
61
+ def to_s
62
+ '<Twilio.Video.V1.AnonymizePage>'
63
+ end
64
+ end
65
+
66
+ class AnonymizeContext < InstanceContext
67
+ ##
68
+ # Initialize the AnonymizeContext
69
+ # @param [Version] version Version that contains the resource
70
+ # @param [String] room_sid The SID of the room with the participant to update.
71
+ # @param [String] sid The SID of the RoomParticipant resource to update.
72
+ # @return [AnonymizeContext] AnonymizeContext
73
+ def initialize(version, room_sid, sid)
74
+ super(version)
75
+
76
+ # Path Solution
77
+ @solution = {room_sid: room_sid, sid: sid, }
78
+ @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:sid]}/Anonymize"
79
+ end
80
+
81
+ ##
82
+ # Update the AnonymizeInstance
83
+ # @return [AnonymizeInstance] Updated AnonymizeInstance
84
+ def update
85
+ payload = @version.update('POST', @uri)
86
+
87
+ AnonymizeInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
88
+ end
89
+
90
+ ##
91
+ # Provide a user friendly representation
92
+ def to_s
93
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
94
+ "#<Twilio.Video.V1.AnonymizeContext #{context}>"
95
+ end
96
+
97
+ ##
98
+ # Provide a detailed, user friendly representation
99
+ def inspect
100
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
101
+ "#<Twilio.Video.V1.AnonymizeContext #{context}>"
102
+ end
103
+ end
104
+
105
+ class AnonymizeInstance < InstanceResource
106
+ ##
107
+ # Initialize the AnonymizeInstance
108
+ # @param [Version] version Version that contains the resource
109
+ # @param [Hash] payload payload that contains response from Twilio
110
+ # @param [String] room_sid The SID of the participant's room.
111
+ # @param [String] sid The unique string that we created to identify the
112
+ # RoomParticipant resource.
113
+ # @return [AnonymizeInstance] AnonymizeInstance
114
+ def initialize(version, payload, room_sid: nil, sid: nil)
115
+ super(version)
116
+
117
+ # Marshaled Properties
118
+ @properties = {
119
+ 'sid' => payload['sid'],
120
+ 'room_sid' => payload['room_sid'],
121
+ 'account_sid' => payload['account_sid'],
122
+ 'status' => payload['status'],
123
+ 'identity' => payload['identity'],
124
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
125
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
126
+ 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
127
+ 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
128
+ 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
129
+ 'url' => payload['url'],
130
+ }
131
+
132
+ # Context
133
+ @instance_context = nil
134
+ @params = {'room_sid' => room_sid, 'sid' => sid, }
135
+ end
136
+
137
+ ##
138
+ # Generate an instance context for the instance, the context is capable of
139
+ # performing various actions. All instance actions are proxied to the context
140
+ # @return [AnonymizeContext] AnonymizeContext for this AnonymizeInstance
141
+ def context
142
+ unless @instance_context
143
+ @instance_context = AnonymizeContext.new(@version, @params['room_sid'], @params['sid'], )
144
+ end
145
+ @instance_context
146
+ end
147
+
148
+ ##
149
+ # @return [String] The unique string that identifies the resource
150
+ def sid
151
+ @properties['sid']
152
+ end
153
+
154
+ ##
155
+ # @return [String] The SID of the participant's room
156
+ def room_sid
157
+ @properties['room_sid']
158
+ end
159
+
160
+ ##
161
+ # @return [String] The SID of the Account that created the resource
162
+ def account_sid
163
+ @properties['account_sid']
164
+ end
165
+
166
+ ##
167
+ # @return [anonymize.Status] The status of the Participant
168
+ def status
169
+ @properties['status']
170
+ end
171
+
172
+ ##
173
+ # @return [String] The SID of the participant
174
+ def identity
175
+ @properties['identity']
176
+ end
177
+
178
+ ##
179
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
180
+ def date_created
181
+ @properties['date_created']
182
+ end
183
+
184
+ ##
185
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
186
+ def date_updated
187
+ @properties['date_updated']
188
+ end
189
+
190
+ ##
191
+ # @return [Time] The time of participant connected to the room in ISO 8601 format
192
+ def start_time
193
+ @properties['start_time']
194
+ end
195
+
196
+ ##
197
+ # @return [Time] The time when the participant disconnected from the room in ISO 8601 format
198
+ def end_time
199
+ @properties['end_time']
200
+ end
201
+
202
+ ##
203
+ # @return [String] Duration of time in seconds the participant was connected
204
+ def duration
205
+ @properties['duration']
206
+ end
207
+
208
+ ##
209
+ # @return [String] The absolute URL of the resource
210
+ def url
211
+ @properties['url']
212
+ end
213
+
214
+ ##
215
+ # Update the AnonymizeInstance
216
+ # @return [AnonymizeInstance] Updated AnonymizeInstance
217
+ def update
218
+ context.update
219
+ end
220
+
221
+ ##
222
+ # Provide a user friendly representation
223
+ def to_s
224
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
225
+ "<Twilio.Video.V1.AnonymizeInstance #{values}>"
226
+ end
227
+
228
+ ##
229
+ # Provide a detailed, user friendly representation
230
+ def inspect
231
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
232
+ "<Twilio.Video.V1.AnonymizeInstance #{values}>"
233
+ end
234
+ end
235
+ end
236
+ end
237
+ end
238
+ end
239
+ end
240
+ end
@@ -207,6 +207,7 @@ module Twilio
207
207
  @published_tracks = nil
208
208
  @subscribed_tracks = nil
209
209
  @subscribe_rules = nil
210
+ @anonymize = nil
210
211
  end
211
212
 
212
213
  ##
@@ -293,6 +294,14 @@ module Twilio
293
294
  @subscribe_rules
294
295
  end
295
296
 
297
+ ##
298
+ # Access the anonymize
299
+ # @return [AnonymizeList]
300
+ # @return [AnonymizeContext]
301
+ def anonymize
302
+ AnonymizeContext.new(@version, @solution[:room_sid], @solution[:sid], )
303
+ end
304
+
296
305
  ##
297
306
  # Provide a user friendly representation
298
307
  def to_s
@@ -462,6 +471,13 @@ module Twilio
462
471
  context.subscribe_rules
463
472
  end
464
473
 
474
+ ##
475
+ # Access the anonymize
476
+ # @return [anonymize] anonymize
477
+ def anonymize
478
+ context.anonymize
479
+ end
480
+
465
481
  ##
466
482
  # Provide a user friendly representation
467
483
  def to_s
@@ -381,15 +381,15 @@ module Twilio
381
381
  'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
382
382
  'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
383
383
  'type' => payload['type'],
384
- 'max_participants' => payload['max_participants'].to_i,
385
- 'max_participant_duration' => payload['max_participant_duration'].to_i,
384
+ 'max_participants' => payload['max_participants'] == nil ? payload['max_participants'] : payload['max_participants'].to_i,
385
+ 'max_participant_duration' => payload['max_participant_duration'] == nil ? payload['max_participant_duration'] : payload['max_participant_duration'].to_i,
386
386
  'max_concurrent_published_tracks' => payload['max_concurrent_published_tracks'] == nil ? payload['max_concurrent_published_tracks'] : payload['max_concurrent_published_tracks'].to_i,
387
387
  'record_participants_on_connect' => payload['record_participants_on_connect'],
388
388
  'video_codecs' => payload['video_codecs'],
389
389
  'media_region' => payload['media_region'],
390
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,
391
+ 'empty_room_timeout' => payload['empty_room_timeout'] == nil ? payload['empty_room_timeout'] : payload['empty_room_timeout'].to_i,
392
+ 'unused_room_timeout' => payload['unused_room_timeout'] == nil ? payload['unused_room_timeout'] : payload['unused_room_timeout'].to_i,
393
393
  'large_room' => payload['large_room'],
394
394
  'url' => payload['url'],
395
395
  'links' => payload['links'],
@@ -287,8 +287,8 @@ module Twilio
287
287
  'sid' => payload['sid'],
288
288
  'friendly_name' => payload['friendly_name'],
289
289
  'target' => payload['target'],
290
- 'priority' => payload['priority'].to_i,
291
- 'weight' => payload['weight'].to_i,
290
+ 'priority' => payload['priority'] == nil ? payload['priority'] : payload['priority'].to_i,
291
+ 'weight' => payload['weight'] == nil ? payload['weight'] : payload['weight'].to_i,
292
292
  'enabled' => payload['enabled'],
293
293
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
294
294
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
@@ -92,7 +92,7 @@ module Twilio
92
92
 
93
93
  # Marshaled Properties
94
94
  @properties = {
95
- 'update_count' => payload['update_count'].to_i,
95
+ 'update_count' => payload['update_count'] == nil ? payload['update_count'] : payload['update_count'].to_i,
96
96
  'update_request' => payload['update_request'],
97
97
  }
98
98
  end
@@ -236,7 +236,7 @@ module Twilio
236
236
  'sid' => payload['sid'],
237
237
  'friendly_name' => payload['friendly_name'],
238
238
  'ip_address' => payload['ip_address'],
239
- 'cidr_prefix_length' => payload['cidr_prefix_length'].to_i,
239
+ 'cidr_prefix_length' => payload['cidr_prefix_length'] == nil ? payload['cidr_prefix_length'] : payload['cidr_prefix_length'].to_i,
240
240
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
241
241
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
242
242
  'url' => payload['url'],
@@ -276,13 +276,13 @@ module Twilio
276
276
  'friendly_name' => payload['friendly_name'],
277
277
  'data_enabled' => payload['data_enabled'],
278
278
  'data_metering' => payload['data_metering'],
279
- 'data_limit' => payload['data_limit'].to_i,
279
+ 'data_limit' => payload['data_limit'] == nil ? payload['data_limit'] : payload['data_limit'].to_i,
280
280
  'messaging_enabled' => payload['messaging_enabled'],
281
281
  'voice_enabled' => payload['voice_enabled'],
282
282
  'national_roaming_enabled' => payload['national_roaming_enabled'],
283
- 'national_roaming_data_limit' => payload['national_roaming_data_limit'].to_i,
283
+ 'national_roaming_data_limit' => payload['national_roaming_data_limit'] == nil ? payload['national_roaming_data_limit'] : payload['national_roaming_data_limit'].to_i,
284
284
  'international_roaming' => payload['international_roaming'],
285
- 'international_roaming_data_limit' => payload['international_roaming_data_limit'].to_i,
285
+ 'international_roaming_data_limit' => payload['international_roaming_data_limit'] == nil ? payload['international_roaming_data_limit'] : payload['international_roaming_data_limit'].to_i,
286
286
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
287
287
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
288
288
  'url' => payload['url'],
@@ -167,8 +167,8 @@ module Twilio
167
167
  'operator_name' => payload['operator_name'],
168
168
  'cell_id' => payload['cell_id'],
169
169
  'cell_location_estimate' => payload['cell_location_estimate'],
170
- 'packets_uploaded' => payload['packets_uploaded'].to_i,
171
- 'packets_downloaded' => payload['packets_downloaded'].to_i,
170
+ 'packets_uploaded' => payload['packets_uploaded'] == nil ? payload['packets_uploaded'] : payload['packets_uploaded'].to_i,
171
+ 'packets_downloaded' => payload['packets_downloaded'] == nil ? payload['packets_downloaded'] : payload['packets_downloaded'].to_i,
172
172
  'last_updated' => Twilio.deserialize_iso8601_datetime(payload['last_updated']),
173
173
  'start' => Twilio.deserialize_iso8601_datetime(payload['start']),
174
174
  'end_' => Twilio.deserialize_iso8601_datetime(payload['end']),
@@ -32,7 +32,7 @@ module Twilio
32
32
  valid_body = true # default succeed, since body not always provided
33
33
  params_hash = body_or_hash(params)
34
34
  unless params_hash.is_a? Enumerable
35
- body_hash = URI.decode_www_form(parsed_url.query).to_h['bodySHA256']
35
+ body_hash = URI.decode_www_form(parsed_url.query || '').to_h['bodySHA256']
36
36
  params_hash = build_hash_for(params)
37
37
  valid_body = !(params_hash.nil? || body_hash.nil?) && secure_compare(params_hash, body_hash)
38
38
  params_hash = {}