twilio-ruby 5.74.4 → 7.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (769) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +1 -1
  3. data/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
  4. data/.github/workflows/test-and-deploy.yml +20 -2
  5. data/.gitignore +3 -0
  6. data/.rubocop.yml +1 -0
  7. data/CHANGES.md +1073 -0
  8. data/CONTRIBUTING.md +11 -9
  9. data/Dockerfile +2 -1
  10. data/Gemfile +5 -0
  11. data/LICENSE +1 -1
  12. data/Makefile +6 -0
  13. data/README.md +138 -40
  14. data/UPGRADE.md +21 -0
  15. data/advanced-examples/custom-http-client.md +170 -0
  16. data/cluster/cluster_oauth_spec.rb +19 -0
  17. data/cluster/cluster_orgs_spec.rb +40 -0
  18. data/cluster/cluster_spec.rb +75 -0
  19. data/examples/public_oauth.rb +13 -0
  20. data/lib/twilio-ruby/auth_strategy/auth_strategy.rb +19 -0
  21. data/lib/twilio-ruby/auth_strategy/no_auth_strategy.rb +17 -0
  22. data/lib/twilio-ruby/auth_strategy/token_auth_strategy.rb +39 -0
  23. data/lib/twilio-ruby/base/client_base.rb +131 -0
  24. data/lib/twilio-ruby/credential/auth_type.rb +17 -0
  25. data/lib/twilio-ruby/credential/client_credential_provider.rb +28 -0
  26. data/lib/twilio-ruby/credential/credential_provider.rb +11 -0
  27. data/lib/twilio-ruby/credential/orgs_credential_provider.rb +30 -0
  28. data/lib/twilio-ruby/framework/request.rb +8 -1
  29. data/lib/twilio-ruby/framework/rest/domain.rb +0 -1
  30. data/lib/twilio-ruby/framework/rest/error.rb +0 -12
  31. data/lib/twilio-ruby/framework/rest/page.rb +1 -0
  32. data/lib/twilio-ruby/http/client_token_manager.rb +28 -0
  33. data/lib/twilio-ruby/http/http_client.rb +22 -5
  34. data/lib/twilio-ruby/http/org_token_manager.rb +28 -0
  35. data/lib/twilio-ruby/jwt/access_token.rb +0 -59
  36. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +205 -178
  37. data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +137 -0
  38. data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +137 -0
  39. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +397 -332
  40. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +397 -332
  41. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +122 -114
  42. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +186 -0
  43. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +225 -192
  44. data/lib/twilio-ruby/rest/accounts/v1.rb +63 -42
  45. data/lib/twilio-ruby/rest/accounts.rb +4 -34
  46. data/lib/twilio-ruby/rest/accounts_base.rb +38 -0
  47. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +374 -365
  48. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +583 -530
  49. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +641 -605
  50. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +323 -320
  51. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +398 -0
  52. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +398 -0
  53. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +398 -0
  54. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +398 -0
  55. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +398 -0
  56. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +398 -0
  57. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +398 -0
  58. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +442 -0
  59. data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +143 -118
  60. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +206 -194
  61. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +410 -417
  62. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +302 -342
  63. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +520 -511
  64. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +852 -641
  65. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +852 -641
  66. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +318 -0
  67. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +163 -153
  68. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +239 -240
  69. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +972 -1050
  70. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +685 -756
  71. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +471 -458
  72. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +505 -493
  73. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +446 -407
  74. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +330 -352
  75. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +416 -418
  76. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +546 -554
  77. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +546 -553
  78. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +546 -553
  79. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +867 -903
  80. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +355 -302
  81. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +174 -166
  82. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +354 -350
  83. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +644 -641
  84. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +164 -138
  85. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +164 -138
  86. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +410 -399
  87. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +388 -358
  88. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +356 -338
  89. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +452 -390
  90. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +204 -0
  91. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +393 -380
  92. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +382 -385
  93. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +378 -372
  94. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +521 -513
  95. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +433 -408
  96. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +355 -306
  97. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +401 -368
  98. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +425 -373
  99. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +366 -0
  100. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb +366 -0
  101. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +141 -0
  102. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb +366 -0
  103. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +127 -0
  104. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +95 -103
  105. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +359 -339
  106. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +359 -338
  107. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +675 -645
  108. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +438 -421
  109. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +425 -374
  110. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +142 -150
  111. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +178 -154
  112. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +378 -350
  113. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +318 -339
  114. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +318 -339
  115. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +318 -339
  116. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +318 -339
  117. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +318 -339
  118. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +318 -339
  119. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +318 -339
  120. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +318 -339
  121. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +385 -416
  122. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +511 -484
  123. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +113 -104
  124. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +179 -161
  125. data/lib/twilio-ruby/rest/api/v2010/account.rb +1001 -943
  126. data/lib/twilio-ruby/rest/api/v2010.rb +126 -148
  127. data/lib/twilio-ruby/rest/api.rb +25 -34
  128. data/lib/twilio-ruby/rest/api_base.rb +38 -0
  129. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +371 -0
  130. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +371 -0
  131. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +311 -0
  132. data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +206 -0
  133. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +687 -0
  134. data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +232 -0
  135. data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +213 -0
  136. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +629 -0
  137. data/lib/twilio-ruby/rest/assistants/v1/policy.rb +267 -0
  138. data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +267 -0
  139. data/lib/twilio-ruby/rest/assistants/v1/session.rb +335 -0
  140. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +605 -0
  141. data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
  142. data/lib/twilio-ruby/rest/assistants.rb +6 -0
  143. data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
  144. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +309 -279
  145. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +308 -279
  146. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +282 -248
  147. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +253 -235
  148. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +256 -216
  149. data/lib/twilio-ruby/rest/bulkexports/v1.rb +57 -55
  150. data/lib/twilio-ruby/rest/bulkexports.rb +3 -34
  151. data/lib/twilio-ruby/rest/bulkexports_base.rb +38 -0
  152. data/lib/twilio-ruby/rest/chat/v1/credential.rb +445 -403
  153. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +394 -391
  154. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +448 -440
  155. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +464 -437
  156. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +560 -515
  157. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +422 -367
  158. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +248 -239
  159. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +491 -440
  160. data/lib/twilio-ruby/rest/chat/v1/service.rb +887 -894
  161. data/lib/twilio-ruby/rest/chat/v1.rb +57 -55
  162. data/lib/twilio-ruby/rest/chat/v2/credential.rb +445 -401
  163. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +385 -370
  164. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +394 -386
  165. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +509 -527
  166. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +536 -533
  167. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +466 -467
  168. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +629 -605
  169. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +422 -369
  170. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +378 -381
  171. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +425 -419
  172. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +533 -491
  173. data/lib/twilio-ruby/rest/chat/v2/service.rb +790 -778
  174. data/lib/twilio-ruby/rest/chat/v2.rb +57 -53
  175. data/lib/twilio-ruby/rest/chat/v3/channel.rb +295 -267
  176. data/lib/twilio-ruby/rest/chat/v3.rb +64 -41
  177. data/lib/twilio-ruby/rest/chat.rb +4 -48
  178. data/lib/twilio-ruby/rest/chat_base.rb +48 -0
  179. data/lib/twilio-ruby/rest/client.rb +333 -584
  180. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +190 -0
  181. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +206 -188
  182. data/lib/twilio-ruby/rest/content/v1/content.rb +964 -336
  183. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +255 -0
  184. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +261 -246
  185. data/lib/twilio-ruby/rest/content/v1.rb +54 -45
  186. data/lib/twilio-ruby/rest/content/v2/content.rb +319 -0
  187. data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +312 -0
  188. data/lib/twilio-ruby/rest/content/v2.rb +46 -0
  189. data/lib/twilio-ruby/rest/content.rb +2 -40
  190. data/lib/twilio-ruby/rest/content_base.rb +43 -0
  191. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +498 -444
  192. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +267 -227
  193. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +292 -252
  194. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +344 -344
  195. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +560 -510
  196. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +521 -495
  197. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +451 -403
  198. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +643 -552
  199. data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +263 -0
  200. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +451 -409
  201. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +308 -304
  202. data/lib/twilio-ruby/rest/conversations/v1/role.rb +410 -356
  203. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +378 -373
  204. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +313 -289
  205. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +259 -235
  206. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +320 -279
  207. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +351 -371
  208. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +567 -550
  209. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +530 -530
  210. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +460 -438
  211. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +655 -588
  212. data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +269 -0
  213. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +314 -317
  214. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +422 -380
  215. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -455
  216. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +507 -474
  217. data/lib/twilio-ruby/rest/conversations/v1/service.rb +515 -447
  218. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +465 -435
  219. data/lib/twilio-ruby/rest/conversations/v1/user.rb +495 -441
  220. data/lib/twilio-ruby/rest/conversations/v1.rb +135 -136
  221. data/lib/twilio-ruby/rest/conversations.rb +9 -34
  222. data/lib/twilio-ruby/rest/conversations_base.rb +38 -0
  223. data/lib/twilio-ruby/rest/events/v1/event_type.rb +326 -288
  224. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +309 -0
  225. data/lib/twilio-ruby/rest/events/v1/schema.rb +234 -218
  226. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +121 -100
  227. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +127 -103
  228. data/lib/twilio-ruby/rest/events/v1/sink.rb +460 -408
  229. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +391 -339
  230. data/lib/twilio-ruby/rest/events/v1/subscription.rb +436 -387
  231. data/lib/twilio-ruby/rest/events/v1.rb +87 -87
  232. data/lib/twilio-ruby/rest/events.rb +5 -34
  233. data/lib/twilio-ruby/rest/events_base.rb +38 -0
  234. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +452 -301
  235. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +385 -330
  236. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +555 -496
  237. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +589 -570
  238. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +328 -306
  239. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +232 -0
  240. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +452 -384
  241. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +363 -303
  242. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +448 -380
  243. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +355 -403
  244. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +213 -190
  245. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +161 -0
  246. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +141 -124
  247. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +192 -166
  248. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +252 -227
  249. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +354 -319
  250. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +352 -0
  251. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +442 -398
  252. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +321 -225
  253. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +408 -0
  254. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +461 -0
  255. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +251 -0
  256. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +400 -0
  257. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +397 -0
  258. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +237 -0
  259. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +343 -0
  260. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +260 -0
  261. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +192 -0
  262. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +404 -331
  263. data/lib/twilio-ruby/rest/flex_api/v1.rb +313 -207
  264. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +339 -0
  265. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +152 -127
  266. data/lib/twilio-ruby/rest/flex_api/v2.rb +70 -28
  267. data/lib/twilio-ruby/rest/flex_api.rb +21 -111
  268. data/lib/twilio-ruby/rest/flex_api_base.rb +43 -0
  269. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +255 -227
  270. data/lib/twilio-ruby/rest/frontline_api/v1.rb +42 -38
  271. data/lib/twilio-ruby/rest/frontline_api.rb +2 -34
  272. data/lib/twilio-ruby/rest/frontline_api_base.rb +38 -0
  273. data/lib/twilio-ruby/rest/iam/v1/api_key.rb +280 -0
  274. data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +233 -0
  275. data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +181 -0
  276. data/lib/twilio-ruby/rest/iam/v1/token.rb +186 -0
  277. data/lib/twilio-ruby/rest/iam/v1.rb +67 -0
  278. data/lib/twilio-ruby/rest/iam.rb +6 -0
  279. data/lib/twilio-ruby/rest/iam_base.rb +38 -0
  280. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +323 -315
  281. data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +357 -0
  282. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +273 -255
  283. data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +245 -225
  284. data/lib/twilio-ruby/rest/insights/v1/call.rb +267 -236
  285. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +561 -433
  286. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +491 -467
  287. data/lib/twilio-ruby/rest/insights/v1/conference.rb +505 -502
  288. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +386 -371
  289. data/lib/twilio-ruby/rest/insights/v1/room.rb +498 -489
  290. data/lib/twilio-ruby/rest/insights/v1/setting.rb +257 -205
  291. data/lib/twilio-ruby/rest/insights/v1.rb +84 -83
  292. data/lib/twilio-ruby/rest/insights.rb +6 -34
  293. data/lib/twilio-ruby/rest/insights_base.rb +38 -0
  294. data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +464 -0
  295. data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +363 -0
  296. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +223 -0
  297. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +201 -0
  298. data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +365 -0
  299. data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +363 -0
  300. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +534 -0
  301. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +231 -0
  302. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +403 -0
  303. data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +265 -0
  304. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +538 -0
  305. data/lib/twilio-ruby/rest/intelligence/v2.rb +176 -0
  306. data/lib/twilio-ruby/rest/intelligence.rb +6 -0
  307. data/lib/twilio-ruby/rest/intelligence_base.rb +38 -0
  308. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +445 -364
  309. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +394 -359
  310. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +448 -397
  311. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +464 -409
  312. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +560 -488
  313. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +422 -347
  314. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +248 -233
  315. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +491 -418
  316. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +887 -779
  317. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +57 -53
  318. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +445 -364
  319. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +385 -343
  320. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +394 -359
  321. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +509 -451
  322. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +536 -479
  323. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +466 -411
  324. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +629 -555
  325. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +422 -347
  326. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +378 -351
  327. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +417 -384
  328. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +533 -467
  329. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +790 -689
  330. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +57 -53
  331. data/lib/twilio-ruby/rest/ip_messaging.rb +3 -41
  332. data/lib/twilio-ruby/rest/ip_messaging_base.rb +43 -0
  333. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +248 -237
  334. data/lib/twilio-ruby/rest/lookups/v1.rb +42 -39
  335. data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +315 -0
  336. data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +390 -0
  337. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +386 -342
  338. data/lib/twilio-ruby/rest/lookups/v2/query.rb +456 -0
  339. data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +136 -0
  340. data/lib/twilio-ruby/rest/lookups/v2.rb +128 -38
  341. data/lib/twilio-ruby/rest/lookups.rb +2 -41
  342. data/lib/twilio-ruby/rest/lookups_base.rb +43 -0
  343. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +316 -0
  344. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +343 -0
  345. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +363 -0
  346. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +162 -0
  347. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +482 -0
  348. data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +221 -0
  349. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +325 -0
  350. data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +146 -0
  351. data/lib/twilio-ruby/rest/marketplace/v1.rb +91 -0
  352. data/lib/twilio-ruby/rest/marketplace.rb +6 -0
  353. data/lib/twilio-ruby/rest/marketplace_base.rb +38 -0
  354. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +143 -0
  355. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +372 -346
  356. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +532 -443
  357. data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +196 -0
  358. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +295 -0
  359. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +292 -259
  360. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +243 -0
  361. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +165 -144
  362. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +223 -0
  363. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +201 -0
  364. data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +243 -0
  365. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +369 -335
  366. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +383 -0
  367. data/lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb +392 -0
  368. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +376 -341
  369. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +376 -336
  370. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +630 -521
  371. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +128 -115
  372. data/lib/twilio-ruby/rest/messaging/v1/service.rb +818 -763
  373. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +810 -699
  374. data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +113 -94
  375. data/lib/twilio-ruby/rest/messaging/v1.rb +202 -124
  376. data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +769 -0
  377. data/lib/twilio-ruby/rest/messaging/v2.rb +49 -0
  378. data/lib/twilio-ruby/rest/messaging.rb +10 -35
  379. data/lib/twilio-ruby/rest/messaging_base.rb +43 -0
  380. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +408 -395
  381. data/lib/twilio-ruby/rest/monitor/v1/event.rb +391 -390
  382. data/lib/twilio-ruby/rest/monitor/v1.rb +57 -53
  383. data/lib/twilio-ruby/rest/monitor.rb +3 -34
  384. data/lib/twilio-ruby/rest/monitor_base.rb +38 -0
  385. data/lib/twilio-ruby/rest/notify/v1/credential.rb +445 -408
  386. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +455 -452
  387. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +320 -362
  388. data/lib/twilio-ruby/rest/notify/v1/service.rb +650 -622
  389. data/lib/twilio-ruby/rest/notify/v1.rb +57 -55
  390. data/lib/twilio-ruby/rest/notify.rb +3 -34
  391. data/lib/twilio-ruby/rest/notify_base.rb +38 -0
  392. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +249 -0
  393. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +132 -0
  394. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +325 -0
  395. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +328 -0
  396. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +260 -0
  397. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +153 -0
  398. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +170 -0
  399. data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +280 -0
  400. data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +165 -0
  401. data/lib/twilio-ruby/rest/numbers/v1.rb +155 -0
  402. data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +347 -0
  403. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +421 -0
  404. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +274 -0
  405. data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +281 -0
  406. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +613 -0
  407. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +288 -261
  408. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +340 -298
  409. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +353 -309
  410. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +201 -181
  411. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +630 -607
  412. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +417 -351
  413. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +300 -266
  414. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +349 -307
  415. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +445 -371
  416. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +300 -266
  417. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +178 -181
  418. data/lib/twilio-ruby/rest/numbers/v2.rb +93 -28
  419. data/lib/twilio-ruby/rest/numbers.rb +2 -34
  420. data/lib/twilio-ruby/rest/numbers_base.rb +43 -0
  421. data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +148 -0
  422. data/lib/twilio-ruby/rest/oauth/v1/token.rb +180 -151
  423. data/lib/twilio-ruby/rest/oauth/v1.rb +39 -56
  424. data/lib/twilio-ruby/rest/oauth.rb +3 -65
  425. data/lib/twilio-ruby/rest/oauth_base.rb +38 -0
  426. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +374 -396
  427. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +466 -446
  428. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +634 -625
  429. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +57 -55
  430. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +309 -298
  431. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +333 -309
  432. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +356 -330
  433. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +453 -398
  434. data/lib/twilio-ruby/rest/preview/marketplace.rb +57 -53
  435. data/lib/twilio-ruby/rest/preview/wireless/command.rb +401 -364
  436. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +472 -398
  437. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +237 -205
  438. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +588 -523
  439. data/lib/twilio-ruby/rest/preview/wireless.rb +72 -69
  440. data/lib/twilio-ruby/rest/preview.rb +10 -87
  441. data/lib/twilio-ruby/rest/preview_base.rb +48 -0
  442. data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +148 -0
  443. data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +186 -0
  444. data/lib/twilio-ruby/rest/preview_iam/v1.rb +46 -0
  445. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/account.rb +309 -0
  446. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb +375 -0
  447. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/user.rb +530 -0
  448. data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +277 -0
  449. data/lib/twilio-ruby/rest/preview_iam/versionless.rb +49 -0
  450. data/lib/twilio-ruby/rest/preview_iam.rb +9 -0
  451. data/lib/twilio-ruby/rest/preview_iam_base.rb +38 -0
  452. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +307 -275
  453. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +108 -119
  454. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +300 -268
  455. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +108 -119
  456. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +307 -275
  457. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +227 -197
  458. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +122 -135
  459. data/lib/twilio-ruby/rest/pricing/v1.rb +45 -42
  460. data/lib/twilio-ruby/rest/pricing/v2/country.rb +299 -270
  461. data/lib/twilio-ruby/rest/pricing/v2/number.rb +239 -217
  462. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +307 -275
  463. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +245 -220
  464. data/lib/twilio-ruby/rest/pricing/v2/voice.rb +122 -138
  465. data/lib/twilio-ruby/rest/pricing/v2.rb +63 -65
  466. data/lib/twilio-ruby/rest/pricing.rb +6 -41
  467. data/lib/twilio-ruby/rest/pricing_base.rb +43 -0
  468. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +443 -403
  469. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +420 -418
  470. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +444 -449
  471. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +439 -442
  472. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +546 -506
  473. data/lib/twilio-ruby/rest/proxy/v1/service.rb +556 -596
  474. data/lib/twilio-ruby/rest/proxy/v1.rb +42 -38
  475. data/lib/twilio-ruby/rest/proxy.rb +2 -34
  476. data/lib/twilio-ruby/rest/proxy_base.rb +38 -0
  477. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +273 -227
  478. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +273 -223
  479. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +273 -227
  480. data/lib/twilio-ruby/rest/routes/v2.rb +72 -69
  481. data/lib/twilio-ruby/rest/routes.rb +4 -34
  482. data/lib/twilio-ruby/rest/routes_base.rb +38 -0
  483. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +323 -323
  484. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +436 -380
  485. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +213 -208
  486. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +425 -384
  487. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +353 -338
  488. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +369 -383
  489. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +427 -396
  490. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +474 -447
  491. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +228 -234
  492. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +350 -353
  493. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +436 -380
  494. data/lib/twilio-ruby/rest/serverless/v1/service.rb +547 -493
  495. data/lib/twilio-ruby/rest/serverless/v1.rb +42 -37
  496. data/lib/twilio-ruby/rest/serverless.rb +2 -34
  497. data/lib/twilio-ruby/rest/serverless_base.rb +38 -0
  498. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +213 -199
  499. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +228 -218
  500. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +378 -355
  501. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +442 -394
  502. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +213 -200
  503. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +228 -221
  504. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +378 -361
  505. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +494 -449
  506. data/lib/twilio-ruby/rest/studio/v1/flow.rb +394 -355
  507. data/lib/twilio-ruby/rest/studio/v1.rb +42 -37
  508. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +213 -200
  509. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +228 -221
  510. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +378 -361
  511. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +487 -442
  512. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +351 -320
  513. data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +245 -0
  514. data/lib/twilio-ruby/rest/studio/v2/flow.rb +545 -472
  515. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +128 -99
  516. data/lib/twilio-ruby/rest/studio/v2.rb +48 -44
  517. data/lib/twilio-ruby/rest/studio.rb +3 -41
  518. data/lib/twilio-ruby/rest/studio_base.rb +43 -0
  519. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +407 -362
  520. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +492 -483
  521. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +412 -409
  522. data/lib/twilio-ruby/rest/supersim/v1/network.rb +310 -297
  523. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +355 -332
  524. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +400 -351
  525. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +250 -237
  526. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +246 -224
  527. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +204 -188
  528. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +480 -453
  529. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +372 -361
  530. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +309 -344
  531. data/lib/twilio-ruby/rest/supersim/v1.rb +144 -147
  532. data/lib/twilio-ruby/rest/supersim.rb +10 -34
  533. data/lib/twilio-ruby/rest/supersim_base.rb +38 -0
  534. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +396 -371
  535. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +481 -423
  536. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +490 -490
  537. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +396 -370
  538. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +496 -445
  539. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +493 -495
  540. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +396 -368
  541. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +496 -444
  542. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +146 -132
  543. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +445 -400
  544. data/lib/twilio-ruby/rest/sync/v1/service.rb +601 -567
  545. data/lib/twilio-ruby/rest/sync/v1.rb +42 -37
  546. data/lib/twilio-ruby/rest/sync.rb +2 -34
  547. data/lib/twilio-ruby/rest/sync_base.rb +38 -0
  548. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +431 -395
  549. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +452 -464
  550. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +720 -749
  551. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +676 -661
  552. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +435 -382
  553. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +168 -0
  554. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +366 -369
  555. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +286 -275
  556. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +237 -236
  557. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +243 -258
  558. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +600 -572
  559. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +702 -732
  560. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +405 -388
  561. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +242 -239
  562. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +288 -265
  563. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +222 -193
  564. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +258 -234
  565. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +647 -637
  566. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +366 -375
  567. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +252 -241
  568. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +237 -244
  569. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +549 -510
  570. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +360 -356
  571. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +238 -206
  572. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +248 -234
  573. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +746 -730
  574. data/lib/twilio-ruby/rest/taskrouter/v1.rb +42 -37
  575. data/lib/twilio-ruby/rest/taskrouter.rb +2 -34
  576. data/lib/twilio-ruby/rest/taskrouter_base.rb +38 -0
  577. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +362 -320
  578. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +362 -317
  579. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +466 -419
  580. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +495 -451
  581. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +237 -191
  582. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +656 -630
  583. data/lib/twilio-ruby/rest/trunking/v1.rb +42 -38
  584. data/lib/twilio-ruby/rest/trunking.rb +2 -34
  585. data/lib/twilio-ruby/rest/trunking_base.rb +38 -0
  586. data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +257 -0
  587. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +365 -0
  588. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +224 -0
  589. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +377 -352
  590. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +361 -323
  591. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +349 -321
  592. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +558 -513
  593. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +409 -346
  594. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +292 -261
  595. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +285 -252
  596. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +423 -359
  597. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +292 -261
  598. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +377 -352
  599. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +361 -323
  600. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +349 -321
  601. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +558 -513
  602. data/lib/twilio-ruby/rest/trusthub/v1.rb +168 -139
  603. data/lib/twilio-ruby/rest/trusthub.rb +8 -34
  604. data/lib/twilio-ruby/rest/trusthub_base.rb +38 -0
  605. data/lib/twilio-ruby/rest/verify/v2/form.rb +200 -183
  606. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +238 -207
  607. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +285 -254
  608. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +198 -192
  609. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +518 -531
  610. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +467 -453
  611. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +263 -283
  612. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +442 -414
  613. data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +405 -363
  614. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +427 -388
  615. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +446 -384
  616. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +402 -371
  617. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +228 -205
  618. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +473 -412
  619. data/lib/twilio-ruby/rest/verify/v2/service.rb +876 -780
  620. data/lib/twilio-ruby/rest/verify/v2/template.rb +225 -205
  621. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +382 -387
  622. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +246 -226
  623. data/lib/twilio-ruby/rest/verify/v2.rb +99 -103
  624. data/lib/twilio-ruby/rest/verify.rb +7 -34
  625. data/lib/twilio-ruby/rest/verify_base.rb +38 -0
  626. data/lib/twilio-ruby/rest/video/v1/composition.rb +497 -507
  627. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +551 -647
  628. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +294 -261
  629. data/lib/twilio-ruby/rest/video/v1/recording.rb +440 -426
  630. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +294 -261
  631. data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +266 -0
  632. data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +341 -0
  633. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +194 -0
  634. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +348 -0
  635. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +514 -0
  636. data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +183 -0
  637. data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +437 -0
  638. data/lib/twilio-ruby/rest/video/v1/room/transcriptions.rb +417 -0
  639. data/lib/twilio-ruby/rest/video/v1/room.rb +661 -602
  640. data/lib/twilio-ruby/rest/video/v1.rb +99 -99
  641. data/lib/twilio-ruby/rest/video.rb +7 -34
  642. data/lib/twilio-ruby/rest/video_base.rb +38 -0
  643. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +163 -176
  644. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +527 -486
  645. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +466 -434
  646. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +417 -352
  647. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +142 -121
  648. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +199 -183
  649. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +383 -397
  650. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +228 -190
  651. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +123 -121
  652. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +403 -339
  653. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +386 -319
  654. data/lib/twilio-ruby/rest/voice/v1.rb +130 -117
  655. data/lib/twilio-ruby/rest/voice.rb +7 -34
  656. data/lib/twilio-ruby/rest/voice_base.rb +33 -0
  657. data/lib/twilio-ruby/rest/wireless/v1/command.rb +428 -406
  658. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +492 -436
  659. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +302 -284
  660. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +243 -243
  661. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +654 -647
  662. data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +230 -221
  663. data/lib/twilio-ruby/rest/wireless/v1.rb +78 -76
  664. data/lib/twilio-ruby/rest/wireless.rb +5 -34
  665. data/lib/twilio-ruby/rest/wireless_base.rb +38 -0
  666. data/lib/twilio-ruby/rest.rb +1 -0
  667. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  668. data/lib/twilio-ruby/twiml/voice_response.rb +263 -20
  669. data/lib/twilio-ruby/version.rb +1 -1
  670. data/sonar-project.properties +1 -1
  671. data/twilio-ruby.gemspec +3 -2
  672. metadata +201 -108
  673. data/conf/cacert.pem +0 -3376
  674. data/lib/twilio-ruby/framework/twilio_response.rb +0 -19
  675. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +0 -500
  676. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +0 -500
  677. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +0 -500
  678. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +0 -500
  679. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +0 -500
  680. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +0 -500
  681. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +0 -500
  682. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -464
  683. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -301
  684. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -314
  685. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +0 -348
  686. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +0 -348
  687. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +0 -163
  688. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +0 -348
  689. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +0 -137
  690. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -220
  691. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -214
  692. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -399
  693. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -418
  694. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -392
  695. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -469
  696. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -218
  697. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -386
  698. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -456
  699. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -255
  700. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -237
  701. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -507
  702. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -420
  703. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -650
  704. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -194
  705. data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -52
  706. data/lib/twilio-ruby/rest/autopilot.rb +0 -53
  707. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +0 -290
  708. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +0 -144
  709. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +0 -321
  710. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +0 -397
  711. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -399
  712. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +0 -221
  713. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +0 -403
  714. data/lib/twilio-ruby/rest/media/v1.rb +0 -76
  715. data/lib/twilio-ruby/rest/media.rb +0 -65
  716. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +0 -164
  717. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +0 -257
  718. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -317
  719. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -310
  720. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -305
  721. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -342
  722. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -335
  723. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -393
  724. data/lib/twilio-ruby/rest/microvisor/v1.rb +0 -92
  725. data/lib/twilio-ruby/rest/microvisor.rb +0 -70
  726. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +0 -153
  727. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +0 -162
  728. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +0 -242
  729. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +0 -193
  730. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -382
  731. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -365
  732. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -425
  733. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -376
  734. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -469
  735. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -45
  736. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -385
  737. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -406
  738. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -418
  739. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -385
  740. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -405
  741. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -415
  742. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -385
  743. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -405
  744. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -462
  745. data/lib/twilio-ruby/rest/preview/sync.rb +0 -44
  746. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -212
  747. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -212
  748. data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -206
  749. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -386
  750. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -407
  751. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -380
  752. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -437
  753. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -212
  754. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
  755. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -428
  756. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -241
  757. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -225
  758. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -495
  759. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -629
  760. data/lib/twilio-ruby/rest/preview/understand.rb +0 -45
  761. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -377
  762. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +0 -199
  763. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -413
  764. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +0 -240
  765. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +0 -335
  766. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -175
  767. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +0 -340
  768. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +0 -499
  769. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -144
