twilio-ruby 7.10.7 → 7.11.2

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 (298) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +43 -67
  3. data/.gitignore +0 -1
  4. data/CHANGES.md +267 -0
  5. data/Gemfile +2 -0
  6. data/Gemfile.lock +154 -0
  7. data/README.md +3 -3
  8. data/Rakefile +1 -1
  9. data/lib/rack/twilio_webhook_authentication.rb +45 -2
  10. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +25 -65
  11. data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +0 -59
  12. data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +0 -59
  13. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +0 -59
  14. data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +0 -59
  15. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +0 -59
  16. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +48 -71
  17. data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +0 -59
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -59
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +0 -59
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +0 -59
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +0 -59
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +0 -59
  23. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +0 -59
  24. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -0
  25. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -2
  26. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +0 -59
  27. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -0
  28. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +0 -59
  29. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +0 -59
  30. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +0 -59
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +0 -59
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +0 -59
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +0 -59
  34. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +0 -59
  35. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +0 -59
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +0 -59
  37. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +0 -59
  38. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -59
  39. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -59
  40. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -59
  41. data/lib/twilio-ruby/rest/chat/v3/channel.rb +0 -59
  42. data/lib/twilio-ruby/rest/client.rb +0 -5
  43. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +11 -60
  44. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -59
  45. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +0 -59
  46. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +0 -59
  47. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -10
  48. data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +0 -59
  49. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +0 -59
  50. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +0 -59
  51. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +0 -59
  52. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +10 -10
  53. data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +0 -59
  54. data/lib/twilio-ruby/rest/conversations/v2/action.rb +2 -61
  55. data/lib/twilio-ruby/rest/conversations/v2/communication.rb +43 -21
  56. data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +584 -21
  57. data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +28 -28
  58. data/lib/twilio-ruby/rest/conversations/v2/operation.rb +10 -69
  59. data/lib/twilio-ruby/rest/conversations/v2/participant.rb +58 -58
  60. data/lib/twilio-ruby/rest/conversations/v2.rb +55 -49
  61. data/lib/twilio-ruby/rest/events/v1/schema.rb +0 -59
  62. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +0 -59
  63. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +0 -59
  64. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +12 -14
  65. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +0 -59
  66. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +12 -14
  67. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +12 -14
  68. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +12 -14
  69. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +2 -4
  70. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +12 -14
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +12 -14
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -59
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +0 -59
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +0 -59
  75. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -59
  76. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +0 -59
  77. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +0 -59
  78. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +2 -4
  79. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +2 -4
  80. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -59
  81. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +2 -4
  82. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +2 -4
  83. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -59
  84. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +2 -4
  85. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -59
  86. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -59
  87. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -59
  88. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +0 -59
  89. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -59
  90. data/lib/twilio-ruby/rest/iam/v1/api_key.rb +0 -59
  91. data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +2 -61
  92. data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +15 -61
  93. data/lib/twilio-ruby/rest/iam/v1/token.rb +0 -59
  94. data/lib/twilio-ruby/rest/iam_base.rb +6 -1
  95. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -59
  96. data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +7 -59
  97. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +7 -0
  98. data/lib/twilio-ruby/rest/insights/v1/call.rb +0 -59
  99. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
  100. data/lib/twilio-ruby/rest/insights/v1/setting.rb +0 -59
  101. data/lib/twilio-ruby/rest/insights/v2/inbound.rb +2 -261
  102. data/lib/twilio-ruby/rest/insights/v2/inbound_report.rb +258 -0
  103. data/lib/twilio-ruby/rest/insights/v2/outbound.rb +18 -299
  104. data/lib/twilio-ruby/rest/insights/v2/outbound_report.rb +258 -0
  105. data/lib/twilio-ruby/rest/insights/v2/report.rb +27 -184
  106. data/lib/twilio-ruby/rest/insights/v2.rb +14 -4
  107. data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -60
  108. data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -60
  109. data/lib/twilio-ruby/rest/insights/v3/query_job.rb +654 -0
  110. data/lib/twilio-ruby/rest/insights/v3/result.rb +195 -0
  111. data/lib/twilio-ruby/rest/insights/v3.rb +17 -1
  112. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +0 -59
  113. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +0 -59
  114. data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +0 -59
  115. data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +0 -59
  116. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -59
  117. data/lib/twilio-ruby/rest/intelligence/v3/conversation.rb +8 -8
  118. data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +443 -0
  119. data/lib/twilio-ruby/rest/intelligence/v3.rb +6 -0
  120. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -59
  121. data/lib/twilio-ruby/rest/knowledge/v2/chunk.rb +28 -0
  122. data/lib/twilio-ruby/rest/knowledge/v2/knowledge.rb +38 -0
  123. data/lib/twilio-ruby/rest/knowledge/v2/operation.rb +0 -59
  124. data/lib/twilio-ruby/rest/knowledge/v2/search.rb +8 -176
  125. data/lib/twilio-ruby/rest/knowledge/v2.rb +1 -2
  126. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -59
  127. data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +0 -59
  128. data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +0 -59
  129. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -59
  130. data/lib/twilio-ruby/rest/lookups/v2/query.rb +0 -59
  131. data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +0 -59
  132. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +0 -59
  133. data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +0 -59
  134. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +0 -59
  135. data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +0 -59
  136. data/lib/twilio-ruby/rest/memory/v1/bulk.rb +9 -177
  137. data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +15 -9
  138. data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +6 -12
  139. data/lib/twilio-ruby/rest/memory/v1/identifier.rb +1 -81
  140. data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +11 -191
  141. data/lib/twilio-ruby/rest/memory/v1/import.rb +28 -5
  142. data/lib/twilio-ruby/rest/memory/v1/lookup.rb +1 -60
  143. data/lib/twilio-ruby/rest/memory/v1/observation.rb +72 -22
  144. data/lib/twilio-ruby/rest/memory/v1/operation.rb +1 -60
  145. data/lib/twilio-ruby/rest/memory/v1/profile.rb +2 -2
  146. data/lib/twilio-ruby/rest/memory/v1/recall.rb +1 -60
  147. data/lib/twilio-ruby/rest/memory/v1/revision.rb +3 -5
  148. data/lib/twilio-ruby/rest/memory/v1/store.rb +1 -1
  149. data/lib/twilio-ruby/rest/memory/v1/trait.rb +1 -1
  150. data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +56 -6
  151. data/lib/twilio-ruby/rest/memory/v1.rb +3 -46
  152. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +0 -59
  153. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -18
  154. data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +0 -59
  155. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -59
  156. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -59
  157. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -59
  158. data/lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb +0 -59
  159. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +0 -59
  160. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -59
  161. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -59
  162. data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +0 -59
  163. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +2 -4
  164. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +0 -59
  165. data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +0 -59
  166. data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +23 -4
  167. data/lib/twilio-ruby/rest/messaging/v2/domain_certs.rb +0 -59
  168. data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +0 -59
  169. data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +4 -63
  170. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +0 -59
  171. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +0 -59
  172. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +0 -59
  173. data/lib/twilio-ruby/rest/numbers/v1/embedded_session.rb +0 -59
  174. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +0 -59
  175. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +0 -59
  176. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -59
  177. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +0 -59
  178. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +0 -59
  179. data/lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb +0 -59
  180. data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +172 -0
  181. data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +179 -0
  182. data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +186 -0
  183. data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +165 -0
  184. data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +0 -59
  185. data/lib/twilio-ruby/rest/numbers/v1.rb +24 -0
  186. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +0 -59
  187. data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +0 -59
  188. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +0 -59
  189. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +0 -59
  190. data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +0 -59
  191. data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +0 -59
  192. data/lib/twilio-ruby/rest/oauth/v1/token.rb +0 -59
  193. data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +14 -61
  194. data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +200 -0
  195. data/lib/twilio-ruby/rest/oauth/v2/token.rb +10 -63
  196. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -59
  197. data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +0 -59
  198. data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +0 -59
  199. data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -78
  200. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -59
  201. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -59
  202. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +0 -59
  203. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -59
  204. data/lib/twilio-ruby/rest/pricing/v2/number.rb +0 -59
  205. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +0 -59
  206. data/lib/twilio-ruby/rest/pricing/v2/voice.rb +0 -59
  207. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +0 -59
  208. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +0 -59
  209. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +0 -59
  210. data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +406 -0
  211. data/lib/twilio-ruby/rest/routes/v3.rb +50 -0
  212. data/lib/twilio-ruby/rest/routes_base.rb +6 -1
  213. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -59
  214. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -59
  215. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +0 -59
  216. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +0 -59
  217. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +0 -59
  218. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +0 -59
  219. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -59
  220. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -59
  221. data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +0 -59
  222. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +0 -59
  223. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -59
  224. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +0 -59
  225. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +0 -59
  226. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +0 -59
  227. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +0 -59
  228. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +0 -59
  229. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +0 -59
  230. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +0 -59
  231. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +0 -59
  232. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +0 -59
  233. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +0 -59
  234. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +0 -59
  235. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +0 -59
  236. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +0 -59
  237. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +0 -59
  238. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +0 -59
  239. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +271 -0
  240. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +174 -0
  241. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +262 -0
  242. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +174 -0
  243. data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +0 -59
  244. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +0 -59
  245. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +0 -59
  246. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +386 -0
  247. data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +386 -0
  248. data/lib/twilio-ruby/rest/trusthub/v1.rb +74 -0
  249. data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -59
  250. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -59
  251. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +0 -59
  252. data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +0 -59
  253. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +0 -59
  254. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -59
  255. data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +3 -62
  256. data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +0 -59
  257. data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +0 -59
  258. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -61
  259. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +0 -59
  260. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +0 -59
  261. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +0 -59
  262. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +0 -59
  263. data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +0 -59
  264. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +0 -59
  265. data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +0 -59
  266. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -59
  267. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +0 -59
  268. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -59
  269. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +0 -59
  270. data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +497 -0
  271. data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +297 -0
  272. data/lib/twilio-ruby/rest/voice/v2/configuration.rb +353 -0
  273. data/lib/twilio-ruby/rest/voice/v2/recording.rb +557 -0
  274. data/lib/twilio-ruby/rest/voice/v2/transcription.rb +532 -0
  275. data/lib/twilio-ruby/rest/voice/v2/type.rb +459 -0
  276. data/lib/twilio-ruby/rest/voice/v2.rb +141 -0
  277. data/lib/twilio-ruby/rest/voice/v3/transcription.rb +259 -50
  278. data/lib/twilio-ruby/rest/voice_base.rb +5 -0
  279. data/lib/twilio-ruby/twiml/voice_response.rb +6 -68
  280. data/lib/twilio-ruby/version.rb +1 -1
  281. data/twilio-ruby.gemspec +1 -1
  282. metadata +36 -22
  283. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +0 -558
  284. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +0 -558
  285. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +0 -431
  286. data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +0 -296
  287. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +0 -927
  288. data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +0 -325
  289. data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +0 -349
  290. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +0 -871
  291. data/lib/twilio-ruby/rest/assistants/v1/policy.rb +0 -364
  292. data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +0 -360
  293. data/lib/twilio-ruby/rest/assistants/v1/session.rb +0 -501
  294. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +0 -847
  295. data/lib/twilio-ruby/rest/assistants/v1.rb +0 -104
  296. data/lib/twilio-ruby/rest/assistants.rb +0 -6
  297. data/lib/twilio-ruby/rest/assistants_base.rb +0 -38
  298. data/lib/twilio-ruby/rest/memory/v1/event.rb +0 -320