@@ -1,668 +1,683 @@
1
1
  ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Taskrouter
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
6
13
  #
7
- # frozen_string_literal: true
8
-
9
- module Twilio
10
- module REST
11
- class Taskrouter < Domain
12
- class V1 < Version
13
- class WorkspaceContext < InstanceContext
14
- class TaskList < ListResource
15
- ##
16
- # Initialize the TaskList
17
- # @param [Version] version Version that contains the resource
18
- # @param [String] workspace_sid The SID of the Workspace that contains the Task.
19
- # @return [TaskList] TaskList
20
- def initialize(version, workspace_sid: nil)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {workspace_sid: workspace_sid}
25
- @uri = "/Workspaces/#{@solution[:workspace_sid]}/Tasks"
26
- end
27
-
28
- ##
29
- # Lists TaskInstance records from the API as a list.
30
- # Unlike stream(), this operation is eager and will load `limit` records into
31
- # memory before returning.
32
- # @param [String] priority The priority value of the Tasks to read. Returns the
33
- # list of all Tasks in the Workspace with the specified priority.
34
- # @param [Array[String]] assignment_status The `assignment_status` of the Tasks
35
- # you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`,
36
- # `wrapping`, or `completed`. Returns all Tasks in the Workspace with the
37
- # specified `assignment_status`.
38
- # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
39
- # Returns the Tasks controlled by the Workflow identified by this SID.
40
- # @param [String] workflow_name The friendly name of the Workflow with the Tasks
41
- # to read. Returns the Tasks controlled by the Workflow identified by this
42
- # friendly name.
43
- # @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read.
44
- # Returns the Tasks waiting in the TaskQueue identified by this SID.
45
- # @param [String] task_queue_name The `friendly_name` of the TaskQueue with the
46
- # Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this
47
- # friendly name.
48
- # @param [String] evaluate_task_attributes The attributes of the Tasks to read.
49
- # Returns the Tasks that match the attributes specified in this parameter.
50
- # @param [String] ordering How to order the returned Task resources. y default,
51
- # Tasks are sorted by ascending DateCreated. This value is specified as:
52
- # `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated`
53
- # and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns
54
- # Tasks ordered in descending order of their Priority. Multiple sort orders can be
55
- # specified in a comma-separated list such as `Priority:desc,DateCreated:asc`,
56
- # which returns the Tasks in descending Priority order and ascending DateCreated
57
- # Order.
58
- # @param [Boolean] has_addons Whether to read Tasks with addons. If `true`,
59
- # returns only Tasks with addons. If `false`, returns only Tasks without addons.
60
- # @param [Integer] limit Upper limit for the number of records to return. stream()
61
- # guarantees to never return more than limit. Default is no limit
62
- # @param [Integer] page_size Number of records to fetch per request, when
63
- # not set will use the default value of 50 records. If no page_size is defined
64
- # but a limit is defined, stream() will attempt to read the limit with the most
65
- # efficient page size, i.e. min(limit, 1000)
66
- # @return [Array] Array of up to limit results
67
- def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
68
- self.stream(
69
- priority: priority,
70
- assignment_status: assignment_status,
71
- workflow_sid: workflow_sid,
72
- workflow_name: workflow_name,
73
- task_queue_sid: task_queue_sid,
74
- task_queue_name: task_queue_name,
75
- evaluate_task_attributes: evaluate_task_attributes,
76
- ordering: ordering,
77
- has_addons: has_addons,
78
- limit: limit,
79
- page_size: page_size
80
- ).entries
81
- end
82
-
83
- ##
84
- # Streams TaskInstance records from the API as an Enumerable.
85
- # This operation lazily loads records as efficiently as possible until the limit
86
- # is reached.
87
- # @param [String] priority The priority value of the Tasks to read. Returns the
88
- # list of all Tasks in the Workspace with the specified priority.
89
- # @param [Array[String]] assignment_status The `assignment_status` of the Tasks
90
- # you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`,
91
- # `wrapping`, or `completed`. Returns all Tasks in the Workspace with the
92
- # specified `assignment_status`.
93
- # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
94
- # Returns the Tasks controlled by the Workflow identified by this SID.
95
- # @param [String] workflow_name The friendly name of the Workflow with the Tasks
96
- # to read. Returns the Tasks controlled by the Workflow identified by this
97
- # friendly name.
98
- # @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read.
99
- # Returns the Tasks waiting in the TaskQueue identified by this SID.
100
- # @param [String] task_queue_name The `friendly_name` of the TaskQueue with the
101
- # Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this
102
- # friendly name.
103
- # @param [String] evaluate_task_attributes The attributes of the Tasks to read.
104
- # Returns the Tasks that match the attributes specified in this parameter.
105
- # @param [String] ordering How to order the returned Task resources. y default,
106
- # Tasks are sorted by ascending DateCreated. This value is specified as:
107
- # `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated`
108
- # and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns
109
- # Tasks ordered in descending order of their Priority. Multiple sort orders can be
110
- # specified in a comma-separated list such as `Priority:desc,DateCreated:asc`,
111
- # which returns the Tasks in descending Priority order and ascending DateCreated
112
- # Order.
113
- # @param [Boolean] has_addons Whether to read Tasks with addons. If `true`,
114
- # returns only Tasks with addons. If `false`, returns only Tasks without addons.
115
- # @param [Integer] limit Upper limit for the number of records to return. stream()
116
- # guarantees to never return more than limit. Default is no limit.
117
- # @param [Integer] page_size Number of records to fetch per request, when
118
- # not set will use the default value of 50 records. If no page_size is defined
119
- # but a limit is defined, stream() will attempt to read the limit with the most
120
- # efficient page size, i.e. min(limit, 1000)
121
- # @return [Enumerable] Enumerable that will yield up to limit results
122
- def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
123
- limits = @version.read_limits(limit, page_size)
124
-
125
- page = self.page(
126
- priority: priority,
127
- assignment_status: assignment_status,
128
- workflow_sid: workflow_sid,
129
- workflow_name: workflow_name,
130
- task_queue_sid: task_queue_sid,
131
- task_queue_name: task_queue_name,
132
- evaluate_task_attributes: evaluate_task_attributes,
133
- ordering: ordering,
134
- has_addons: has_addons,
135
- page_size: limits[:page_size],
136
- )
137
-
138
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
139
- end
140
-
141
- ##
142
- # When passed a block, yields TaskInstance records from the API.
143
- # This operation lazily loads records as efficiently as possible until the limit
144
- # is reached.
145
- def each
146
- limits = @version.read_limits
147
-
148
- page = self.page(page_size: limits[:page_size], )
149
-
150
- @version.stream(page,
151
- limit: limits[:limit],
152
- page_limit: limits[:page_limit]).each {|x| yield x}
153
- end
154
-
155
- ##
156
- # Retrieve a single page of TaskInstance records from the API.
157
- # Request is executed immediately.
158
- # @param [String] priority The priority value of the Tasks to read. Returns the
159
- # list of all Tasks in the Workspace with the specified priority.
160
- # @param [Array[String]] assignment_status The `assignment_status` of the Tasks
161
- # you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`,
162
- # `wrapping`, or `completed`. Returns all Tasks in the Workspace with the
163
- # specified `assignment_status`.
164
- # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
165
- # Returns the Tasks controlled by the Workflow identified by this SID.
166
- # @param [String] workflow_name The friendly name of the Workflow with the Tasks
167
- # to read. Returns the Tasks controlled by the Workflow identified by this
168
- # friendly name.
169
- # @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read.
170
- # Returns the Tasks waiting in the TaskQueue identified by this SID.
171
- # @param [String] task_queue_name The `friendly_name` of the TaskQueue with the
172
- # Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this
173
- # friendly name.
174
- # @param [String] evaluate_task_attributes The attributes of the Tasks to read.
175
- # Returns the Tasks that match the attributes specified in this parameter.
176
- # @param [String] ordering How to order the returned Task resources. y default,
177
- # Tasks are sorted by ascending DateCreated. This value is specified as:
178
- # `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated`
179
- # and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns
180
- # Tasks ordered in descending order of their Priority. Multiple sort orders can be
181
- # specified in a comma-separated list such as `Priority:desc,DateCreated:asc`,
182
- # which returns the Tasks in descending Priority order and ascending DateCreated
183
- # Order.
184
- # @param [Boolean] has_addons Whether to read Tasks with addons. If `true`,
185
- # returns only Tasks with addons. If `false`, returns only Tasks without addons.
186
- # @param [String] page_token PageToken provided by the API
187
- # @param [Integer] page_number Page Number, this value is simply for client state
188
- # @param [Integer] page_size Number of records to return, defaults to 50
189
- # @return [Page] Page of TaskInstance
190
- def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
191
- params = Twilio::Values.of({
192
- 'Priority' => priority,
193
- 'AssignmentStatus' => Twilio.serialize_list(assignment_status) { |e| e },
194
- 'WorkflowSid' => workflow_sid,
195
- 'WorkflowName' => workflow_name,
196
- 'TaskQueueSid' => task_queue_sid,
197
- 'TaskQueueName' => task_queue_name,
198
- 'EvaluateTaskAttributes' => evaluate_task_attributes,
199
- 'Ordering' => ordering,
200
- 'HasAddons' => has_addons,
201
- 'PageToken' => page_token,
202
- 'Page' => page_number,
203
- 'PageSize' => page_size,
204
- })
205
-
206
- response = @version.page('GET', @uri, params: params)
207
-
208
- TaskPage.new(@version, response, @solution)
209
- end
210
-
211
- ##
212
- # Retrieve a single page of TaskInstance records from the API.
213
- # Request is executed immediately.
214
- # @param [String] target_url API-generated URL for the requested results page
215
- # @return [Page] Page of TaskInstance
216
- def get_page(target_url)
217
- response = @version.domain.request(
218
- 'GET',
219
- target_url
220
- )
221
- TaskPage.new(@version, response, @solution)
222
- end
223
-
224
- ##
225
- # Create the TaskInstance
226
- # @param [String] timeout The amount of time in seconds the new task can live
227
- # before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds).
228
- # The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled`
229
- # event will fire with description `Task TTL Exceeded`.
230
- # @param [String] priority The priority to assign the new task and override the
231
- # default. When supplied, the new Task will have this priority unless it matches a
232
- # Workflow Target with a Priority set. When not supplied, the new Task will have
233
- # the priority of the matching Workflow Target. Value can be 0 to 2^31^
234
- # (2,147,483,647).
235
- # @param [String] task_channel When MultiTasking is enabled, specify the
236
- # TaskChannel by passing either its `unique_name` or `sid`. Default value is
237
- # `default`.
238
- # @param [String] workflow_sid The SID of the Workflow that you would like to
239
- # handle routing for the new Task. If there is only one Workflow defined for the
240
- # Workspace that you are posting the new task to, this parameter is optional.
241
- # @param [String] attributes A URL-encoded JSON string with the attributes of the
242
- # new task. This value is passed to the Workflow's `assignment_callback_url` when
243
- # the Task is assigned to a Worker. For example: `{ "task_type": "call",
244
- # "twilio_call_sid": "CAxxx", "customer_ticket_number": "12345" }`.
245
- # @return [TaskInstance] Created TaskInstance
246
- def create(timeout: :unset, priority: :unset, task_channel: :unset, workflow_sid: :unset, attributes: :unset)
247
- data = Twilio::Values.of({
248
- 'Timeout' => timeout,
249
- 'Priority' => priority,
250
- 'TaskChannel' => task_channel,
251
- 'WorkflowSid' => workflow_sid,
252
- 'Attributes' => attributes,
253
- })
254
-
255
- payload = @version.create('POST', @uri, data: data)
256
-
257
- TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], )
258
- end
259
-
260
- ##
261
- # Provide a user friendly representation
262
- def to_s
263
- '#<Twilio.Taskrouter.V1.TaskList>'
264
- end
265
- end
266
-
267
- class TaskPage < Page
268
- ##
269
- # Initialize the TaskPage
270
- # @param [Version] version Version that contains the resource
271
- # @param [Response] response Response from the API
272
- # @param [Hash] solution Path solution for the resource
273
- # @return [TaskPage] TaskPage
274
- def initialize(version, response, solution)
275
- super(version, response)
276
-
277
- # Path Solution
278
- @solution = solution
279
- end
280
-
281
- ##
282
- # Build an instance of TaskInstance
283
- # @param [Hash] payload Payload response from the API
284
- # @return [TaskInstance] TaskInstance
285
- def get_instance(payload)
286
- TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], )
287
- end
288
-
289
- ##
290
- # Provide a user friendly representation
291
- def to_s
292
- '<Twilio.Taskrouter.V1.TaskPage>'
293
- end
294
- end
295
-
296
- class TaskContext < InstanceContext
297
- ##
298
- # Initialize the TaskContext
299
- # @param [Version] version Version that contains the resource
300
- # @param [String] workspace_sid The SID of the Workspace with the Task to fetch.
301
- # @param [String] sid The SID of the Task resource to fetch.
302
- # @return [TaskContext] TaskContext
303
- def initialize(version, workspace_sid, sid)
304
- super(version)
305
-
306
- # Path Solution
307
- @solution = {workspace_sid: workspace_sid, sid: sid, }
308
- @uri = "/Workspaces/#{@solution[:workspace_sid]}/Tasks/#{@solution[:sid]}"
309
-
310
- # Dependents
311
- @reservations = nil
312
- end
313
-
314
- ##
315
- # Fetch the TaskInstance
316
- # @return [TaskInstance] Fetched TaskInstance
317
- def fetch
318
- payload = @version.fetch('GET', @uri)
319
-
320
- TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid], )
321
- end
322
-
323
- ##
324
- # Update the TaskInstance
325
- # @param [String] attributes The JSON string that describes the custom attributes
326
- # of the task.
327
- # @param [task.Status] assignment_status The new status of the task. Can be:
328
- # `canceled`, to cancel a Task that is currently `pending` or `reserved`;
329
- # `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to
330
- # the completed state.
331
- # @param [String] reason The reason that the Task was canceled or completed. This
332
- # parameter is required only if the Task is canceled or completed. Setting this
333
- # value queues the task for deletion and logs the reason.
334
- # @param [String] priority The Task's new priority value. When supplied, the Task
335
- # takes on the specified priority unless it matches a Workflow Target with a
336
- # Priority set. Value can be 0 to 2^31^ (2,147,483,647).
337
- # @param [String] task_channel When MultiTasking is enabled, specify the
338
- # TaskChannel with the task to update. Can be the TaskChannel's SID or its
339
- # `unique_name`, such as `voice`, `sms`, or `default`.
340
- # @param [String] if_match If provided, applies this mutation if (and only if) the
341
- # {ETag}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag] header of
342
- # the Task matches the provided value. This matches the semantics of (and is
343
- # implemented with) the HTTP {If-Match
344
- # header}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match].
345
- # @return [TaskInstance] Updated TaskInstance
346
- def update(attributes: :unset, assignment_status: :unset, reason: :unset, priority: :unset, task_channel: :unset, if_match: :unset)
347
- data = Twilio::Values.of({
348
- 'Attributes' => attributes,
349
- 'AssignmentStatus' => assignment_status,
350
- 'Reason' => reason,
351
- 'Priority' => priority,
352
- 'TaskChannel' => task_channel,
353
- })
354
- headers = Twilio::Values.of({'If-Match' => if_match, })
355
-
356
- payload = @version.update('POST', @uri, data: data, headers: headers)
357
-
358
- TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid], )
359
- end
360
-
361
- ##
362
- # Delete the TaskInstance
363
- # @param [String] if_match If provided, deletes this Task if (and only if) the
364
- # {ETag}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag] header of
365
- # the Task matches the provided value. This matches the semantics of (and is
366
- # implemented with) the HTTP {If-Match
367
- # header}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match].
368
- # @return [Boolean] true if delete succeeds, false otherwise
369
- def delete(if_match: :unset)
370
- headers = Twilio::Values.of({'If-Match' => if_match, })
371
-
372
- @version.delete('DELETE', @uri, headers: headers)
373
- end
374
-
375
- ##
376
- # Access the reservations
377
- # @return [ReservationList]
378
- # @return [ReservationContext] if sid was passed.
379
- def reservations(sid=:unset)
380
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
381
-
382
- if sid != :unset
383
- return ReservationContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid, )
384
- end
385
-
386
- unless @reservations
387
- @reservations = ReservationList.new(
388
- @version,
389
- workspace_sid: @solution[:workspace_sid],
390
- task_sid: @solution[:sid],
391
- )
392
- end
393
-
394
- @reservations
395
- end
396
-
397
- ##
398
- # Provide a user friendly representation
399
- def to_s
400
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
401
- "#<Twilio.Taskrouter.V1.TaskContext #{context}>"
402
- end
403
-
404
- ##
405
- # Provide a detailed, user friendly representation
406
- def inspect
407
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
408
- "#<Twilio.Taskrouter.V1.TaskContext #{context}>"
409
- end
410
- end
411
-
412
- class TaskInstance < InstanceResource
413
- ##
414
- # Initialize the TaskInstance
415
- # @param [Version] version Version that contains the resource
416
- # @param [Hash] payload payload that contains response from Twilio
417
- # @param [String] workspace_sid The SID of the Workspace that contains the Task.
418
- # @param [String] sid The SID of the Task resource to fetch.
419
- # @return [TaskInstance] TaskInstance
420
- def initialize(version, payload, workspace_sid: nil, sid: nil)
421
- super(version)
422
-
423
- # Marshaled Properties
424
- @properties = {
425
- 'account_sid' => payload['account_sid'],
426
- 'age' => payload['age'] == nil ? payload['age'] : payload['age'].to_i,
427
- 'assignment_status' => payload['assignment_status'],
428
- 'attributes' => payload['attributes'],
429
- 'addons' => payload['addons'],
430
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
431
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
432
- 'task_queue_entered_date' => Twilio.deserialize_iso8601_datetime(payload['task_queue_entered_date']),
433
- 'priority' => payload['priority'] == nil ? payload['priority'] : payload['priority'].to_i,
434
- 'reason' => payload['reason'],
435
- 'sid' => payload['sid'],
436
- 'task_queue_sid' => payload['task_queue_sid'],
437
- 'task_queue_friendly_name' => payload['task_queue_friendly_name'],
438
- 'task_channel_sid' => payload['task_channel_sid'],
439
- 'task_channel_unique_name' => payload['task_channel_unique_name'],
440
- 'timeout' => payload['timeout'] == nil ? payload['timeout'] : payload['timeout'].to_i,
441
- 'workflow_sid' => payload['workflow_sid'],
442
- 'workflow_friendly_name' => payload['workflow_friendly_name'],
443
- 'workspace_sid' => payload['workspace_sid'],
444
- 'url' => payload['url'],
445
- 'links' => payload['links'],
446
- }
447
-
448
- # Context
449
- @instance_context = nil
450
- @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'], }
451
- end
452
-
453
- ##
454
- # Generate an instance context for the instance, the context is capable of
455
- # performing various actions. All instance actions are proxied to the context
456
- # @return [TaskContext] TaskContext for this TaskInstance
457
- def context
458
- unless @instance_context
459
- @instance_context = TaskContext.new(@version, @params['workspace_sid'], @params['sid'], )
460
- end
461
- @instance_context
462
- end
463
-
464
- ##
465
- # @return [String] The SID of the Account that created the resource
466
- def account_sid
467
- @properties['account_sid']
468
- end
469
-
470
- ##
471
- # @return [String] The number of seconds since the Task was created
472
- def age
473
- @properties['age']
474
- end
475
-
476
- ##
477
- # @return [task.Status] The current status of the Task's assignment
478
- def assignment_status
479
- @properties['assignment_status']
480
- end
481
-
482
- ##
483
- # @return [String] The JSON string with custom attributes of the work
484
- def attributes
485
- @properties['attributes']
486
- end
487
-
488
- ##
489
- # @return [String] An object that contains the addon data for all installed addons
490
- def addons
491
- @properties['addons']
492
- end
493
-
494
- ##
495
- # @return [Time] The ISO 8601 date and time in GMT when the resource was created
496
- def date_created
497
- @properties['date_created']
498
- end
499
-
500
- ##
501
- # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
502
- def date_updated
503
- @properties['date_updated']
504
- end
505
-
506
- ##
507
- # @return [Time] The ISO 8601 date and time in GMT when the Task entered the TaskQueue.
508
- def task_queue_entered_date
509
- @properties['task_queue_entered_date']
510
- end
511
-
512
- ##
513
- # @return [String] Retrieve the list of all Tasks in the Workspace with the specified priority
514
- def priority
515
- @properties['priority']
516
- end
517
-
518
- ##
519
- # @return [String] The reason the Task was canceled or completed
520
- def reason
521
- @properties['reason']
522
- end
523
-
524
- ##
525
- # @return [String] The unique string that identifies the resource
526
- def sid
527
- @properties['sid']
528
- end
529
-
530
- ##
531
- # @return [String] The SID of the TaskQueue
532
- def task_queue_sid
533
- @properties['task_queue_sid']
534
- end
535
-
536
- ##
537
- # @return [String] The friendly name of the TaskQueue
538
- def task_queue_friendly_name
539
- @properties['task_queue_friendly_name']
540
- end
541
-
542
- ##
543
- # @return [String] The SID of the TaskChannel
544
- def task_channel_sid
545
- @properties['task_channel_sid']
546
- end
547
-
548
- ##
549
- # @return [String] The unique name of the TaskChannel
550
- def task_channel_unique_name
551
- @properties['task_channel_unique_name']
552
- end
553
-
554
- ##
555
- # @return [String] The amount of time in seconds that the Task can live before being assigned
556
- def timeout
557
- @properties['timeout']
558
- end
559
-
560
- ##
561
- # @return [String] The SID of the Workflow that is controlling the Task
562
- def workflow_sid
563
- @properties['workflow_sid']
564
- end
565
-
566
- ##
567
- # @return [String] The friendly name of the Workflow that is controlling the Task
568
- def workflow_friendly_name
569
- @properties['workflow_friendly_name']
570
- end
571
-
572
- ##
573
- # @return [String] The SID of the Workspace that contains the Task
574
- def workspace_sid
575
- @properties['workspace_sid']
576
- end
577
-
578
- ##
579
- # @return [String] The absolute URL of the Task resource
580
- def url
581
- @properties['url']
582
- end
583
-
584
- ##
585
- # @return [String] The URLs of related resources
586
- def links
587
- @properties['links']
588
- end
589
-
590
- ##
591
- # Fetch the TaskInstance
592
- # @return [TaskInstance] Fetched TaskInstance
593
- def fetch
594
- context.fetch
595
- end
596
-
597
- ##
598
- # Update the TaskInstance
599
- # @param [String] attributes The JSON string that describes the custom attributes
600
- # of the task.
601
- # @param [task.Status] assignment_status The new status of the task. Can be:
602
- # `canceled`, to cancel a Task that is currently `pending` or `reserved`;
603
- # `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to
604
- # the completed state.
605
- # @param [String] reason The reason that the Task was canceled or completed. This
606
- # parameter is required only if the Task is canceled or completed. Setting this
607
- # value queues the task for deletion and logs the reason.
608
- # @param [String] priority The Task's new priority value. When supplied, the Task
609
- # takes on the specified priority unless it matches a Workflow Target with a
610
- # Priority set. Value can be 0 to 2^31^ (2,147,483,647).
611
- # @param [String] task_channel When MultiTasking is enabled, specify the
612
- # TaskChannel with the task to update. Can be the TaskChannel's SID or its
613
- # `unique_name`, such as `voice`, `sms`, or `default`.
614
- # @param [String] if_match If provided, applies this mutation if (and only if) the
615
- # {ETag}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag] header of
616
- # the Task matches the provided value. This matches the semantics of (and is
617
- # implemented with) the HTTP {If-Match
618
- # header}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match].
619
- # @return [TaskInstance] Updated TaskInstance
620
- def update(attributes: :unset, assignment_status: :unset, reason: :unset, priority: :unset, task_channel: :unset, if_match: :unset)
621
- context.update(
622
- attributes: attributes,
623
- assignment_status: assignment_status,
624
- reason: reason,
625
- priority: priority,
626
- task_channel: task_channel,
627
- if_match: if_match,
628
- )
629
- end
630
-
631
- ##
632
- # Delete the TaskInstance
633
- # @param [String] if_match If provided, deletes this Task if (and only if) the
634
- # {ETag}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag] header of
635
- # the Task matches the provided value. This matches the semantics of (and is
636
- # implemented with) the HTTP {If-Match
637
- # header}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match].
638
- # @return [Boolean] true if delete succeeds, false otherwise
639
- def delete(if_match: :unset)
640
- context.delete(if_match: if_match, )
641
- end
642
-
643
- ##
644
- # Access the reservations
645
- # @return [reservations] reservations
646
- def reservations
647
- context.reservations
648
- end
649
14
 