@@ -31,104 +31,110 @@ module Twilio
31
31
 
32
32
  ##
33
33
  # @param [String] conversation_id
34
- # @return [Twilio::REST::Conversations::V2::ActionContext] if conversationId was passed.
34
+ # @param [String] action_id
35
+ # @return [Twilio::REST::Conversations::V2::ActionContext] if action_id was passed.
35
36
  # @return [Twilio::REST::Conversations::V2::ActionList]
36
- def actions(conversation_id=:unset)
37
+ def actions(conversation_id=:unset, action_id=:unset)
37
38
  if conversation_id.nil?
38
39
  raise ArgumentError, 'conversation_id cannot be nil'
39
40
  end
41
+ if action_id.nil?
42
+ raise ArgumentError, 'action_id cannot be nil'
43
+ end
40
44
 
41
- if conversation_id == :unset
45
+ if conversation_id == :unset && action_id == :unset
42
46
  @actions ||= ActionList.new self
47
+ elsif conversation_id != :unset && action_id == :unset
48
+ ActionList.new(self, conversation_id: conversation_id)
43
49
  else
44
- ActionContext.new(self, conversation_id)
50
+ ActionContext.new(self, conversation_id, action_id)
45
51
  end
46
52
  end
47
53
  ##
48
- # @param [String] conversation_sid
49
- # @param [String] sid
50
- # @return [Twilio::REST::Conversations::V2::CommunicationContext] if sid was passed.
54
+ # @param [String] conversation_id
55
+ # @param [String] id
56
+ # @return [Twilio::REST::Conversations::V2::CommunicationContext] if id was passed.
51
57
  # @return [Twilio::REST::Conversations::V2::CommunicationList]
52
- def communications(conversation_sid=:unset, sid=:unset)
53
- if conversation_sid.nil?
54
- raise ArgumentError, 'conversation_sid cannot be nil'
58
+ def communications(conversation_id=:unset, id=:unset)
59
+ if conversation_id.nil?
60
+ raise ArgumentError, 'conversation_id cannot be nil'
55
61
  end
56
- if sid.nil?
57
- raise ArgumentError, 'sid cannot be nil'
62
+ if id.nil?
63
+ raise ArgumentError, 'id cannot be nil'
58
64
  end
59
65
 
60
- if conversation_sid == :unset && sid == :unset
66
+ if conversation_id == :unset && id == :unset
61
67
  @communications ||= CommunicationList.new self
62
- elsif conversation_sid != :unset && sid == :unset
63
- CommunicationList.new(self, conversation_sid: conversation_sid)
68
+ elsif conversation_id != :unset && id == :unset
69
+ CommunicationList.new(self, conversation_id: conversation_id)
64
70
  else
65
- CommunicationContext.new(self, conversation_sid, sid)
71
+ CommunicationContext.new(self, conversation_id, id)
66
72
  end
67
73
  end
68
74
  ##
69
- # @param [String] sid
70
- # @return [Twilio::REST::Conversations::V2::ConfigurationContext] if sid was passed.
75
+ # @param [String] id
76
+ # @return [Twilio::REST::Conversations::V2::ConfigurationContext] if id was passed.
71
77
  # @return [Twilio::REST::Conversations::V2::ConfigurationList]