650
- ##
651
- # Provide a user friendly representation
652
- def to_s
653
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
654
- "<Twilio.Taskrouter.V1.TaskInstance #{values}>"
655
- end
656
15
 
657
- ##
658
- # Provide a detailed, user friendly representation
659
- def inspect
660
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
661
- "<Twilio.Taskrouter.V1.TaskInstance #{values}>"
16
+ module Twilio
17
+ module REST
18
+ class Taskrouter < TaskrouterBase
19
+ class V1 < Version
20
+ class WorkspaceContext < InstanceContext
21
+
22
+ class TaskList < ListResource
23
+
24
+ ##
25
+ # Initialize the TaskList
26
+ # @param [Version] version Version that contains the resource
27
+ # @return [TaskList] TaskList
28
+ def initialize(version, workspace_sid: nil)
29
+ super(version)
30
+ # Path Solution
31
+ @solution = { workspace_sid: workspace_sid }
32
+ @uri = "/Workspaces/#{@solution[:workspace_sid]}/Tasks"
33
+
34
+ end
35
+ ##
36
+ # Create the TaskInstance
37
+ # @param [String] timeout The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`.
38
+ # @param [String] priority The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647).
39
+ # @param [String] task_channel When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`.
40
+ # @param [String] workflow_sid The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
41
+ # @param [String] attributes A JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
42
+ # @param [Time] virtual_start_time The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future or before the year of 1900.
43
+ # @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
44
+ # @param [String] ignore_capacity A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
45
+ # @param [String] task_queue_sid The SID of the TaskQueue in which the Task belongs
46
+ # @return [TaskInstance] Created TaskInstance
47
+ def create(
48
+ timeout: :unset,
49
+ priority: :unset,
50
+ task_channel: :unset,
51
+ workflow_sid: :unset,
52
+ attributes: :unset,
53
+ virtual_start_time: :unset,
54
+ routing_target: :unset,
55
+ ignore_capacity: :unset,
56
+ task_queue_sid: :unset
57
+ )
58
+
59
+ data = Twilio::Values.of({
60
+ 'Timeout' => timeout,
61
+ 'Priority' => priority,
62
+ 'TaskChannel' => task_channel,
63
+ 'WorkflowSid' => workflow_sid,
64
+ 'Attributes' => attributes,
65
+ 'VirtualStartTime' => Twilio.serialize_iso8601_datetime(virtual_start_time),
66
+ 'RoutingTarget' => routing_target,
67
+ 'IgnoreCapacity' => ignore_capacity,
68
+ 'TaskQueueSid' => task_queue_sid,
69
+ })
70
+
71
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
72
+
73
+
74
+
75
+
76
+
77
+ payload = @version.create('POST', @uri, data: data, headers: headers)
78
+ TaskInstance.new(
79
+ @version,
80
+ payload,
81
+ workspace_sid: @solution[:workspace_sid],
82
+ )
83
+ end
84
+
85
+
86
+ ##
87
+ # Lists TaskInstance records from the API as a list.
88
+ # Unlike stream(), this operation is eager and will load `limit` records into
89
+ # memory before returning.
90
+ # @param [String] priority The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
91
+ # @param [Array[String]] assignment_status The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
92
+ # @param [String] workflow_sid The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
93
+ # @param [String] workflow_name The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
94
+ # @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
95
+ # @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
96
+ # @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
97
+ # @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
98
+ # @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
99
+ # @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
100
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
101
+ # guarantees to never return more than limit. Default is no limit
102
+ # @param [Integer] page_size Number of records to fetch per request, when
103
+ # not set will use the default value of 50 records. If no page_size is defined
104
+ # but a limit is defined, stream() will attempt to read the limit with the most
105
+ # efficient page size, i.e. min(limit, 1000)
106
+ # @return [Array] Array of up to limit results
107
+ def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
108
+ self.stream(
109
+ priority: priority,
110
+ assignment_status: assignment_status,
111
+ workflow_sid: workflow_sid,
112
+ workflow_name: workflow_name,
113
+ task_queue_sid: task_queue_sid,
114
+ task_queue_name: task_queue_name,
115
+ evaluate_task_attributes: evaluate_task_attributes,
116
+ routing_target: routing_target,
117
+ ordering: ordering,
118
+ has_addons: has_addons,
119
+ limit: limit,
120
+ page_size: page_size
121
+ ).entries
122
+ end
123
+
124
+ ##
125
+ # Streams Instance records from the API as an Enumerable.
126
+ # This operation lazily loads records as efficiently as possible until the limit
127
+ # is reached.
128
+ # @param [String] priority The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
129
+ # @param [Array[String]] assignment_status The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
130
+ # @param [String] workflow_sid The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
131
+ # @param [String] workflow_name The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
132
+ # @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
133
+ # @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
134
+ # @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
135
+ # @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
136
+ # @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
137
+ # @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
138
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
139
+ # guarantees to never return more than limit. Default is no limit
140
+ # @param [Integer] page_size Number of records to fetch per request, when
141
+ # not set will use the default value of 50 records. If no page_size is defined
142
+ # but a limit is defined, stream() will attempt to read the limit with the most
143
+ # efficient page size, i.e. min(limit, 1000)
144
+ # @return [Enumerable] Enumerable that will yield up to limit results
145
+ def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
146
+ limits = @version.read_limits(limit, page_size)
147
+
148
+ page = self.page(
149
+ priority: priority,
150
+ assignment_status: assignment_status,
151
+ workflow_sid: workflow_sid,
152
+ workflow_name: workflow_name,
153
+ task_queue_sid: task_queue_sid,
154
+ task_queue_name: task_queue_name,
155
+ evaluate_task_attributes: evaluate_task_attributes,
156
+ routing_target: routing_target,
157
+ ordering: ordering,
158
+ has_addons: has_addons,
159
+ page_size: limits[:page_size], )
160
+
161
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
162
+ end
163
+
164
+ ##
165
+ # When passed a block, yields TaskInstance records from the API.
166
+ # This operation lazily loads records as efficiently as possible until the limit
167
+ # is reached.
168
+ def each
169
+ limits = @version.read_limits
170
+
171
+ page = self.page(page_size: limits[:page_size], )
172
+
173
+ @version.stream(page,
174
+ limit: limits[:limit],
175
+ page_limit: limits[:page_limit]).each {|x| yield x}
176
+ end
177
+
178
+ ##
179
+ # Retrieve a single page of TaskInstance records from the API.
180
+ # Request is executed immediately.
181
+ # @param [String] priority The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
182
+ # @param [Array[String]] assignment_status The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
183
+ # @param [String] workflow_sid The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
184
+ # @param [String] workflow_name The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
185
+ # @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
186
+ # @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
187
+ # @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
188
+ # @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
189
+ # @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
190
+ # @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
191
+ # @param [String] page_token PageToken provided by the API
192
+ # @param [Integer] page_number Page Number, this value is simply for client state
193
+ # @param [Integer] page_size Number of records to return, defaults to 50
194
+ # @return [Page] Page of TaskInstance
195
+ def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
196
+ params = Twilio::Values.of({
197
+ 'Priority' => priority,
198
+
199
+ 'AssignmentStatus' => Twilio.serialize_list(assignment_status) { |e| e },
200
+ 'WorkflowSid' => workflow_sid,
201
+ 'WorkflowName' => workflow_name,
202
+ 'TaskQueueSid' => task_queue_sid,
203
+ 'TaskQueueName' => task_queue_name,
204
+ 'EvaluateTaskAttributes' => evaluate_task_attributes,
205
+ 'RoutingTarget' => routing_target,
206
+ 'Ordering' => ordering,
207
+ 'HasAddons' => has_addons,
208
+ 'PageToken' => page_token,
209
+ 'Page' => page_number,
210
+ 'PageSize' => page_size,
211
+ })
212
+ headers = Twilio::Values.of({})
213
+
214
+
215
+
216
+ response = @version.page('GET', @uri, params: params, headers: headers)
217
+
218
+ TaskPage.new(@version, response, @solution)
219
+ end
220
+
221
+ ##
222
+ # Retrieve a single page of TaskInstance records from the API.
223
+ # Request is executed immediately.
224
+ # @param [String] target_url API-generated URL for the requested results page
225
+ # @return [Page] Page of TaskInstance
226
+ def get_page(target_url)
227
+ response = @version.domain.request(
228
+ 'GET',
229
+ target_url
230
+ )
231
+ TaskPage.new(@version, response, @solution)
232
+ end
233
+
234
+
235
+
236
+ # Provide a user friendly representation
237
+ def to_s
238
+ '#<Twilio.Taskrouter.V1.TaskList>'
239
+ end
240
+ end
241
+
242
+
243
+ class TaskContext < InstanceContext
244
+ ##
245
+ # Initialize the TaskContext
246
+ # @param [Version] version Version that contains the resource
247
+ # @param [String] workspace_sid The SID of the Workspace with the Task to update.
248
+ # @param [String] sid The SID of the Task resource to update.
249
+ # @return [TaskContext] TaskContext
250
+ def initialize(version, workspace_sid, sid)
251
+ super(version)
252
+
253
+ # Path Solution
254
+ @solution = { workspace_sid: workspace_sid, sid: sid, }
255
+ @uri = "/Workspaces/#{@solution[:workspace_sid]}/Tasks/#{@solution[:sid]}"
256
+
257
+ # Dependents
258
+ @reservations = nil
259
+ end
260
+ ##
261
+ # Delete the TaskInstance
262
+ # @param [String] if_match If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
263
+ # @return [Boolean] True if delete succeeds, false otherwise
264
+ def delete(
265
+ if_match: :unset
266
+ )
267
+
268
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
269
+
270
+
271
+
272
+ @version.delete('DELETE', @uri, headers: headers)
273
+ end
274
+
275
+ ##
276
+ # Fetch the TaskInstance
277
+ # @return [TaskInstance] Fetched TaskInstance
278
+ def fetch
279
+
280
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
281
+
282
+
283
+
284
+
285
+
286
+ payload = @version.fetch('GET', @uri, headers: headers)
287
+ TaskInstance.new(
288
+ @version,
289
+ payload,
290
+ workspace_sid: @solution[:workspace_sid],
291
+ sid: @solution[:sid],
292
+ )
293
+ end
294
+
295
+ ##
296
+ # Update the TaskInstance
297
+ # @param [String] attributes The JSON string that describes the custom attributes of the task.
298
+ # @param [Status] assignment_status
299
+ # @param [String] reason The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
300
+ # @param [String] priority The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647).
301
+ # @param [String] task_channel When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
302
+ # @param [Time] virtual_start_time The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
303
+ # @param [String] if_match If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
304
+ # @return [TaskInstance] Updated TaskInstance
305
+ def update(
306
+ attributes: :unset,
307
+ assignment_status: :unset,
308
+ reason: :unset,
309
+ priority: :unset,
310
+ task_channel: :unset,
311
+ virtual_start_time: :unset,
312
+ if_match: :unset
313
+ )
314
+
315
+ data = Twilio::Values.of({
316
+ 'Attributes' => attributes,
317
+ 'AssignmentStatus' => assignment_status,
318
+ 'Reason' => reason,
319
+ 'Priority' => priority,
320
+ 'TaskChannel' => task_channel,
321
+ 'VirtualStartTime' => Twilio.serialize_iso8601_datetime(virtual_start_time),
322
+ })
323
+
324
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
325
+
326
+
327
+
328
+
329
+
330
+ payload = @version.update('POST', @uri, data: data, headers: headers)
331
+ TaskInstance.new(
332
+ @version,
333
+ payload,
334
+ workspace_sid: @solution[:workspace_sid],
335
+ sid: @solution[:sid],
336
+ )
337
+ end
338
+
339
+ ##
340
+ # Access the reservations
341
+ # @return [ReservationList]
342
+ # @return [ReservationContext] if sid was passed.
343
+ def reservations(sid=:unset)
344
+
345
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
346
+
347
+ if sid != :unset
348
+ return ReservationContext.new(@version, @solution[:workspace_sid], @solution[:sid],sid )
349
+ end
350
+
351
+ unless @reservations
352
+ @reservations = ReservationList.new(
353
+ @version, workspace_sid: @solution[:workspace_sid], task_sid: @solution[:sid], )
354
+ end
355
+
356
+ @reservations
357
+ end
358
+
359
+ ##
360
+ # Provide a user friendly representation
361
+ def to_s
362
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
363
+ "#<Twilio.Taskrouter.V1.TaskContext #{context}>"
364
+ end
365
+
366
+ ##
367
+ # Provide a detailed, user friendly representation
368
+ def inspect
369
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
370
+ "#<Twilio.Taskrouter.V1.TaskContext #{context}>"
371
+ end
372
+ end
373
+
374
+ class TaskPage < Page
375
+ ##
376
+ # Initialize the TaskPage
377
+ # @param [Version] version Version that contains the resource
378
+ # @param [Response] response Response from the API
379
+ # @param [Hash] solution Path solution for the resource
380
+ # @return [TaskPage] TaskPage
381
+ def initialize(version, response, solution)
382
+ super(version, response)
383
+
384
+ # Path Solution
385
+ @solution = solution
386
+ end
387
+
388
+ ##
389
+ # Build an instance of TaskInstance
390
+ # @param [Hash] payload Payload response from the API
391
+ # @return [TaskInstance] TaskInstance
392
+ def get_instance(payload)
393
+ TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid])
394
+ end
395
+
396
+ ##
397
+ # Provide a user friendly representation
398
+ def to_s
399
+ '<Twilio.Taskrouter.V1.TaskPage>'
400
+ end
401
+ end
402
+ class TaskInstance < InstanceResource
403
+ ##
404
+ # Initialize the TaskInstance
405
+ # @param [Version] version Version that contains the resource
406
+ # @param [Hash] payload payload that contains response from Twilio
407
+ # @param [String] account_sid The SID of the
408
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Task
409
+ # resource.
410
+ # @param [String] sid The SID of the Call resource to fetch.
411
+ # @return [TaskInstance] TaskInstance
412
+ def initialize(version, payload , workspace_sid: nil, sid: nil)
413
+ super(version)
414
+
415
+ # Marshaled Properties
416
+ @properties = {
417
+ 'account_sid' => payload['account_sid'],
418
+ 'age' => payload['age'] == nil ? payload['age'] : payload['age'].to_i,
419
+ 'assignment_status' => payload['assignment_status'],
420
+ 'attributes' => payload['attributes'],
421
+ 'addons' => payload['addons'],
422
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
423
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
424
+ 'task_queue_entered_date' => Twilio.deserialize_iso8601_datetime(payload['task_queue_entered_date']),
425
+ 'priority' => payload['priority'] == nil ? payload['priority'] : payload['priority'].to_i,
426
+ 'reason' => payload['reason'],
427
+ 'sid' => payload['sid'],
428
+ 'task_queue_sid' => payload['task_queue_sid'],
429
+ 'task_queue_friendly_name' => payload['task_queue_friendly_name'],
430
+ 'task_channel_sid' => payload['task_channel_sid'],
431
+ 'task_channel_unique_name' => payload['task_channel_unique_name'],
432
+ 'timeout' => payload['timeout'] == nil ? payload['timeout'] : payload['timeout'].to_i,
433
+ 'workflow_sid' => payload['workflow_sid'],
434
+ 'workflow_friendly_name' => payload['workflow_friendly_name'],
435
+ 'workspace_sid' => payload['workspace_sid'],
436
+ 'url' => payload['url'],
437
+ 'links' => payload['links'],
438
+ 'virtual_start_time' => Twilio.deserialize_iso8601_datetime(payload['virtual_start_time']),
439
+ 'ignore_capacity' => payload['ignore_capacity'],
440
+ 'routing_target' => payload['routing_target'],
441
+ }
442
+
443
+ # Context
444
+ @instance_context = nil
445
+ @params = { 'workspace_sid' => workspace_sid || @properties['workspace_sid'] ,'sid' => sid || @properties['sid'] , }
446
+ end
447
+
448
+ ##
449
+ # Generate an instance context for the instance, the context is capable of
450
+ # performing various actions. All instance actions are proxied to the context
451
+ # @return [TaskContext] CallContext for this CallInstance
452
+ def context
453
+ unless @instance_context
454
+ @instance_context = TaskContext.new(@version , @params['workspace_sid'], @params['sid'])
455
+ end
456
+ @instance_context
457
+ end
458
+
459
+ ##
460
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Task resource.
461
+ def account_sid
462
+ @properties['account_sid']
463
+ end
464
+
465
+ ##
466
+ # @return [String] The number of seconds since the Task was created.
467
+ def age
468
+ @properties['age']
469
+ end
470
+
471
+ ##
472
+ # @return [Status]
473
+ def assignment_status
474
+ @properties['assignment_status']
475
+ end
476
+
477
+ ##
478
+ # @return [String] The JSON string with custom attributes of the work. **Note** If this property has been assigned a value, it will only be displayed in FETCH action that returns a single resource. Otherwise, it will be null.
479
+ def attributes
480
+ @properties['attributes']
481
+ end
482
+
483
+ ##
484
+ # @return [String] An object that contains the [Add-on](https://www.twilio.com/docs/add-ons) data for all installed Add-ons.
485
+ def addons
486
+ @properties['addons']
487
+ end
488
+
489
+ ##
490
+ # @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
491
+ def date_created
492
+ @properties['date_created']
493
+ end
494
+
495
+ ##
496
+ # @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
497
+ def date_updated
498
+ @properties['date_updated']
499
+ end
500
+
501
+ ##
502
+ # @return [Time] The date and time in GMT when the Task entered the TaskQueue, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
503
+ def task_queue_entered_date
504
+ @properties['task_queue_entered_date']
505
+ end
506
+
507
+ ##
508
+ # @return [String] The current priority score of the Task as assigned to a Worker by the workflow. Tasks with higher priority values will be assigned before Tasks with lower values.
509
+ def priority
510
+ @properties['priority']
511
+ end
512
+
513
+ ##
514
+ # @return [String] The reason the Task was canceled or completed, if applicable.
515
+ def reason
516
+ @properties['reason']
517
+ end
518
+
519
+ ##
520
+ # @return [String] The unique string that we created to identify the Task resource.
521
+ def sid
522
+ @properties['sid']
523
+ end
524
+
525
+ ##
526
+ # @return [String] The SID of the TaskQueue.
527
+ def task_queue_sid
528
+ @properties['task_queue_sid']
529
+ end
530
+
531
+ ##
532
+ # @return [String] The friendly name of the TaskQueue.
533
+ def task_queue_friendly_name
534
+ @properties['task_queue_friendly_name']
535
+ end
536
+
537
+ ##
538
+ # @return [String] The SID of the TaskChannel.
539
+ def task_channel_sid
540
+ @properties['task_channel_sid']
541
+ end
542
+
543
+ ##
544
+ # @return [String] The unique name of the TaskChannel.
545
+ def task_channel_unique_name
546
+ @properties['task_channel_unique_name']
547
+ end
548
+
549
+ ##
550
+ # @return [String] The amount of time in seconds that the Task can live before being assigned.
551
+ def timeout
552
+ @properties['timeout']
553
+ end
554
+
555
+ ##
556
+ # @return [String] The SID of the Workflow that is controlling the Task.
557
+ def workflow_sid
558
+ @properties['workflow_sid']
559
+ end
560
+
561
+ ##
562
+ # @return [String] The friendly name of the Workflow that is controlling the Task.
563
+ def workflow_friendly_name
564
+ @properties['workflow_friendly_name']
565
+ end
566
+
567
+ ##
568
+ # @return [String] The SID of the Workspace that contains the Task.
569
+ def workspace_sid
570
+ @properties['workspace_sid']
571
+ end
572
+
573
+ ##
574
+ # @return [String] The absolute URL of the Task resource.
575
+ def url
576
+ @properties['url']
577
+ end
578
+
579
+ ##
580
+ # @return [Hash] The URLs of related resources.
581
+ def links
582
+ @properties['links']
583
+ end
584
+
585
+ ##
586
+ # @return [Time] The date and time in GMT indicating the ordering for routing of the Task specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
587
+ def virtual_start_time
588
+ @properties['virtual_start_time']
589
+ end
590
+
591
+ ##
592
+ # @return [Boolean] A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
593
+ def ignore_capacity
594
+ @properties['ignore_capacity']
595
+ end
596
+
597
+ ##
598
+ # @return [String] A SID of a Worker, Queue, or Workflow to route a Task to
599
+ def routing_target
600
+ @properties['routing_target']
601
+ end
602
+
603
+ ##
604
+ # Delete the TaskInstance
605
+ # @param [String] if_match If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
606
+ # @return [Boolean] True if delete succeeds, false otherwise
607
+ def delete(
608
+ if_match: :unset
609
+ )
610
+
611
+ context.delete(
612
+ if_match: if_match,
613
+ )
614
+ end
615
+
616
+ ##
617
+ # Fetch the TaskInstance
618
+ # @return [TaskInstance] Fetched TaskInstance
619
+ def fetch
620
+
621
+ context.fetch
622
+ end
623
+
624
+ ##
625
+ # Update the TaskInstance
626
+ # @param [String] attributes The JSON string that describes the custom attributes of the task.
627
+ # @param [Status] assignment_status
628
+ # @param [String] reason The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
629
+ # @param [String] priority The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647).
630
+ # @param [String] task_channel When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
631
+ # @param [Time] virtual_start_time The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
632
+ # @param [String] if_match If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
633
+ # @return [TaskInstance] Updated TaskInstance
634
+ def update(
635
+ attributes: :unset,
636
+ assignment_status: :unset,
637
+ reason: :unset,
638
+ priority: :unset,
639
+ task_channel: :unset,
640
+ virtual_start_time: :unset,
641
+ if_match: :unset
642
+ )
643
+
644
+ context.update(
645
+ attributes: attributes,
646
+ assignment_status: assignment_status,
647
+ reason: reason,
648
+ priority: priority,
649
+ task_channel: task_channel,
650
+ virtual_start_time: virtual_start_time,
651
+ if_match: if_match,
652
+ )
653
+ end
654
+
655
+ ##
656
+ # Access the reservations
657
+ # @return [reservations] reservations
658
+ def reservations
659
+ context.reservations
660
+ end
661
+
662
+ ##
663
+ # Provide a user friendly representation
664
+ def to_s
665
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
666
+ "<Twilio.Taskrouter.V1.TaskInstance #{values}>"
667
+ end
668
+
669
+ ##
670
+ # Provide a detailed, user friendly representation
671
+ def inspect
672
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
673
+ "<Twilio.Taskrouter.V1.TaskInstance #{values}>"
674
+ end
675
+ end
676
+
677
+ end
662
678
  end
663
- end
664
679
  end
665
- end
666
680
  end
667
- end
668
- end
681
+ end
682
+
683
+