72
- def configurations(sid=:unset)
73
- if sid.nil?
74
- raise ArgumentError, 'sid cannot be nil'
78
+ def configurations(id=:unset)
79
+ if id.nil?
80
+ raise ArgumentError, 'id cannot be nil'
75
81
  end
76
82
 
77
- if sid == :unset
83
+ if id == :unset
78
84
  @configurations ||= ConfigurationList.new self
79
85
  else
80
- ConfigurationContext.new(self, sid)
86
+ ConfigurationContext.new(self, id)
81
87
  end
82
88
  end
83
89
  ##
84
- # @param [String] sid
85
- # @return [Twilio::REST::Conversations::V2::ConversationContext] if sid was passed.
90
+ # @param [String] id
91
+ # @return [Twilio::REST::Conversations::V2::ConversationContext] if id was passed.
86
92
  # @return [Twilio::REST::Conversations::V2::ConversationList]
87
- def conversations(sid=:unset)
88
- if sid.nil?
89
- raise ArgumentError, 'sid cannot be nil'
93
+ def conversations(id=:unset)
94
+ if id.nil?
95
+ raise ArgumentError, 'id cannot be nil'
90
96
  end
91
97
 
92
- if sid == :unset
98
+ if id == :unset
93
99
  @conversations ||= ConversationList.new self
94
100
  else
95
- ConversationContext.new(self, sid)
101
+ ConversationContext.new(self, id)
96
102
  end
97
103
  end
98
104
  ##
99
- # @param [String] sid
100
- # @return [Twilio::REST::Conversations::V2::OperationContext] if sid was passed.
105
+ # @param [String] id
106
+ # @return [Twilio::REST::Conversations::V2::OperationContext] if id was passed.
101
107
  # @return [Twilio::REST::Conversations::V2::OperationList]
102
- def operations(sid=:unset)
103
- if sid.nil?
104
- raise ArgumentError, 'sid cannot be nil'
108
+ def operations(id=:unset)
109
+ if id.nil?
110
+ raise ArgumentError, 'id cannot be nil'
105
111
  end
106
112
 
107
- if sid == :unset
113
+ if id == :unset
108
114
  @operations ||= OperationList.new self
109
115
  else
110
- OperationContext.new(self, sid)
116
+ OperationContext.new(self, id)
111
117
  end
112
118
  end
113
119
  ##
114
- # @param [String] conversation_sid
115
- # @param [String] sid
116
- # @return [Twilio::REST::Conversations::V2::ParticipantContext] if sid was passed.
120
+ # @param [String] conversation_id
121
+ # @param [String] id
122
+ # @return [Twilio::REST::Conversations::V2::ParticipantContext] if id was passed.
117
123
  # @return [Twilio::REST::Conversations::V2::ParticipantList]
118
- def participants(conversation_sid=:unset, sid=:unset)
119
- if conversation_sid.nil?
120
- raise ArgumentError, 'conversation_sid cannot be nil'
124
+ def participants(conversation_id=:unset, id=:unset)
125
+ if conversation_id.nil?
126
+ raise ArgumentError, 'conversation_id cannot be nil'
121
127
  end
122
- if sid.nil?
123
- raise ArgumentError, 'sid cannot be nil'
128
+ if id.nil?
129
+ raise ArgumentError, 'id cannot be nil'
124
130
  end
125
131
 
126
- if conversation_sid == :unset && sid == :unset
132
+ if conversation_id == :unset && id == :unset
127
133
  @participants ||= ParticipantList.new self
128
- elsif conversation_sid != :unset && sid == :unset
129
- ParticipantList.new(self, conversation_sid: conversation_sid)
134
+ elsif conversation_id != :unset && id == :unset
135
+ ParticipantList.new(self, conversation_id: conversation_id)
130
136
  else
131
- ParticipantContext.new(self, conversation_sid, sid)
137
+ ParticipantContext.new(self, conversation_id, id)
132
138
  end
133
139
  end
134
140
  ##
@@ -214,65 +214,6 @@ module Twilio
214
214
  end
215
215
  end
216
216
 
217
- class SchemaPageMetadata < PageMetadata
218
- attr_reader :schema_page
219
-
220
- def initialize(version, response, solution, limit)
221
- super(version, response)
222
- @schema_page = []
223
- @limit = limit
224
- key = get_key(response.body)
225
- records = 0
226
- while( limit != :unset && records < limit )
227
- @schema_page << SchemaListResponse.new(version, @payload, key, limit - records)
228
- @payload = self.next_page
229
- break unless @payload
230
- records += (@payload.body[key] || []).size
231
- end
232
- # Path Solution
233
- @solution = solution
234
- end
235
-
236
- def each
237
- @schema_page.each do |record|
238
- yield record
239
- end
240
- end
241
-
242
- def to_s
243
- '<Twilio::REST::Events::V1PageMetadata>';
244
- end
245
- end
246
- class SchemaListResponse < InstanceListResource
247
-
248
- # @param [Array<SchemaInstance>] instance
249
- # @param [Hash{String => Object}] headers
250
- # @param [Integer] status_code
251
- def initialize(version, payload, key, limit = :unset)
252
- data_list = payload.body[key] || []
253
- if limit != :unset
254
- data_list = data_list[0, limit]
255
- end
256
- @schema = data_list.map do |data|
257
- SchemaInstance.new(version, data)
258
- end
259
- @headers = payload.headers
260
- @status_code = payload.status_code
261
- end
262
-
263
- def schema
264
- @schema
265
- end
266
-
267
- def headers
268
- @headers
269
- end
270
-
271
- def status_code
272
- @status_code
273
- end
274
- end
275
-
276
217
  class SchemaInstance < InstanceResource
277
218
  ##
278
219
  # Initialize the SchemaInstance
@@ -116,65 +116,6 @@ module Twilio
116
116
  end
117
117
  end
118
118
 
119
- class SinkTestPageMetadata < PageMetadata
120
- attr_reader :sink_test_page
121
-
122
- def initialize(version, response, solution, limit)
123
- super(version, response)
124
- @sink_test_page = []
125
- @limit = limit
126
- key = get_key(response.body)
127
- records = 0
128
- while( limit != :unset && records < limit )
129
- @sink_test_page << SinkTestListResponse.new(version, @payload, key, limit - records)
130
- @payload = self.next_page
131
- break unless @payload
132
- records += (@payload.body[key] || []).size
133
- end
134
- # Path Solution
135
- @solution = solution
136
- end
137
-
138
- def each
139
- @sink_test_page.each do |record|
140
- yield record
141
- end
142
- end
143
-
144
- def to_s
145
- '<Twilio::REST::Events::V1PageMetadata>';
146
- end
147
- end
148
- class SinkTestListResponse < InstanceListResource
149
-
150
- # @param [Array<SinkTestInstance>] instance
151
- # @param [Hash{String => Object}] headers
152
- # @param [Integer] status_code
153
- def initialize(version, payload, key, limit = :unset)
154
- data_list = payload.body[key] || []
155
- if limit != :unset
156
- data_list = data_list[0, limit]
157
- end
158
- @sink_test = data_list.map do |data|
159
- SinkTestInstance.new(version, data)
160
- end
161
- @headers = payload.headers
162
- @status_code = payload.status_code
163
- end
164
-
165
- def sink_test
166
- @sink_test
167
- end
168
-
169
- def headers
170
- @headers
171
- end
172
-
173
- def status_code
174
- @status_code
175
- end
176
- end
177
-
178
119
  class SinkTestInstance < InstanceResource
179
120
  ##
180
121
  # Initialize the SinkTestInstance
@@ -130,65 +130,6 @@ module Twilio
130
130
  end
131
131
  end
132
132
 
133
- class SinkValidatePageMetadata < PageMetadata
134
- attr_reader :sink_validate_page
135
-
136
- def initialize(version, response, solution, limit)
137
- super(version, response)
138
- @sink_validate_page = []
139
- @limit = limit
140
- key = get_key(response.body)
141
- records = 0
142
- while( limit != :unset && records < limit )
143
- @sink_validate_page << SinkValidateListResponse.new(version, @payload, key, limit - records)
144
- @payload = self.next_page
145
- break unless @payload
146
- records += (@payload.body[key] || []).size
147
- end
148
- # Path Solution
149
- @solution = solution
150
- end
151
-
152
- def each
153
- @sink_validate_page.each do |record|
154
- yield record
155
- end
156
- end
157
-
158
- def to_s
159
- '<Twilio::REST::Events::V1PageMetadata>';
160
- end
161
- end
162
- class SinkValidateListResponse < InstanceListResource
163
-
164
- # @param [Array<SinkValidateInstance>] instance
165
- # @param [Hash{String => Object}] headers
166
- # @param [Integer] status_code
167
- def initialize(version, payload, key, limit = :unset)
168
- data_list = payload.body[key] || []
169
- if limit != :unset
170
- data_list = data_list[0, limit]
171
- end
172
- @sink_validate = data_list.map do |data|
173
- SinkValidateInstance.new(version, data)
174
- end
175
- @headers = payload.headers
176
- @status_code = payload.status_code
177
- end
178
-
179
- def sink_validate
180
- @sink_validate
181
- end
182
-
183
- def headers
184
- @headers
185
- end
186
-
187
- def status_code
188
- @status_code
189
- end
190
- end
191
-
192
133
  class SinkValidateInstance < InstanceResource
193
134
  ##
194
135
  # Initialize the SinkValidateInstance
@@ -150,8 +150,8 @@ module Twilio
150
150
  # Lists AssessmentsInstance records from the API as a list.
151
151
  # Unlike stream(), this operation is eager and will load `limit` records into
152
152
  # memory before returning.
153
- # @param [String] authorization The Authorization HTTP request header
154
153
  # @param [String] segment_id The id of the segment.
154
+ # @param [String] authorization The Authorization HTTP request header
155
155
  # @param [Integer] limit Upper limit for the number of records to return. stream()
156
156
  # guarantees to never return more than limit. Default is no limit
157
157
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -159,10 +159,10 @@ module Twilio
159
159
  # but a limit is defined, stream() will attempt to read the limit with the most
160
160
  # efficient page size, i.e. min(limit, 1000)
161
161
  # @return [Array] Array of up to limit results
162
- def list(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
162
+ def list(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
163
163
  self.stream(
164
- authorization: authorization,
165
164
  segment_id: segment_id,
165
+ authorization: authorization,
166
166
  limit: limit,
167
167
  page_size: page_size
168
168
  ).entries
@@ -172,8 +172,8 @@ module Twilio
172
172
  # Streams Instance records from the API as an Enumerable.
173
173
  # This operation lazily loads records as efficiently as possible until the limit
174
174
  # is reached.
175
- # @param [String] authorization The Authorization HTTP request header
176
175
  # @param [String] segment_id The id of the segment.
176
+ # @param [String] authorization The Authorization HTTP request header
177
177
  # @param [Integer] limit Upper limit for the number of records to return. stream()
178
178
  # guarantees to never return more than limit. Default is no limit
179
179
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -181,12 +181,12 @@ module Twilio
181
181
  # but a limit is defined, stream() will attempt to read the limit with the most
182
182
  # efficient page size, i.e. min(limit, 1000)
183
183
  # @return [Enumerable] Enumerable that will yield up to limit results
184
- def stream(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
184
+ def stream(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
185
185
  limits = @version.read_limits(limit, page_size)
186
186
 
187
187
  page = self.page(
188
- authorization: authorization,
189
188
  segment_id: segment_id,
189
+ authorization: authorization,
190
190
  page_size: limits[:page_size], )
191
191
 
192
192
  return [].each if page.nil?
@@ -198,8 +198,8 @@ module Twilio
198
198
 
199
199
  ##
200
200
  # Lists AssessmentsPageMetadata records from the API as a list.
201
- # @param [String] authorization The Authorization HTTP request header
202
201
  # @param [String] segment_id The id of the segment.
202
+ # @param [String] authorization The Authorization HTTP request header
203
203
  # @param [Integer] limit Upper limit for the number of records to return. stream()
204
204
  # guarantees to never return more than limit. Default is no limit
205
205
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -207,15 +207,14 @@ module Twilio
207
207
  # but a limit is defined, stream() will attempt to read the limit with the most
208
208
  # efficient page size, i.e. min(limit, 1000)
209
209
  # @return [Array] Array of up to limit results
210
- def list_with_metadata(authorization: :unset, segment_id: :unset, limit: nil, page_size: nil)
210
+ def list_with_metadata(segment_id: :unset, authorization: :unset, limit: nil, page_size: nil)
211
211
  limits = @version.read_limits(limit, page_size)
212
212
  params = Twilio::Values.of({
213
- 'Authorization' => authorization,
214
213
  'SegmentId' => segment_id,
215
214
 
216
215
  'PageSize' => limits[:page_size],
217
216
  });
218
- headers = Twilio::Values.of({})
217
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
219
218
 
220
219
  response = @version.page('GET', @uri, params: params, headers: headers)
221
220
 
@@ -243,21 +242,20 @@ module Twilio
243
242
  ##
244
243
  # Retrieve a single page of AssessmentsInstance records from the API.
245
244
  # Request is executed immediately.
246
- # @param [String] authorization The Authorization HTTP request header
247
245
  # @param [String] segment_id The id of the segment.
246
+ # @param [String] authorization The Authorization HTTP request header
248
247
  # @param [String] page_token PageToken provided by the API
249
248
  # @param [Integer] page_number Page Number, this value is simply for client state
250
249
  # @param [Integer] page_size Number of records to return, defaults to 50
251
250
  # @return [Page] Page of AssessmentsInstance
252
- def page(authorization: :unset, segment_id: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
251
+ def page(segment_id: :unset, authorization: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
253
252
  params = Twilio::Values.of({
254
- 'Authorization' => authorization,
255
253
  'SegmentId' => segment_id,
256
254
  'PageToken' => page_token,
257
255
  'Page' => page_number,
258
256
  'PageSize' => page_size,
259
257
  })
260
- headers = Twilio::Values.of({})
258
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
261
259
 
262
260
 
263
261
 
@@ -249,65 +249,6 @@ module Twilio
249
249
  end
250
250
  end
251
251
 
252
- class ConfigurationPageMetadata < PageMetadata
253
- attr_reader :configuration_page
254
-
255
- def initialize(version, response, solution, limit)
256
- super(version, response)
257
- @configuration_page = []
258
- @limit = limit
259
- key = get_key(response.body)
260
- records = 0
261
- while( limit != :unset && records < limit )
262
- @configuration_page << ConfigurationListResponse.new(version, @payload, key, limit - records)
263
- @payload = self.next_page
264
- break unless @payload
265
- records += (@payload.body[key] || []).size
266
- end
267
- # Path Solution
268
- @solution = solution
269
- end
270
-
271
- def each
272
- @configuration_page.each do |record|
273
- yield record
274
- end
275
- end
276
-
277
- def to_s
278
- '<Twilio::REST::FlexApi::V1PageMetadata>';
279
- end
280
- end
281
- class ConfigurationListResponse < InstanceListResource
282
-
283
- # @param [Array<ConfigurationInstance>] instance
284
- # @param [Hash{String => Object}] headers
285
- # @param [Integer] status_code
286
- def initialize(version, payload, key, limit = :unset)
287
- data_list = payload.body[key] || []
288
- if limit != :unset
289
- data_list = data_list[0, limit]
290
- end
291
- @configuration = data_list.map do |data|
292
- ConfigurationInstance.new(version, data)
293
- end
294
- @headers = payload.headers
295
- @status_code = payload.status_code
296
- end
297
-
298
- def configuration
299
- @configuration
300
- end
301
-
302
- def headers
303
- @headers
304
- end
305
-
306
- def status_code
307
- @status_code
308
- end
309
- end
310
-
311
252
  class ConfigurationInstance < InstanceResource
312
253
  ##
313
254
  # Initialize the ConfigurationInstance
@@ -126,9 +126,9 @@ module Twilio
126
126
  # Lists InsightsAssessmentsCommentInstance records from the API as a list.
127
127
  # Unlike stream(), this operation is eager and will load `limit` records into
128
128
  # memory before returning.
129
- # @param [String] authorization The Authorization HTTP request header
130
129
  # @param [String] segment_id The id of the segment.
131
130
  # @param [String] agent_id The id of the agent.
131
+ # @param [String] authorization The Authorization HTTP request header
132
132
  # @param [Integer] limit Upper limit for the number of records to return. stream()
133
133
  # guarantees to never return more than limit. Default is no limit
134
134
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -136,11 +136,11 @@ module Twilio
136
136
  # but a limit is defined, stream() will attempt to read the limit with the most
137
137
  # efficient page size, i.e. min(limit, 1000)
138
138
  # @return [Array] Array of up to limit results
139
- def list(authorization: :unset, segment_id: :unset, agent_id: :unset, limit: nil, page_size: nil)
139
+ def list(segment_id: :unset, agent_id: :unset, authorization: :unset, limit: nil, page_size: nil)
140
140
  self.stream(
141
- authorization: authorization,
142
141
  segment_id: segment_id,
143
142
  agent_id: agent_id,
143
+ authorization: authorization,
144
144
  limit: limit,
145
145
  page_size: page_size
146
146
  ).entries
@@ -150,9 +150,9 @@ module Twilio
150
150
  # Streams Instance records from the API as an Enumerable.
151
151
  # This operation lazily loads records as efficiently as possible until the limit
152
152
  # is reached.
153
- # @param [String] authorization The Authorization HTTP request header
154
153
  # @param [String] segment_id The id of the segment.
155
154
  # @param [String] agent_id The id of the agent.
155
+ # @param [String] authorization The Authorization HTTP request header
156
156
  # @param [Integer] limit Upper limit for the number of records to return. stream()
157
157
  # guarantees to never return more than limit. Default is no limit
158
158
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -160,13 +160,13 @@ module Twilio
160
160
  # but a limit is defined, stream() will attempt to read the limit with the most
161
161
  # efficient page size, i.e. min(limit, 1000)
162
162
  # @return [Enumerable] Enumerable that will yield up to limit results
163
- def stream(authorization: :unset, segment_id: :unset, agent_id: :unset, limit: nil, page_size: nil)
163
+ def stream(segment_id: :unset, agent_id: :unset, authorization: :unset, limit: nil, page_size: nil)
164
164
  limits = @version.read_limits(limit, page_size)
165
165
 
166
166
  page = self.page(
167
- authorization: authorization,
168
167
  segment_id: segment_id,
169
168
  agent_id: agent_id,
169
+ authorization: authorization,
170
170
  page_size: limits[:page_size], )
171
171
 
172
172
  return [].each if page.nil?
@@ -178,9 +178,9 @@ module Twilio
178
178
 
179
179
  ##
180
180
  # Lists InsightsAssessmentsCommentPageMetadata records from the API as a list.
181
- # @param [String] authorization The Authorization HTTP request header
182
181
  # @param [String] segment_id The id of the segment.
183
182
  # @param [String] agent_id The id of the agent.
183
+ # @param [String] authorization The Authorization HTTP request header
184
184
  # @param [Integer] limit Upper limit for the number of records to return. stream()
185
185
  # guarantees to never return more than limit. Default is no limit
186
186
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -188,16 +188,15 @@ module Twilio
188
188
  # but a limit is defined, stream() will attempt to read the limit with the most
189
189
  # efficient page size, i.e. min(limit, 1000)
190
190
  # @return [Array] Array of up to limit results
191
- def list_with_metadata(authorization: :unset, segment_id: :unset, agent_id: :unset, limit: nil, page_size: nil)
191
+ def list_with_metadata(segment_id: :unset, agent_id: :unset, authorization: :unset, limit: nil, page_size: nil)
192
192
  limits = @version.read_limits(limit, page_size)
193
193
  params = Twilio::Values.of({
194
- 'Authorization' => authorization,
195
194
  'SegmentId' => segment_id,
196
195
  'AgentId' => agent_id,
197
196
 
198
197
  'PageSize' => limits[:page_size],
199
198
  });
200
- headers = Twilio::Values.of({})
199
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
201
200
 
202
201
  response = @version.page('GET', @uri, params: params, headers: headers)
203
202
 
@@ -225,23 +224,22 @@ module Twilio
225
224
  ##
226
225
  # Retrieve a single page of InsightsAssessmentsCommentInstance records from the API.
227
226
  # Request is executed immediately.
228
- # @param [String] authorization The Authorization HTTP request header
229
227
  # @param [String] segment_id The id of the segment.
230
228
  # @param [String] agent_id The id of the agent.
229
+ # @param [String] authorization The Authorization HTTP request header
231
230
  # @param [String] page_token PageToken provided by the API
232
231
  # @param [Integer] page_number Page Number, this value is simply for client state
233
232
  # @param [Integer] page_size Number of records to return, defaults to 50
234
233
  # @return [Page] Page of InsightsAssessmentsCommentInstance
235
- def page(authorization: :unset, segment_id: :unset, agent_id: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
234
+ def page(segment_id: :unset, agent_id: :unset, authorization: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
236
235
  params = Twilio::Values.of({
237
- 'Authorization' => authorization,
238
236
  'SegmentId' => segment_id,
239
237
  'AgentId' => agent_id,
240
238
  'PageToken' => page_token,
241
239
  'Page' => page_number,
242
240
  'PageSize' => page_size,
243
241
  })
244
- headers = Twilio::Values.of({})
242
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
245
243
 
246
244
 
247
245