twilio-ruby 5.46.0 → 7.10.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 (1217) hide show
  1. checksums.yaml +5 -5
  2. data/.dockerignore +1 -1
  3. data/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
  4. data/.github/workflows/pr-lint.yml +21 -0
  5. data/.github/workflows/test-and-deploy.yml +147 -0
  6. data/.gitignore +9 -1
  7. data/.rubocop.yml +2 -1
  8. data/.rubocop_todo.yml +91 -28
  9. data/CHANGES.md +2333 -0
  10. data/CONTRIBUTING.md +11 -9
  11. data/Dockerfile +2 -1
  12. data/Gemfile +6 -0
  13. data/LICENSE +1 -1
  14. data/Makefile +18 -11
  15. data/PULL_REQUEST_TEMPLATE.md +1 -1
  16. data/README.md +158 -38
  17. data/UPGRADE.md +21 -0
  18. data/advanced-examples/custom-http-client.md +170 -0
  19. data/cluster/cluster_oauth_spec.rb +19 -0
  20. data/cluster/cluster_orgs_spec.rb +40 -0
  21. data/cluster/cluster_spec.rb +75 -0
  22. data/examples/examples.rb +1 -1
  23. data/examples/public_oauth.rb +13 -0
  24. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  25. data/lib/twilio-ruby/auth_strategy/auth_strategy.rb +19 -0
  26. data/lib/twilio-ruby/auth_strategy/no_auth_strategy.rb +17 -0
  27. data/lib/twilio-ruby/auth_strategy/token_auth_strategy.rb +39 -0
  28. data/lib/twilio-ruby/base/client_base.rb +131 -0
  29. data/lib/twilio-ruby/credential/auth_type.rb +17 -0
  30. data/lib/twilio-ruby/credential/client_credential_provider.rb +28 -0
  31. data/lib/twilio-ruby/credential/credential_provider.rb +11 -0
  32. data/lib/twilio-ruby/credential/orgs_credential_provider.rb +30 -0
  33. data/lib/twilio-ruby/framework/request.rb +8 -1
  34. data/lib/twilio-ruby/framework/rest/api_v1_version.rb +22 -0
  35. data/lib/twilio-ruby/framework/rest/domain.rb +35 -0
  36. data/lib/twilio-ruby/framework/rest/error.rb +66 -0
  37. data/lib/twilio-ruby/framework/rest/page.rb +104 -0
  38. data/lib/twilio-ruby/framework/rest/page_metadata.rb +83 -0
  39. data/lib/twilio-ruby/framework/rest/resource.rb +39 -0
  40. data/lib/twilio-ruby/framework/rest/token_page.rb +73 -0
  41. data/lib/twilio-ruby/framework/rest/version.rb +240 -0
  42. data/lib/twilio-ruby/http/client_token_manager.rb +31 -0
  43. data/lib/twilio-ruby/http/http_client.rb +42 -9
  44. data/lib/twilio-ruby/http/org_token_manager.rb +31 -0
  45. data/lib/twilio-ruby/http.rb +5 -0
  46. data/lib/twilio-ruby/jwt/access_token.rb +13 -59
  47. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +338 -176
  48. data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +231 -0
  49. data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +231 -0
  50. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +644 -332
  51. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +644 -332
  52. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +185 -114
  53. data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +285 -0
  54. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +336 -0
  55. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +378 -190
  56. data/lib/twilio-ruby/rest/accounts/v1.rb +69 -42
  57. data/lib/twilio-ruby/rest/accounts.rb +4 -34
  58. data/lib/twilio-ruby/rest/accounts_base.rb +38 -0
  59. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +459 -365
  60. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +886 -514
  61. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +977 -586
  62. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +482 -320
  63. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +519 -0
  64. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +519 -0
  65. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +519 -0
  66. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +519 -0
  67. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +519 -0
  68. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +519 -0
  69. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +519 -0
  70. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +601 -0
  71. data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +231 -118
  72. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +289 -192
  73. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +578 -417
  74. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +556 -364
  75. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +791 -511
  76. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +1669 -0
  77. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +1669 -0
  78. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +541 -0
  79. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +269 -0
  80. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +420 -0
  81. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1368 -931
  82. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1124 -713
  83. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +694 -458
  84. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +719 -493
  85. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +679 -407
  86. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +483 -344
  87. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +627 -416
  88. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +737 -547
  89. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +737 -546
  90. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +737 -546
  91. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1261 -896
  92. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +567 -302
  93. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +268 -164
  94. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +540 -350
  95. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +970 -612
  96. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +246 -125
  97. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +246 -125
  98. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +577 -399
  99. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +604 -358
  100. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +553 -338
  101. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +702 -390
  102. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +343 -0
  103. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +572 -378
  104. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +560 -383
  105. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +558 -372
  106. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +718 -486
  107. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +644 -408
  108. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +567 -306
  109. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +642 -359
  110. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +667 -371
  111. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +579 -0
  112. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb +579 -0
  113. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +204 -0
  114. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb +579 -0
  115. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +190 -0
  116. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +158 -103
  117. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +564 -331
  118. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +564 -330
  119. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +987 -641
  120. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +694 -418
  121. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +667 -372
  122. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +205 -150
  123. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +258 -139
  124. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +557 -350
  125. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +407 -335
  126. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +407 -335
  127. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +407 -335
  128. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +407 -335
  129. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +407 -335
  130. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +407 -335
  131. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +407 -335
  132. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +407 -335
  133. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +478 -416
  134. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +785 -484
  135. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +176 -104
  136. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +278 -150
  137. data/lib/twilio-ruby/rest/api/v2010/account.rb +1229 -943
  138. data/lib/twilio-ruby/rest/api/v2010.rb +126 -147
  139. data/lib/twilio-ruby/rest/api.rb +26 -35
  140. data/lib/twilio-ruby/rest/api_base.rb +38 -0
  141. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +550 -0
  142. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +550 -0
  143. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +423 -0
  144. data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +296 -0
  145. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +918 -0
  146. data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +317 -0
  147. data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +349 -0
  148. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +862 -0
  149. data/lib/twilio-ruby/rest/assistants/v1/policy.rb +356 -0
  150. data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +352 -0
  151. data/lib/twilio-ruby/rest/assistants/v1/session.rb +493 -0
  152. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +838 -0
  153. data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
  154. data/lib/twilio-ruby/rest/assistants.rb +6 -0
  155. data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
  156. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +468 -287
  157. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +440 -271
  158. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +438 -242
  159. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +389 -243
  160. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +430 -224
  161. data/lib/twilio-ruby/rest/bulkexports/v1.rb +57 -53
  162. data/lib/twilio-ruby/rest/bulkexports.rb +3 -34
  163. data/lib/twilio-ruby/rest/bulkexports_base.rb +38 -0
  164. data/lib/twilio-ruby/rest/chat/v1/credential.rb +719 -403
  165. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +613 -391
  166. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +704 -440
  167. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +722 -437
  168. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +822 -515
  169. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +672 -367
  170. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +331 -237
  171. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +750 -440
  172. data/lib/twilio-ruby/rest/chat/v1/service.rb +1287 -894
  173. data/lib/twilio-ruby/rest/chat/v1.rb +57 -53
  174. data/lib/twilio-ruby/rest/chat/v2/credential.rb +719 -401
  175. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +570 -370
  176. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +613 -386
  177. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +799 -527
  178. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +825 -533
  179. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +746 -467
  180. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +916 -605
  181. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +672 -369
  182. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +561 -381
  183. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +648 -413
  184. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +796 -491
  185. data/lib/twilio-ruby/rest/chat/v2/service.rb +1121 -778
  186. data/lib/twilio-ruby/rest/chat/v2.rb +57 -51
  187. data/lib/twilio-ruby/rest/chat/v3/channel.rb +452 -0
  188. data/lib/twilio-ruby/rest/chat/v3.rb +71 -0
  189. data/lib/twilio-ruby/rest/chat.rb +10 -38
  190. data/lib/twilio-ruby/rest/chat_base.rb +48 -0
  191. data/lib/twilio-ruby/rest/client.rb +338 -540
  192. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +280 -0
  193. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +349 -0
  194. data/lib/twilio-ruby/rest/content/v1/content.rb +1921 -0
  195. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +340 -0
  196. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +354 -0
  197. data/lib/twilio-ruby/rest/content/v1.rb +61 -0
  198. data/lib/twilio-ruby/rest/content/v2/content.rb +425 -0
  199. data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +418 -0
  200. data/lib/twilio-ruby/rest/content/v2.rb +46 -0
  201. data/lib/twilio-ruby/rest/content.rb +15 -0
  202. data/lib/twilio-ruby/rest/content_base.rb +43 -0
  203. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +808 -0
  204. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +445 -227
  205. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +467 -252
  206. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +504 -344
  207. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +852 -488
  208. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +817 -495
  209. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +725 -403
  210. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +957 -545
  211. data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +392 -0
  212. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +728 -409
  213. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +405 -0
  214. data/lib/twilio-ruby/rest/conversations/v1/role.rb +657 -356
  215. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +563 -373
  216. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +540 -296
  217. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +470 -0
  218. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +497 -271
  219. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +504 -363
  220. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +860 -526
  221. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +829 -530
  222. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +737 -438
  223. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +972 -581
  224. data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +399 -0
  225. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +410 -0
  226. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +672 -380
  227. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +697 -0
  228. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +773 -430
  229. data/lib/twilio-ruby/rest/conversations/v1/service.rb +724 -424
  230. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +690 -0
  231. data/lib/twilio-ruby/rest/conversations/v1/user.rb +758 -406
  232. data/lib/twilio-ruby/rest/conversations/v1.rb +135 -107
  233. data/lib/twilio-ruby/rest/conversations.rb +24 -34
  234. data/lib/twilio-ruby/rest/conversations_base.rb +38 -0
  235. data/lib/twilio-ruby/rest/events/v1/event_type.rb +486 -281
  236. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +461 -283
  237. data/lib/twilio-ruby/rest/events/v1/schema.rb +366 -214
  238. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +209 -100
  239. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +222 -103
  240. data/lib/twilio-ruby/rest/events/v1/sink.rb +711 -371
  241. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +621 -192
  242. data/lib/twilio-ruby/rest/events/v1/subscription.rb +685 -380
  243. data/lib/twilio-ruby/rest/events/v1.rb +87 -83
  244. data/lib/twilio-ruby/rest/events.rb +5 -34
  245. data/lib/twilio-ruby/rest/events_base.rb +38 -0
  246. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +697 -0
  247. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +621 -330
  248. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +722 -440
  249. data/lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb +382 -0
  250. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +928 -549
  251. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +475 -0
  252. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +321 -0
  253. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +735 -0
  254. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +598 -0
  255. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +710 -0
  256. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +457 -0
  257. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +359 -0
  258. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +251 -0
  259. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +237 -0
  260. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +338 -0
  261. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +379 -0
  262. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +571 -0
  263. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +547 -0
  264. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +644 -0
  265. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +537 -0
  266. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +621 -0
  267. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +700 -0
  268. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +390 -0
  269. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +564 -0
  270. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +599 -0
  271. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +376 -0
  272. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +539 -0
  273. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +400 -0
  274. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +327 -0
  275. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +663 -331
  276. data/lib/twilio-ruby/rest/flex_api/v1.rb +319 -73
  277. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +515 -0
  278. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +266 -0
  279. data/lib/twilio-ruby/rest/flex_api/v2.rb +77 -0
  280. data/lib/twilio-ruby/rest/flex_api.rb +33 -31
  281. data/lib/twilio-ruby/rest/flex_api_base.rb +43 -0
  282. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +463 -0
  283. data/lib/twilio-ruby/rest/frontline_api/v1.rb +49 -0
  284. data/lib/twilio-ruby/rest/frontline_api.rb +15 -0
  285. data/lib/twilio-ruby/rest/frontline_api_base.rb +38 -0
  286. data/lib/twilio-ruby/rest/iam/v1/api_key.rb +471 -0
  287. data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +320 -0
  288. data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +284 -0
  289. data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +646 -0
  290. data/lib/twilio-ruby/rest/iam/v1/token.rb +301 -0
  291. data/lib/twilio-ruby/rest/iam/v1.rb +82 -0
  292. data/lib/twilio-ruby/rest/iam.rb +6 -0
  293. data/lib/twilio-ruby/rest/iam_base.rb +33 -0
  294. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +516 -0
  295. data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +499 -0
  296. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +360 -255
  297. data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +333 -224
  298. data/lib/twilio-ruby/rest/insights/v1/call.rb +403 -228
  299. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +726 -0
  300. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +672 -0
  301. data/lib/twilio-ruby/rest/insights/v1/conference.rb +693 -0
  302. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +545 -371
  303. data/lib/twilio-ruby/rest/insights/v1/room.rb +668 -477
  304. data/lib/twilio-ruby/rest/insights/v1/setting.rb +445 -0
  305. data/lib/twilio-ruby/rest/insights/v1.rb +84 -51
  306. data/lib/twilio-ruby/rest/insights.rb +24 -32
  307. data/lib/twilio-ruby/rest/insights_base.rb +38 -0
  308. data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +720 -0
  309. data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +525 -0
  310. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +380 -0
  311. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +337 -0
  312. data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +523 -0
  313. data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +525 -0
  314. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +844 -0
  315. data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +359 -0
  316. data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +359 -0
  317. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +373 -0
  318. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +570 -0
  319. data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +354 -0
  320. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +815 -0
  321. data/lib/twilio-ruby/rest/intelligence/v2.rb +176 -0
  322. data/lib/twilio-ruby/rest/intelligence.rb +6 -0
  323. data/lib/twilio-ruby/rest/intelligence_base.rb +38 -0
  324. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +719 -364
  325. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +613 -359
  326. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +704 -397
  327. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +722 -409
  328. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +822 -488
  329. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +672 -347
  330. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +331 -231
  331. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +750 -418
  332. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1287 -779
  333. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +57 -51
  334. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +719 -364
  335. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +570 -343
  336. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +613 -359
  337. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +799 -451
  338. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +825 -479
  339. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +746 -411
  340. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +916 -555
  341. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +672 -347
  342. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +561 -351
  343. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +637 -384
  344. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +796 -467
  345. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +1121 -689
  346. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +57 -51
  347. data/lib/twilio-ruby/rest/ip_messaging.rb +3 -41
  348. data/lib/twilio-ruby/rest/ip_messaging_base.rb +43 -0
  349. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +317 -0
  350. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +349 -0
  351. data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +856 -0
  352. data/lib/twilio-ruby/rest/knowledge/v1.rb +49 -0
  353. data/lib/twilio-ruby/rest/knowledge.rb +6 -0
  354. data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
  355. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +399 -237
  356. data/lib/twilio-ruby/rest/lookups/v1.rb +42 -38
  357. data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +500 -0
  358. data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +603 -0
  359. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +578 -0
  360. data/lib/twilio-ruby/rest/lookups/v2/query.rb +351 -0
  361. data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +229 -0
  362. data/lib/twilio-ruby/rest/lookups/v2.rb +135 -0
  363. data/lib/twilio-ruby/rest/lookups.rb +2 -34
  364. data/lib/twilio-ruby/rest/lookups_base.rb +43 -0
  365. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +475 -0
  366. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +501 -0
  367. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +555 -0
  368. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +252 -0
  369. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +735 -0
  370. data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +342 -0
  371. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +511 -0
  372. data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +235 -0
  373. data/lib/twilio-ruby/rest/marketplace/v1.rb +91 -0
  374. data/lib/twilio-ruby/rest/marketplace.rb +6 -0
  375. data/lib/twilio-ruby/rest/marketplace_base.rb +38 -0
  376. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +231 -0
  377. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +575 -0
  378. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +768 -0
  379. data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +337 -0
  380. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +483 -0
  381. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +477 -0
  382. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +379 -0
  383. data/lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb +344 -0
  384. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +271 -0
  385. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +380 -0
  386. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +337 -0
  387. data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +379 -0
  388. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +580 -335
  389. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +594 -0
  390. data/lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb +608 -0
  391. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +587 -341
  392. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +587 -336
  393. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +944 -0
  394. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +236 -0
  395. data/lib/twilio-ruby/rest/messaging/v1/service.rb +1149 -645
  396. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +1527 -0
  397. data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +217 -0
  398. data/lib/twilio-ruby/rest/messaging/v1.rb +217 -43
  399. data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +1002 -0
  400. data/lib/twilio-ruby/rest/messaging/v2/domain_certs.rb +386 -0
  401. data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +237 -0
  402. data/lib/twilio-ruby/rest/messaging/v2.rb +70 -0
  403. data/lib/twilio-ruby/rest/messaging.rb +48 -27
  404. data/lib/twilio-ruby/rest/messaging_base.rb +43 -0
  405. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +572 -395
  406. data/lib/twilio-ruby/rest/monitor/v1/event.rb +561 -390
  407. data/lib/twilio-ruby/rest/monitor/v1.rb +57 -51
  408. data/lib/twilio-ruby/rest/monitor.rb +3 -34
  409. data/lib/twilio-ruby/rest/monitor_base.rb +38 -0
  410. data/lib/twilio-ruby/rest/notify/v1/credential.rb +719 -408
  411. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +694 -452
  412. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +466 -362
  413. data/lib/twilio-ruby/rest/notify/v1/service.rb +971 -622
  414. data/lib/twilio-ruby/rest/notify/v1.rb +57 -53
  415. data/lib/twilio-ruby/rest/notify.rb +3 -34
  416. data/lib/twilio-ruby/rest/notify_base.rb +38 -0
  417. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +411 -0
  418. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +221 -0
  419. data/lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb +367 -0
  420. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +616 -0
  421. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +485 -0
  422. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +405 -0
  423. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +242 -0
  424. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +301 -0
  425. data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +395 -0
  426. data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +252 -0
  427. data/lib/twilio-ruby/rest/numbers/v1.rb +161 -0
  428. data/lib/twilio-ruby/rest/numbers/v2/application.rb +562 -0
  429. data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +440 -0
  430. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +649 -0
  431. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +442 -0
  432. data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +430 -0
  433. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +915 -0
  434. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +412 -0
  435. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +524 -298
  436. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +564 -309
  437. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +303 -0
  438. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +923 -505
  439. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +667 -351
  440. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +458 -266
  441. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +521 -307
  442. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +695 -364
  443. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +458 -266
  444. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +241 -181
  445. data/lib/twilio-ruby/rest/numbers/v2.rb +108 -28
  446. data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +484 -0
  447. data/lib/twilio-ruby/rest/numbers/v3.rb +40 -0
  448. data/lib/twilio-ruby/rest/numbers.rb +2 -34
  449. data/lib/twilio-ruby/rest/numbers_base.rb +48 -0
  450. data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +253 -0
  451. data/lib/twilio-ruby/rest/oauth/v1/token.rb +301 -0
  452. data/lib/twilio-ruby/rest/oauth/v1.rb +46 -0
  453. data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +253 -0
  454. data/lib/twilio-ruby/rest/oauth/v2/token.rb +311 -0
  455. data/lib/twilio-ruby/rest/oauth/v2.rb +46 -0
  456. data/lib/twilio-ruby/rest/oauth.rb +6 -0
  457. data/lib/twilio-ruby/rest/oauth_base.rb +43 -0
  458. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +469 -396
  459. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +724 -446
  460. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +960 -625
  461. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +57 -53
  462. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +468 -298
  463. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +491 -309
  464. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +548 -330
  465. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +706 -398
  466. data/lib/twilio-ruby/rest/preview/marketplace.rb +57 -51
  467. data/lib/twilio-ruby/rest/preview/wireless/command.rb +616 -364
  468. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +743 -398
  469. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +382 -205
  470. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +833 -523
  471. data/lib/twilio-ruby/rest/preview/wireless.rb +72 -66
  472. data/lib/twilio-ruby/rest/preview.rb +10 -145
  473. data/lib/twilio-ruby/rest/preview_base.rb +48 -0
  474. data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +253 -0
  475. data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +301 -0
  476. data/lib/twilio-ruby/rest/preview_iam/v1.rb +46 -0
  477. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/account.rb +468 -0
  478. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb +559 -0
  479. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/user.rb +768 -0
  480. data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +413 -0
  481. data/lib/twilio-ruby/rest/preview_iam/versionless.rb +49 -0
  482. data/lib/twilio-ruby/rest/preview_iam.rb +9 -0
  483. data/lib/twilio-ruby/rest/preview_iam_base.rb +38 -0
  484. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +465 -275
  485. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +172 -120
  486. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +458 -268
  487. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +172 -120
  488. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +465 -275
  489. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +345 -179
  490. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +185 -135
  491. data/lib/twilio-ruby/rest/pricing/v1.rb +45 -42
  492. data/lib/twilio-ruby/rest/pricing/v2/country.rb +467 -0
  493. data/lib/twilio-ruby/rest/pricing/v2/number.rb +389 -0
  494. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +465 -275
  495. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +367 -200
  496. data/lib/twilio-ruby/rest/pricing/v2/voice.rb +185 -138
  497. data/lib/twilio-ruby/rest/pricing/v2.rb +63 -28
  498. data/lib/twilio-ruby/rest/pricing.rb +22 -38
  499. data/lib/twilio-ruby/rest/pricing_base.rb +43 -0
  500. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +693 -403
  501. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +600 -418
  502. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +640 -447
  503. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +659 -453
  504. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +811 -547
  505. data/lib/twilio-ruby/rest/proxy/v1/service.rb +839 -596
  506. data/lib/twilio-ruby/rest/proxy/v1.rb +42 -37
  507. data/lib/twilio-ruby/rest/proxy.rb +2 -34
  508. data/lib/twilio-ruby/rest/proxy_base.rb +38 -0
  509. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +452 -0
  510. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +452 -0
  511. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +452 -0
  512. data/lib/twilio-ruby/rest/routes/v2.rb +79 -0
  513. data/lib/twilio-ruby/rest/routes.rb +32 -0
  514. data/lib/twilio-ruby/rest/routes_base.rb +38 -0
  515. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +483 -323
  516. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +680 -380
  517. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +350 -208
  518. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +645 -374
  519. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +549 -338
  520. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +535 -383
  521. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +680 -396
  522. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +688 -447
  523. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +342 -210
  524. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +510 -353
  525. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +680 -380
  526. data/lib/twilio-ruby/rest/serverless/v1/service.rb +803 -486
  527. data/lib/twilio-ruby/rest/serverless/v1.rb +42 -36
  528. data/lib/twilio-ruby/rest/serverless.rb +2 -34
  529. data/lib/twilio-ruby/rest/serverless_base.rb +38 -0
  530. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +350 -199
  531. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +342 -194
  532. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +545 -355
  533. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +659 -394
  534. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +350 -200
  535. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +342 -197
  536. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +545 -361
  537. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +748 -449
  538. data/lib/twilio-ruby/rest/studio/v1/flow.rb +572 -355
  539. data/lib/twilio-ruby/rest/studio/v1.rb +42 -36
  540. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +350 -208
  541. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +342 -205
  542. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +545 -369
  543. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +741 -450
  544. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +510 -328
  545. data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +413 -0
  546. data/lib/twilio-ruby/rest/studio/v2/flow.rb +804 -480
  547. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +241 -114
  548. data/lib/twilio-ruby/rest/studio/v2.rb +48 -43
  549. data/lib/twilio-ruby/rest/studio.rb +3 -41
  550. data/lib/twilio-ruby/rest/studio_base.rb +43 -0
  551. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +621 -0
  552. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +757 -411
  553. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +634 -0
  554. data/lib/twilio-ruby/rest/supersim/v1/network.rb +474 -297
  555. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +566 -332
  556. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +624 -351
  557. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +349 -0
  558. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +338 -0
  559. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +296 -0
  560. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +725 -388
  561. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +586 -0
  562. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +408 -328
  563. data/lib/twilio-ruby/rest/supersim/v1.rb +144 -103
  564. data/lib/twilio-ruby/rest/supersim.rb +40 -40
  565. data/lib/twilio-ruby/rest/supersim_base.rb +38 -0
  566. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +616 -379
  567. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +736 -442
  568. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +766 -497
  569. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +616 -378
  570. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +749 -459
  571. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +772 -504
  572. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +616 -376
  573. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +749 -458
  574. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +242 -138
  575. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +692 -414
  576. data/lib/twilio-ruby/rest/sync/v1/service.rb +878 -575
  577. data/lib/twilio-ruby/rest/sync/v1.rb +42 -36
  578. data/lib/twilio-ruby/rest/sync.rb +2 -34
  579. data/lib/twilio-ruby/rest/sync_base.rb +38 -0
  580. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +682 -388
  581. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +633 -464
  582. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +1079 -732
  583. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +985 -637
  584. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +688 -382
  585. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +258 -0
  586. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +522 -366
  587. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +430 -276
  588. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +410 -254
  589. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +358 -276
  590. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +882 -566
  591. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +1053 -728
  592. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +602 -388
  593. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +394 -239
  594. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +440 -266
  595. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +364 -193
  596. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +418 -234
  597. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +927 -619
  598. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +522 -374
  599. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +395 -241
  600. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +410 -262
  601. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +822 -510
  602. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +514 -354
  603. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +379 -205
  604. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +387 -219
  605. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +1022 -715
  606. data/lib/twilio-ruby/rest/taskrouter/v1.rb +42 -36
  607. data/lib/twilio-ruby/rest/taskrouter.rb +2 -34
  608. data/lib/twilio-ruby/rest/taskrouter_base.rb +38 -0
  609. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +573 -320
  610. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +573 -317
  611. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +734 -419
  612. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +706 -451
  613. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +391 -174
  614. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +939 -614
  615. data/lib/twilio-ruby/rest/trunking/v1.rb +42 -37
  616. data/lib/twilio-ruby/rest/trunking.rb +2 -34
  617. data/lib/twilio-ruby/rest/trunking_base.rb +38 -0
  618. data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +440 -0
  619. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +656 -0
  620. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +474 -0
  621. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +602 -0
  622. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +581 -0
  623. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +547 -0
  624. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +833 -0
  625. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +669 -0
  626. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +460 -0
  627. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +453 -0
  628. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +683 -0
  629. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +460 -0
  630. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +602 -0
  631. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +581 -0
  632. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +547 -0
  633. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +833 -0
  634. data/lib/twilio-ruby/rest/trusthub/v1.rb +175 -0
  635. data/lib/twilio-ruby/rest/trusthub.rb +74 -0
  636. data/lib/twilio-ruby/rest/trusthub_base.rb +38 -0
  637. data/lib/twilio-ruby/rest/verify/v2/form.rb +334 -181
  638. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +433 -0
  639. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +454 -108
  640. data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +402 -0
  641. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +302 -0
  642. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +770 -449
  643. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +705 -453
  644. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +418 -0
  645. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +653 -394
  646. data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +652 -363
  647. data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +478 -0
  648. data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +387 -0
  649. data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +357 -0
  650. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +680 -388
  651. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +693 -384
  652. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +655 -349
  653. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +321 -181
  654. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +741 -401
  655. data/lib/twilio-ruby/rest/verify/v2/service.rb +1360 -693
  656. data/lib/twilio-ruby/rest/verify/v2/template.rb +320 -0
  657. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +566 -0
  658. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +410 -0
  659. data/lib/twilio-ruby/rest/verify/v2.rb +99 -53
  660. data/lib/twilio-ruby/rest/verify.rb +33 -31
  661. data/lib/twilio-ruby/rest/verify_base.rb +38 -0
  662. data/lib/twilio-ruby/rest/video/v1/composition.rb +738 -494
  663. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +854 -655
  664. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +475 -261
  665. data/lib/twilio-ruby/rest/video/v1/recording.rb +631 -405
  666. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +475 -261
  667. data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +403 -0
  668. data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +501 -0
  669. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +316 -0
  670. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +508 -0
  671. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +714 -0
  672. data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +303 -0
  673. data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +624 -0
  674. data/lib/twilio-ruby/rest/video/v1/room/transcriptions.rb +648 -0
  675. data/lib/twilio-ruby/rest/video/v1/room.rb +938 -542
  676. data/lib/twilio-ruby/rest/video/v1.rb +99 -95
  677. data/lib/twilio-ruby/rest/video.rb +7 -34
  678. data/lib/twilio-ruby/rest/video_base.rb +38 -0
  679. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +302 -0
  680. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +822 -486
  681. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +734 -434
  682. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +658 -352
  683. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +236 -121
  684. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +282 -181
  685. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +553 -397
  686. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +377 -173
  687. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +187 -122
  688. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +650 -339
  689. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +630 -319
  690. data/lib/twilio-ruby/rest/voice/v1.rb +130 -92
  691. data/lib/twilio-ruby/rest/voice.rb +12 -31
  692. data/lib/twilio-ruby/rest/voice_base.rb +38 -0
  693. data/lib/twilio-ruby/rest/wireless/v1/command.rb +663 -406
  694. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +769 -436
  695. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +387 -284
  696. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +317 -226
  697. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +925 -657
  698. data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +319 -219
  699. data/lib/twilio-ruby/rest/wireless/v1.rb +78 -73
  700. data/lib/twilio-ruby/rest/wireless.rb +5 -34
  701. data/lib/twilio-ruby/rest/wireless_base.rb +38 -0
  702. data/lib/twilio-ruby/rest.rb +14 -0
  703. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  704. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  705. data/lib/twilio-ruby/twiml/voice_response.rb +1287 -143
  706. data/lib/twilio-ruby/version.rb +1 -1
  707. data/lib/twilio-ruby.rb +6 -16
  708. data/sonar-project.properties +13 -0
  709. data/twilio-ruby.gemspec +5 -5
  710. metadata +334 -942
  711. data/.travis.yml +0 -45
  712. data/conf/cacert.pem +0 -3376
  713. data/lib/twilio-ruby/framework/domain.rb +0 -36
  714. data/lib/twilio-ruby/framework/error.rb +0 -51
  715. data/lib/twilio-ruby/framework/page.rb +0 -103
  716. data/lib/twilio-ruby/framework/resource.rb +0 -23
  717. data/lib/twilio-ruby/framework/twilio_response.rb +0 -19
  718. data/lib/twilio-ruby/framework/version.rb +0 -153
  719. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +0 -500
  720. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +0 -500
  721. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +0 -500
  722. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +0 -500
  723. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +0 -500
  724. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +0 -500
  725. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +0 -500
  726. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -464
  727. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -301
  728. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -314
  729. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +0 -348
  730. 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
  731. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +0 -163
  732. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +0 -348
  733. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +0 -137
  734. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -220
  735. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -214
  736. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -399
  737. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -418
  738. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -392
  739. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -469
  740. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -218
  741. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -386
  742. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -456
  743. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -255
  744. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -237
  745. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -507
  746. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -420
  747. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -650
  748. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -194
  749. data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -51
  750. data/lib/twilio-ruby/rest/autopilot.rb +0 -53
  751. data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +0 -314
  752. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
  753. data/lib/twilio-ruby/rest/fax/v1.rb +0 -44
  754. data/lib/twilio-ruby/rest/fax.rb +0 -47
  755. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +0 -307
  756. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +0 -164
  757. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -294
  758. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  759. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  760. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  761. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  762. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -60
  763. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -382
  764. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -365
  765. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -425
  766. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -376
  767. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -469
  768. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -44
  769. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -385
  770. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -410
  771. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -418
  772. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -385
  773. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -405
  774. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -415
  775. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -385
  776. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -405
  777. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -462
  778. data/lib/twilio-ruby/rest/preview/sync.rb +0 -43
  779. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  780. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  781. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +0 -195
  782. data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +0 -186
  783. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  784. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -64
  785. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -212
  786. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -212
  787. data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -206
  788. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -386
  789. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -407
  790. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -380
  791. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -437
  792. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -212
  793. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
  794. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -428
  795. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -241
  796. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -225
  797. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -495
  798. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -629
  799. data/lib/twilio-ruby/rest/preview/understand.rb +0 -44
  800. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -377
  801. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +0 -205
  802. data/lib/twilio-ruby/rest/supersim/v1/command.rb +0 -368
  803. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -406
  804. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +0 -335
  805. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -175
  806. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +0 -340
  807. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +0 -483
  808. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -150
  809. data/spec/framework/request_spec.rb +0 -36
  810. data/spec/framework/serialize_spec.rb +0 -80
  811. data/spec/framework/version_spec.rb +0 -219
  812. data/spec/holodeck/holodeck.rb +0 -66
  813. data/spec/holodeck/hologram.rb +0 -4
  814. data/spec/http/http_client_spec.rb +0 -122
  815. data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +0 -44
  816. data/spec/integration/accounts/v1/credential/aws_spec.rb +0 -222
  817. data/spec/integration/accounts/v1/credential/public_key_spec.rb +0 -222
  818. data/spec/integration/accounts/v1/credential_spec.rb +0 -12
  819. data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +0 -69
  820. data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +0 -106
  821. data/spec/integration/api/v2010/account/address_spec.rb +0 -269
  822. data/spec/integration/api/v2010/account/application_spec.rb +0 -274
  823. data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +0 -137
  824. data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +0 -102
  825. data/spec/integration/api/v2010/account/available_phone_number/machine_to_machine_spec.rb +0 -102
  826. data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +0 -101
  827. data/spec/integration/api/v2010/account/available_phone_number/national_spec.rb +0 -102
  828. data/spec/integration/api/v2010/account/available_phone_number/shared_cost_spec.rb +0 -102
  829. data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +0 -101
  830. data/spec/integration/api/v2010/account/available_phone_number/voip_spec.rb +0 -102
  831. data/spec/integration/api/v2010/account/available_phone_number_spec.rb +0 -128
  832. data/spec/integration/api/v2010/account/balance_spec.rb +0 -44
  833. data/spec/integration/api/v2010/account/call/event_spec.rb +0 -102
  834. data/spec/integration/api/v2010/account/call/feedback_spec.rb +0 -138
  835. data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +0 -149
  836. data/spec/integration/api/v2010/account/call/notification_spec.rb +0 -143
  837. data/spec/integration/api/v2010/account/call/payment_spec.rb +0 -135
  838. data/spec/integration/api/v2010/account/call/recording_spec.rb +0 -287
  839. data/spec/integration/api/v2010/account/call_spec.rb +0 -660
  840. data/spec/integration/api/v2010/account/conference/participant_spec.rb +0 -768
  841. data/spec/integration/api/v2010/account/conference/recording_spec.rb +0 -234
  842. data/spec/integration/api/v2010/account/conference_spec.rb +0 -458
  843. data/spec/integration/api/v2010/account/connect_app_spec.rb +0 -197
  844. data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +0 -135
  845. data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +0 -220
  846. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +0 -189
  847. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +0 -189
  848. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +0 -189
  849. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +0 -370
  850. data/spec/integration/api/v2010/account/key_spec.rb +0 -176
  851. data/spec/integration/api/v2010/account/message/feedback_spec.rb +0 -49
  852. data/spec/integration/api/v2010/account/message/media_spec.rb +0 -161
  853. data/spec/integration/api/v2010/account/message_spec.rb +0 -507
  854. data/spec/integration/api/v2010/account/new_key_spec.rb +0 -46
  855. data/spec/integration/api/v2010/account/new_signing_key_spec.rb +0 -46
  856. data/spec/integration/api/v2010/account/notification_spec.rb +0 -138
  857. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +0 -185
  858. data/spec/integration/api/v2010/account/queue/member_spec.rb +0 -208
  859. data/spec/integration/api/v2010/account/queue_spec.rb +0 -244
  860. data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +0 -174
  861. data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +0 -165
  862. data/spec/integration/api/v2010/account/recording/transcription_spec.rb +0 -173
  863. data/spec/integration/api/v2010/account/recording_spec.rb +0 -184
  864. data/spec/integration/api/v2010/account/short_code_spec.rb +0 -179
  865. data/spec/integration/api/v2010/account/signing_key_spec.rb +0 -176
  866. data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +0 -252
  867. data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +0 -241
  868. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping_spec.rb +0 -217
  869. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping_spec.rb +0 -217
  870. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping_spec.rb +0 -12
  871. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping_spec.rb +0 -217
  872. data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping_spec.rb +0 -12
  873. data/spec/integration/api/v2010/account/sip/domain/auth_types_spec.rb +0 -12
  874. data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +0 -207
  875. data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +0 -217
  876. data/spec/integration/api/v2010/account/sip/domain_spec.rb +0 -303
  877. data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +0 -254
  878. data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +0 -251
  879. data/spec/integration/api/v2010/account/sip_spec.rb +0 -12
  880. data/spec/integration/api/v2010/account/token_spec.rb +0 -71
  881. data/spec/integration/api/v2010/account/transcription_spec.rb +0 -166
  882. data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +0 -113
  883. data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +0 -113
  884. data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +0 -113
  885. data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +0 -113
  886. data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +0 -113
  887. data/spec/integration/api/v2010/account/usage/record/today_spec.rb +0 -113
  888. data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +0 -113
  889. data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +0 -113
  890. data/spec/integration/api/v2010/account/usage/record_spec.rb +0 -110
  891. data/spec/integration/api/v2010/account/usage/trigger_spec.rb +0 -281
  892. data/spec/integration/api/v2010/account/usage_spec.rb +0 -12
  893. data/spec/integration/api/v2010/account/validation_request_spec.rb +0 -48
  894. data/spec/integration/api/v2010/account_spec.rb +0 -327
  895. data/spec/integration/autopilot/v1/assistant/defaults_spec.rb +0 -79
  896. data/spec/integration/autopilot/v1/assistant/dialogue_spec.rb +0 -46
  897. data/spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb +0 -207
  898. data/spec/integration/autopilot/v1/assistant/field_type_spec.rb +0 -242
  899. data/spec/integration/autopilot/v1/assistant/model_build_spec.rb +0 -236
  900. data/spec/integration/autopilot/v1/assistant/query_spec.rb +0 -290
  901. data/spec/integration/autopilot/v1/assistant/style_sheet_spec.rb +0 -79
  902. data/spec/integration/autopilot/v1/assistant/task/field_spec.rb +0 -204
  903. data/spec/integration/autopilot/v1/assistant/task/sample_spec.rb +0 -249
  904. data/spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb +0 -85
  905. data/spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb +0 -49
  906. data/spec/integration/autopilot/v1/assistant/task_spec.rb +0 -258
  907. data/spec/integration/autopilot/v1/assistant/webhook_spec.rb +0 -242
  908. data/spec/integration/autopilot/v1/assistant_spec.rb +0 -277
  909. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +0 -53
  910. data/spec/integration/bulkexports/v1/export/day_spec.rb +0 -115
  911. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +0 -129
  912. data/spec/integration/bulkexports/v1/export/job_spec.rb +0 -78
  913. data/spec/integration/bulkexports/v1/export_configuration_spec.rb +0 -77
  914. data/spec/integration/bulkexports/v1/export_spec.rb +0 -44
  915. data/spec/integration/chat/v1/credential_spec.rb +0 -219
  916. data/spec/integration/chat/v1/service/channel/invite_spec.rb +0 -207
  917. data/spec/integration/chat/v1/service/channel/member_spec.rb +0 -280
  918. data/spec/integration/chat/v1/service/channel/message_spec.rb +0 -290
  919. data/spec/integration/chat/v1/service/channel_spec.rb +0 -272
  920. data/spec/integration/chat/v1/service/role_spec.rb +0 -260
  921. data/spec/integration/chat/v1/service/user/user_channel_spec.rb +0 -93
  922. data/spec/integration/chat/v1/service/user_spec.rb +0 -262
  923. data/spec/integration/chat/v1/service_spec.rb +0 -295
  924. data/spec/integration/chat/v2/credential_spec.rb +0 -219
  925. data/spec/integration/chat/v2/service/binding_spec.rb +0 -174
  926. data/spec/integration/chat/v2/service/channel/invite_spec.rb +0 -207
  927. data/spec/integration/chat/v2/service/channel/member_spec.rb +0 -263
  928. data/spec/integration/chat/v2/service/channel/message_spec.rb +0 -406
  929. data/spec/integration/chat/v2/service/channel/webhook_spec.rb +0 -303
  930. data/spec/integration/chat/v2/service/channel_spec.rb +0 -282
  931. data/spec/integration/chat/v2/service/role_spec.rb +0 -260
  932. data/spec/integration/chat/v2/service/user/user_binding_spec.rb +0 -177
  933. data/spec/integration/chat/v2/service/user/user_channel_spec.rb +0 -247
  934. data/spec/integration/chat/v2/service/user_spec.rb +0 -270
  935. data/spec/integration/chat/v2/service_spec.rb +0 -350
  936. data/spec/integration/conversations/v1/configuration/webhook_spec.rb +0 -90
  937. data/spec/integration/conversations/v1/configuration_spec.rb +0 -87
  938. data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +0 -136
  939. data/spec/integration/conversations/v1/conversation/message_spec.rb +0 -409
  940. data/spec/integration/conversations/v1/conversation/participant_spec.rb +0 -402
  941. data/spec/integration/conversations/v1/conversation/webhook_spec.rb +0 -282
  942. data/spec/integration/conversations/v1/conversation_spec.rb +0 -278
  943. data/spec/integration/conversations/v1/credential_spec.rb +0 -219
  944. data/spec/integration/conversations/v1/role_spec.rb +0 -249
  945. data/spec/integration/conversations/v1/service/binding_spec.rb +0 -166
  946. data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +0 -115
  947. data/spec/integration/conversations/v1/service/configuration_spec.rb +0 -89
  948. data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +0 -144
  949. data/spec/integration/conversations/v1/service/conversation/message_spec.rb +0 -429
  950. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +0 -427
  951. data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +0 -299
  952. data/spec/integration/conversations/v1/service/conversation_spec.rb +0 -289
  953. data/spec/integration/conversations/v1/service/role_spec.rb +0 -260
  954. data/spec/integration/conversations/v1/service/user_spec.rb +0 -241
  955. data/spec/integration/conversations/v1/service_spec.rb +0 -174
  956. data/spec/integration/conversations/v1/user_spec.rb +0 -231
  957. data/spec/integration/events/v1/event_type_spec.rb +0 -133
  958. data/spec/integration/events/v1/schema/schema_version_spec.rb +0 -126
  959. data/spec/integration/events/v1/schema_spec.rb +0 -46
  960. data/spec/integration/events/v1/sink/sink_test_spec.rb +0 -42
  961. data/spec/integration/events/v1/sink/sink_validate_spec.rb +0 -44
  962. data/spec/integration/events/v1/sink_spec.rb +0 -231
  963. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +0 -91
  964. data/spec/integration/events/v1/subscription_spec.rb +0 -292
  965. data/spec/integration/fax/v1/fax/fax_media_spec.rb +0 -125
  966. data/spec/integration/fax/v1/fax_spec.rb +0 -267
  967. data/spec/integration/flex_api/v1/channel_spec.rb +0 -188
  968. data/spec/integration/flex_api/v1/configuration_spec.rb +0 -554
  969. data/spec/integration/flex_api/v1/flex_flow_spec.rb +0 -259
  970. data/spec/integration/flex_api/v1/web_channel_spec.rb +0 -216
  971. data/spec/integration/insights/v1/call/event_spec.rb +0 -166
  972. data/spec/integration/insights/v1/call/metric_spec.rb +0 -154
  973. data/spec/integration/insights/v1/call/summary_spec.rb +0 -64
  974. data/spec/integration/insights/v1/call_spec.rb +0 -46
  975. data/spec/integration/insights/v1/room/participant_spec.rb +0 -147
  976. data/spec/integration/insights/v1/room_spec.rb +0 -164
  977. data/spec/integration/ip_messaging/v1/credential_spec.rb +0 -219
  978. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +0 -207
  979. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +0 -280
  980. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +0 -290
  981. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +0 -272
  982. data/spec/integration/ip_messaging/v1/service/role_spec.rb +0 -260
  983. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +0 -93
  984. data/spec/integration/ip_messaging/v1/service/user_spec.rb +0 -262
  985. data/spec/integration/ip_messaging/v1/service_spec.rb +0 -295
  986. data/spec/integration/ip_messaging/v2/credential_spec.rb +0 -219
  987. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +0 -174
  988. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +0 -207
  989. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +0 -263
  990. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +0 -406
  991. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +0 -303
  992. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +0 -282
  993. data/spec/integration/ip_messaging/v2/service/role_spec.rb +0 -260
  994. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +0 -177
  995. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +0 -247
  996. data/spec/integration/ip_messaging/v2/service/user_spec.rb +0 -270
  997. data/spec/integration/ip_messaging/v2/service_spec.rb +0 -350
  998. data/spec/integration/lookups/v1/phone_number_spec.rb +0 -336
  999. data/spec/integration/messaging/v1/deactivation_spec.rb +0 -40
  1000. data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +0 -173
  1001. data/spec/integration/messaging/v1/service/phone_number_spec.rb +0 -198
  1002. data/spec/integration/messaging/v1/service/short_code_spec.rb +0 -176
  1003. data/spec/integration/messaging/v1/service_spec.rb +0 -267
  1004. data/spec/integration/monitor/v1/alert_spec.rb +0 -138
  1005. data/spec/integration/monitor/v1/event_spec.rb +0 -148
  1006. data/spec/integration/notify/v1/credential_spec.rb +0 -219
  1007. data/spec/integration/notify/v1/service/binding_spec.rb +0 -222
  1008. data/spec/integration/notify/v1/service/notification_spec.rb +0 -98
  1009. data/spec/integration/notify/v1/service_spec.rb +0 -289
  1010. data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +0 -620
  1011. data/spec/integration/numbers/v2/regulatory_compliance/bundle/item_assignment_spec.rb +0 -195
  1012. data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +0 -258
  1013. data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +0 -238
  1014. data/spec/integration/numbers/v2/regulatory_compliance/end_user_type_spec.rb +0 -141
  1015. data/spec/integration/numbers/v2/regulatory_compliance/regulation_spec.rb +0 -181
  1016. data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +0 -250
  1017. data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_type_spec.rb +0 -131
  1018. data/spec/integration/numbers/v2/regulatory_compliance_spec.rb +0 -12
  1019. data/spec/integration/preview/bulk_exports/export/day_spec.rb +0 -115
  1020. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +0 -129
  1021. data/spec/integration/preview/bulk_exports/export/job_spec.rb +0 -78
  1022. data/spec/integration/preview/bulk_exports/export_configuration_spec.rb +0 -77
  1023. data/spec/integration/preview/bulk_exports/export_spec.rb +0 -44
  1024. data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +0 -234
  1025. data/spec/integration/preview/deployed_devices/fleet/deployment_spec.rb +0 -228
  1026. data/spec/integration/preview/deployed_devices/fleet/device_spec.rb +0 -244
  1027. data/spec/integration/preview/deployed_devices/fleet/key_spec.rb +0 -232
  1028. data/spec/integration/preview/deployed_devices/fleet_spec.rb +0 -241
  1029. data/spec/integration/preview/hosted_numbers/authorization_document/dependent_hosted_number_order_spec.rb +0 -110
  1030. data/spec/integration/preview/hosted_numbers/authorization_document_spec.rb +0 -224
  1031. data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +0 -389
  1032. data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +0 -121
  1033. data/spec/integration/preview/marketplace/available_add_on_spec.rb +0 -142
  1034. data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +0 -162
  1035. data/spec/integration/preview/marketplace/installed_add_on_spec.rb +0 -250
  1036. data/spec/integration/preview/sync/service/document/document_permission_spec.rb +0 -201
  1037. data/spec/integration/preview/sync/service/document_spec.rb +0 -254
  1038. data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +0 -255
  1039. data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +0 -201
  1040. data/spec/integration/preview/sync/service/sync_list_spec.rb +0 -205
  1041. data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +0 -255
  1042. data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +0 -201
  1043. data/spec/integration/preview/sync/service/sync_map_spec.rb +0 -205
  1044. data/spec/integration/preview/sync/service_spec.rb +0 -241
  1045. data/spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb +0 -50
  1046. data/spec/integration/preview/trusted_comms/branded_channel_spec.rb +0 -47
  1047. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +0 -45
  1048. data/spec/integration/preview/trusted_comms/cps_spec.rb +0 -44
  1049. data/spec/integration/preview/trusted_comms/current_call_spec.rb +0 -58
  1050. data/spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb +0 -79
  1051. data/spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb +0 -79
  1052. data/spec/integration/preview/understand/assistant/dialogue_spec.rb +0 -46
  1053. data/spec/integration/preview/understand/assistant/field_type/field_value_spec.rb +0 -207
  1054. data/spec/integration/preview/understand/assistant/field_type_spec.rb +0 -242
  1055. data/spec/integration/preview/understand/assistant/model_build_spec.rb +0 -236
  1056. data/spec/integration/preview/understand/assistant/query_spec.rb +0 -302
  1057. data/spec/integration/preview/understand/assistant/style_sheet_spec.rb +0 -79
  1058. data/spec/integration/preview/understand/assistant/task/field_spec.rb +0 -204
  1059. data/spec/integration/preview/understand/assistant/task/sample_spec.rb +0 -249
  1060. data/spec/integration/preview/understand/assistant/task/task_actions_spec.rb +0 -85
  1061. data/spec/integration/preview/understand/assistant/task/task_statistics_spec.rb +0 -49
  1062. data/spec/integration/preview/understand/assistant/task_spec.rb +0 -258
  1063. data/spec/integration/preview/understand/assistant_spec.rb +0 -269
  1064. data/spec/integration/preview/wireless/command_spec.rb +0 -167
  1065. data/spec/integration/preview/wireless/rate_plan_spec.rb +0 -257
  1066. data/spec/integration/preview/wireless/sim/usage_spec.rb +0 -50
  1067. data/spec/integration/preview/wireless/sim_spec.rb +0 -207
  1068. data/spec/integration/pricing/v1/messaging/country_spec.rb +0 -137
  1069. data/spec/integration/pricing/v1/messaging_spec.rb +0 -12
  1070. data/spec/integration/pricing/v1/phone_number/country_spec.rb +0 -128
  1071. data/spec/integration/pricing/v1/phone_number_spec.rb +0 -12
  1072. data/spec/integration/pricing/v1/voice/country_spec.rb +0 -138
  1073. data/spec/integration/pricing/v1/voice/number_spec.rb +0 -55
  1074. data/spec/integration/pricing/v1/voice_spec.rb +0 -12
  1075. data/spec/integration/pricing/v2/voice/country_spec.rb +0 -179
  1076. data/spec/integration/pricing/v2/voice/number_spec.rb +0 -61
  1077. data/spec/integration/pricing/v2/voice_spec.rb +0 -12
  1078. data/spec/integration/proxy/v1/service/phone_number_spec.rb +0 -231
  1079. data/spec/integration/proxy/v1/service/session/interaction_spec.rb +0 -133
  1080. data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +0 -163
  1081. data/spec/integration/proxy/v1/service/session/participant_spec.rb +0 -240
  1082. data/spec/integration/proxy/v1/service/session_spec.rb +0 -225
  1083. data/spec/integration/proxy/v1/service/short_code_spec.rb +0 -225
  1084. data/spec/integration/proxy/v1/service_spec.rb +0 -214
  1085. data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +0 -93
  1086. data/spec/integration/serverless/v1/service/asset_spec.rb +0 -202
  1087. data/spec/integration/serverless/v1/service/build/build_status_spec.rb +0 -48
  1088. data/spec/integration/serverless/v1/service/build_spec.rb +0 -214
  1089. data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +0 -133
  1090. data/spec/integration/serverless/v1/service/environment/log_spec.rb +0 -97
  1091. data/spec/integration/serverless/v1/service/environment/variable_spec.rb +0 -207
  1092. data/spec/integration/serverless/v1/service/environment_spec.rb +0 -170
  1093. data/spec/integration/serverless/v1/service/function/function_version/function_version_content_spec.rb +0 -51
  1094. data/spec/integration/serverless/v1/service/function/function_version_spec.rb +0 -96
  1095. data/spec/integration/serverless/v1/service/function_spec.rb +0 -202
  1096. data/spec/integration/serverless/v1/service_spec.rb +0 -205
  1097. data/spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb +0 -50
  1098. data/spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb +0 -53
  1099. data/spec/integration/studio/v1/flow/engagement/step_spec.rb +0 -99
  1100. data/spec/integration/studio/v1/flow/engagement_spec.rb +0 -168
  1101. data/spec/integration/studio/v1/flow/execution/execution_context_spec.rb +0 -50
  1102. data/spec/integration/studio/v1/flow/execution/execution_step/execution_step_context_spec.rb +0 -53
  1103. data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +0 -100
  1104. data/spec/integration/studio/v1/flow/execution_spec.rb +0 -214
  1105. data/spec/integration/studio/v1/flow_spec.rb +0 -114
  1106. data/spec/integration/studio/v2/flow/execution/execution_context_spec.rb +0 -50
  1107. data/spec/integration/studio/v2/flow/execution/execution_step/execution_step_context_spec.rb +0 -53
  1108. data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +0 -100
  1109. data/spec/integration/studio/v2/flow/execution_spec.rb +0 -211
  1110. data/spec/integration/studio/v2/flow/flow_revision_spec.rb +0 -110
  1111. data/spec/integration/studio/v2/flow/test_user_spec.rb +0 -85
  1112. data/spec/integration/studio/v2/flow_spec.rb +0 -251
  1113. data/spec/integration/studio/v2/flow_validate_spec.rb +0 -46
  1114. data/spec/integration/supersim/v1/command_spec.rb +0 -184
  1115. data/spec/integration/supersim/v1/fleet_spec.rb +0 -214
  1116. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +0 -176
  1117. data/spec/integration/supersim/v1/network_access_profile_spec.rb +0 -219
  1118. data/spec/integration/supersim/v1/network_spec.rb +0 -137
  1119. data/spec/integration/supersim/v1/sim_spec.rb +0 -323
  1120. data/spec/integration/supersim/v1/usage_record_spec.rb +0 -647
  1121. data/spec/integration/sync/v1/service/document/document_permission_spec.rb +0 -201
  1122. data/spec/integration/sync/v1/service/document_spec.rb +0 -256
  1123. data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +0 -257
  1124. data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +0 -201
  1125. data/spec/integration/sync/v1/service/sync_list_spec.rb +0 -252
  1126. data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +0 -257
  1127. data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +0 -201
  1128. data/spec/integration/sync/v1/service/sync_map_spec.rb +0 -252
  1129. data/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +0 -47
  1130. data/spec/integration/sync/v1/service/sync_stream_spec.rb +0 -244
  1131. data/spec/integration/sync/v1/service_spec.rb +0 -261
  1132. data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +0 -232
  1133. data/spec/integration/taskrouter/v1/workspace/event_spec.rb +0 -163
  1134. data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +0 -222
  1135. data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +0 -312
  1136. data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +0 -101
  1137. data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +0 -83
  1138. data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +0 -107
  1139. data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +0 -145
  1140. data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +0 -290
  1141. data/spec/integration/taskrouter/v1/workspace/task_spec.rb +0 -325
  1142. data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +0 -191
  1143. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +0 -185
  1144. data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +0 -91
  1145. data/spec/integration/taskrouter/v1/workspace/worker/workers_cumulative_statistics_spec.rb +0 -88
  1146. data/spec/integration/taskrouter/v1/workspace/worker/workers_real_time_statistics_spec.rb +0 -69
  1147. data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +0 -115
  1148. data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +0 -290
  1149. data/spec/integration/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics_spec.rb +0 -96
  1150. data/spec/integration/taskrouter/v1/workspace/workflow/workflow_real_time_statistics_spec.rb +0 -57
  1151. data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +0 -70
  1152. data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +0 -266
  1153. data/spec/integration/taskrouter/v1/workspace/workspace_cumulative_statistics_spec.rb +0 -93
  1154. data/spec/integration/taskrouter/v1/workspace/workspace_real_time_statistics_spec.rb +0 -72
  1155. data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +0 -104
  1156. data/spec/integration/taskrouter/v1/workspace_spec.rb +0 -291
  1157. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +0 -189
  1158. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +0 -189
  1159. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +0 -248
  1160. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +0 -264
  1161. data/spec/integration/trunking/v1/trunk/recording_spec.rb +0 -75
  1162. data/spec/integration/trunking/v1/trunk_spec.rb +0 -281
  1163. data/spec/integration/verify/v2/form_spec.rb +0 -47
  1164. data/spec/integration/verify/v2/service/access_token_spec.rb +0 -44
  1165. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +0 -288
  1166. data/spec/integration/verify/v2/service/entity/factor_spec.rb +0 -277
  1167. data/spec/integration/verify/v2/service/entity_spec.rb +0 -201
  1168. data/spec/integration/verify/v2/service/messaging_configuration_spec.rb +0 -228
  1169. data/spec/integration/verify/v2/service/rate_limit/bucket_spec.rb +0 -245
  1170. data/spec/integration/verify/v2/service/rate_limit_spec.rb +0 -217
  1171. data/spec/integration/verify/v2/service/verification_check_spec.rb +0 -80
  1172. data/spec/integration/verify/v2/service/verification_spec.rb +0 -318
  1173. data/spec/integration/verify/v2/service/webhook_spec.rb +0 -258
  1174. data/spec/integration/verify/v2/service_spec.rb +0 -279
  1175. data/spec/integration/video/v1/composition_hook_spec.rb +0 -407
  1176. data/spec/integration/video/v1/composition_settings_spec.rb +0 -85
  1177. data/spec/integration/video/v1/composition_spec.rb +0 -347
  1178. data/spec/integration/video/v1/recording_settings_spec.rb +0 -85
  1179. data/spec/integration/video/v1/recording_spec.rb +0 -176
  1180. data/spec/integration/video/v1/room/recording_spec.rb +0 -185
  1181. data/spec/integration/video/v1/room/room_participant/room_participant_published_track_spec.rb +0 -94
  1182. data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +0 -103
  1183. data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +0 -95
  1184. data/spec/integration/video/v1/room/room_participant_spec.rb +0 -187
  1185. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +0 -89
  1186. data/spec/integration/video/v1/room_spec.rb +0 -301
  1187. data/spec/integration/voice/v1/byoc_trunk_spec.rb +0 -245
  1188. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +0 -242
  1189. data/spec/integration/voice/v1/connection_policy_spec.rb +0 -221
  1190. data/spec/integration/voice/v1/dialing_permissions/bulk_country_update_spec.rb +0 -45
  1191. data/spec/integration/voice/v1/dialing_permissions/country/highrisk_special_prefix_spec.rb +0 -60
  1192. data/spec/integration/voice/v1/dialing_permissions/country_spec.rb +0 -110
  1193. data/spec/integration/voice/v1/dialing_permissions/settings_spec.rb +0 -75
  1194. data/spec/integration/voice/v1/dialing_permissions_spec.rb +0 -12
  1195. data/spec/integration/voice/v1/ip_record_spec.rb +0 -219
  1196. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +0 -216
  1197. data/spec/integration/wireless/v1/command_spec.rb +0 -286
  1198. data/spec/integration/wireless/v1/rate_plan_spec.rb +0 -277
  1199. data/spec/integration/wireless/v1/sim/data_session_spec.rb +0 -88
  1200. data/spec/integration/wireless/v1/sim/usage_record_spec.rb +0 -114
  1201. data/spec/integration/wireless/v1/sim_spec.rb +0 -325
  1202. data/spec/integration/wireless/v1/usage_record_spec.rb +0 -110
  1203. data/spec/jwt/access_token_spec.rb +0 -159
  1204. data/spec/jwt/client_capability_spec.rb +0 -104
  1205. data/spec/jwt/task_router_spec.rb +0 -172
  1206. data/spec/rack/twilio_webhook_authentication_spec.rb +0 -106
  1207. data/spec/rest/client_spec.rb +0 -255
  1208. data/spec/security/request_validator_spec.rb +0 -125
  1209. data/spec/spec_helper.rb +0 -38
  1210. data/spec/support/fakeweb.rb +0 -2
  1211. data/spec/twilio_spec.rb +0 -17
  1212. data/spec/twiml/messaging_response_spec.rb +0 -235
  1213. data/spec/twiml/voice_response_spec.rb +0 -847
  1214. data/spec/util/configuration_spec.rb +0 -33
  1215. data/spec/util/url_encode_spec.rb +0 -12
  1216. /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
  1217. /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
@@ -1,903 +1,1268 @@
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 - Api
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 Api < Domain
12
- class V2010 < Version
13
- class AccountContext < InstanceContext
14
- class IncomingPhoneNumberList < ListResource
15
- ##
16
- # Initialize the IncomingPhoneNumberList
17
- # @param [Version] version Version that contains the resource
18
- # @param [String] account_sid The SID of the
19
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this
20
- # IncomingPhoneNumber resource.
21
- # @return [IncomingPhoneNumberList] IncomingPhoneNumberList
22
- def initialize(version, account_sid: nil)
23
- super(version)
24
-
25
- # Path Solution
26
- @solution = {account_sid: account_sid}
27
- @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers.json"
28
-
29
- # Components
30
- @local = nil
31
- @mobile = nil
32
- @toll_free = nil
33
- end
34
-
35
- ##
36
- # Lists IncomingPhoneNumberInstance records from the API as a list.
37
- # Unlike stream(), this operation is eager and will load `limit` records into
38
- # memory before returning.
39
- # @param [Boolean] beta Whether to include phone numbers new to the Twilio
40
- # platform. Can be: `true` or `false` and the default is `true`.
41
- # @param [String] friendly_name A string that identifies the IncomingPhoneNumber
42
- # resources to read.
43
- # @param [String] phone_number The phone numbers of the IncomingPhoneNumber
44
- # resources to read. You can specify partial numbers and use '*' as a wildcard for
45
- # any digit.
46
- # @param [String] origin Whether to include phone numbers based on their origin.
47
- # Can be: `twilio` or `hosted`. By default, phone numbers of all origin are
48
- # included.
49
- # @param [Integer] limit Upper limit for the number of records to return. stream()
50
- # guarantees to never return more than limit. Default is no limit
51
- # @param [Integer] page_size Number of records to fetch per request, when
52
- # not set will use the default value of 50 records. If no page_size is defined
53
- # but a limit is defined, stream() will attempt to read the limit with the most
54
- # efficient page size, i.e. min(limit, 1000)
55
- # @return [Array] Array of up to limit results
56
- def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
57
- self.stream(
58
- beta: beta,
59
- friendly_name: friendly_name,
60
- phone_number: phone_number,
61
- origin: origin,
62
- limit: limit,
63
- page_size: page_size
64
- ).entries
65
- end
66
-
67
- ##
68
- # Streams IncomingPhoneNumberInstance records from the API as an Enumerable.
69
- # This operation lazily loads records as efficiently as possible until the limit
70
- # is reached.
71
- # @param [Boolean] beta Whether to include phone numbers new to the Twilio
72
- # platform. Can be: `true` or `false` and the default is `true`.
73
- # @param [String] friendly_name A string that identifies the IncomingPhoneNumber
74
- # resources to read.
75
- # @param [String] phone_number The phone numbers of the IncomingPhoneNumber
76
- # resources to read. You can specify partial numbers and use '*' as a wildcard for
77
- # any digit.
78
- # @param [String] origin Whether to include phone numbers based on their origin.
79
- # Can be: `twilio` or `hosted`. By default, phone numbers of all origin are
80
- # included.
81
- # @param [Integer] limit Upper limit for the number of records to return. stream()
82
- # guarantees to never return more than limit. Default is no limit.
83
- # @param [Integer] page_size Number of records to fetch per request, when
84
- # not set will use the default value of 50 records. If no page_size is defined
85
- # but a limit is defined, stream() will attempt to read the limit with the most
86
- # efficient page size, i.e. min(limit, 1000)
87
- # @return [Enumerable] Enumerable that will yield up to limit results
88
- def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
89
- limits = @version.read_limits(limit, page_size)
90
-
91
- page = self.page(
92
- beta: beta,
93
- friendly_name: friendly_name,
94
- phone_number: phone_number,
95
- origin: origin,
96
- page_size: limits[:page_size],
97
- )
98
-
99
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
100
- end
101
-
102
- ##
103
- # When passed a block, yields IncomingPhoneNumberInstance records from the API.
104
- # This operation lazily loads records as efficiently as possible until the limit
105
- # is reached.
106
- def each
107
- limits = @version.read_limits
108
-
109
- page = self.page(page_size: limits[:page_size], )
110
-
111
- @version.stream(page,
112
- limit: limits[:limit],
113
- page_limit: limits[:page_limit]).each {|x| yield x}
114
- end
115
-
116
- ##
117
- # Retrieve a single page of IncomingPhoneNumberInstance records from the API.
118
- # Request is executed immediately.
119
- # @param [Boolean] beta Whether to include phone numbers new to the Twilio
120
- # platform. Can be: `true` or `false` and the default is `true`.
121
- # @param [String] friendly_name A string that identifies the IncomingPhoneNumber
122
- # resources to read.
123
- # @param [String] phone_number The phone numbers of the IncomingPhoneNumber
124
- # resources to read. You can specify partial numbers and use '*' as a wildcard for
125
- # any digit.
126
- # @param [String] origin Whether to include phone numbers based on their origin.
127
- # Can be: `twilio` or `hosted`. By default, phone numbers of all origin are
128
- # included.
129
- # @param [String] page_token PageToken provided by the API
130
- # @param [Integer] page_number Page Number, this value is simply for client state
131
- # @param [Integer] page_size Number of records to return, defaults to 50
132
- # @return [Page] Page of IncomingPhoneNumberInstance
133
- def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
134
- params = Twilio::Values.of({
135
- 'Beta' => beta,
136
- 'FriendlyName' => friendly_name,
137
- 'PhoneNumber' => phone_number,
138
- 'Origin' => origin,
139
- 'PageToken' => page_token,
140
- 'Page' => page_number,
141
- 'PageSize' => page_size,
142
- })
143
-
144
- response = @version.page('GET', @uri, params: params)
145
-
146
- IncomingPhoneNumberPage.new(@version, response, @solution)
147
- end
148
-
149
- ##
150
- # Retrieve a single page of IncomingPhoneNumberInstance records from the API.
151
- # Request is executed immediately.
152
- # @param [String] target_url API-generated URL for the requested results page
153
- # @return [Page] Page of IncomingPhoneNumberInstance
154
- def get_page(target_url)
155
- response = @version.domain.request(
156
- 'GET',
157
- target_url
158
- )
159
- IncomingPhoneNumberPage.new(@version, response, @solution)
160
- end
161
-
162
- ##
163
- # Create the IncomingPhoneNumberInstance
164
- # @param [String] api_version The API version to use for incoming calls made to
165
- # the new phone number. The default is `2010-04-01`.
166
- # @param [String] friendly_name A descriptive string that you created to describe
167
- # the new phone number. It can be up to 64 characters long. By default, this is a
168
- # formatted version of the new phone number.
169
- # @param [String] sms_application_sid The SID of the application that should
170
- # handle SMS messages sent to the new phone number. If an `sms_application_sid` is
171
- # present, we ignore all of the `sms_*_url` urls and use those set on the
172
- # application.
173
- # @param [String] sms_fallback_method The HTTP method that we should use to call
174
- # `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
175
- # @param [String] sms_fallback_url The URL that we should call when an error
176
- # occurs while requesting or executing the TwiML defined by `sms_url`.
177
- # @param [String] sms_method The HTTP method that we should use to call `sms_url`.
178
- # Can be: `GET` or `POST` and defaults to `POST`.
179
- # @param [String] sms_url The URL we should call when the new phone number
180
- # receives an incoming SMS message.
181
- # @param [String] status_callback The URL we should call using the
182
- # `status_callback_method` to send status information to your application.
183
- # @param [String] status_callback_method The HTTP method we should use to call
184
- # `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
185
- # @param [String] voice_application_sid The SID of the application we should use
186
- # to handle calls to the new phone number. If a `voice_application_sid` is
187
- # present, we ignore all of the voice urls and use only those set on the
188
- # application. Setting a `voice_application_sid` will automatically delete your
189
- # `trunk_sid` and vice versa.
190
- # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
191
- # the CNAM database and post it to your app. Can be: `true` or `false` and
192
- # defaults to `false`.
193
- # @param [String] voice_fallback_method The HTTP method that we should use to call
194
- # `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
195
- # @param [String] voice_fallback_url The URL that we should call when an error
196
- # occurs retrieving or executing the TwiML requested by `url`.
197
- # @param [String] voice_method The HTTP method that we should use to call
198
- # `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
199
- # @param [String] voice_url The URL that we should call to answer a call to the
200
- # new phone number. The `voice_url` will not be called if a
201
- # `voice_application_sid` or a `trunk_sid` is set.
202
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
203
- # configuration status parameter that determines whether the new phone number is
204
- # enabled for emergency calling.
205
- # @param [String] emergency_address_sid The SID of the emergency address
206
- # configuration to use for emergency calling from the new phone number.
207
- # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
208
- # the new phone number. If a `trunk_sid` is present, we ignore all of the voice
209
- # urls and voice applications and use only those set on the Trunk. Setting a
210
- # `trunk_sid` will automatically delete your `voice_application_sid` and vice
211
- # versa.
212
- # @param [String] identity_sid The SID of the Identity resource that we should
213
- # associate with the new phone number. Some regions require an identity to meet
214
- # local regulations.
215
- # @param [String] address_sid The SID of the Address resource we should associate
216
- # with the new phone number. Some regions require addresses to meet local
217
- # regulations.
218
- # @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
219
- # configuration parameter for the new phone number to receive incoming voice calls
220
- # or faxes. Can be: `fax` or `voice` and defaults to `voice`.
221
- # @param [String] bundle_sid The SID of the Bundle resource that you associate
222
- # with the phone number. Some regions require a Bundle to meet local Regulations.
223
- # @param [String] phone_number The phone number to purchase specified in
224
- # {E.164}[https://www.twilio.com/docs/glossary/what-e164] format. E.164 phone
225
- # numbers consist of a + followed by the country code and subscriber number
226
- # without punctuation characters. For example, +14155551234.
227
- # @param [String] area_code The desired area code for your new incoming phone
228
- # number. Can be any three-digit, US or Canada area code. We will provision an
229
- # available phone number within this area code for you. **You must provide an
230
- # `area_code` or a `phone_number`.** (US and Canada only).
231
- # @return [IncomingPhoneNumberInstance] Created IncomingPhoneNumberInstance
232
- def create(api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, identity_sid: :unset, address_sid: :unset, voice_receive_mode: :unset, bundle_sid: :unset, phone_number: :unset, area_code: :unset)
233
- data = Twilio::Values.of({
234
- 'PhoneNumber' => phone_number,
235
- 'AreaCode' => area_code,
236
- 'ApiVersion' => api_version,
237
- 'FriendlyName' => friendly_name,
238
- 'SmsApplicationSid' => sms_application_sid,
239
- 'SmsFallbackMethod' => sms_fallback_method,
240
- 'SmsFallbackUrl' => sms_fallback_url,
241
- 'SmsMethod' => sms_method,
242
- 'SmsUrl' => sms_url,
243
- 'StatusCallback' => status_callback,
244
- 'StatusCallbackMethod' => status_callback_method,
245
- 'VoiceApplicationSid' => voice_application_sid,
246
- 'VoiceCallerIdLookup' => voice_caller_id_lookup,
247
- 'VoiceFallbackMethod' => voice_fallback_method,
248
- 'VoiceFallbackUrl' => voice_fallback_url,
249
- 'VoiceMethod' => voice_method,
250
- 'VoiceUrl' => voice_url,
251
- 'EmergencyStatus' => emergency_status,
252
- 'EmergencyAddressSid' => emergency_address_sid,
253
- 'TrunkSid' => trunk_sid,
254
- 'IdentitySid' => identity_sid,
255
- 'AddressSid' => address_sid,
256
- 'VoiceReceiveMode' => voice_receive_mode,
257
- 'BundleSid' => bundle_sid,
258
- })
259
-
260
- payload = @version.create('POST', @uri, data: data)
261
-
262
- IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid], )
263
- end
264
-
265
- ##
266
- # Access the local
267
- # @return [LocalList]
268
- # @return [LocalContext]
269
- def local
270
- @local ||= LocalList.new(@version, account_sid: @solution[:account_sid], )
271
- end
272
-
273
- ##
274
- # Access the mobile
275
- # @return [MobileList]
276
- # @return [MobileContext]
277
- def mobile
278
- @mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid], )
279
- end
280
-
281
- ##
282
- # Access the toll_free
283
- # @return [TollFreeList]
284
- # @return [TollFreeContext]
285
- def toll_free
286
- @toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid], )
287
- end
288
-
289
- ##
290
- # Provide a user friendly representation
291
- def to_s
292
- '#<Twilio.Api.V2010.IncomingPhoneNumberList>'
293
- end
294
- end
295
-
296
- class IncomingPhoneNumberPage < Page
297
- ##
298
- # Initialize the IncomingPhoneNumberPage
299
- # @param [Version] version Version that contains the resource
300
- # @param [Response] response Response from the API
301
- # @param [Hash] solution Path solution for the resource
302
- # @return [IncomingPhoneNumberPage] IncomingPhoneNumberPage
303
- def initialize(version, response, solution)
304
- super(version, response)
305
-
306
- # Path Solution
307
- @solution = solution
308
- end
309
-
310
- ##
311
- # Build an instance of IncomingPhoneNumberInstance
312
- # @param [Hash] payload Payload response from the API
313
- # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
314
- def get_instance(payload)
315
- IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid], )
316
- end
317
-
318
- ##
319
- # Provide a user friendly representation
320
- def to_s
321
- '<Twilio.Api.V2010.IncomingPhoneNumberPage>'
322
- end
323
- end
324
-
325
- class IncomingPhoneNumberContext < InstanceContext
326
- ##
327
- # Initialize the IncomingPhoneNumberContext
328
- # @param [Version] version Version that contains the resource
329
- # @param [String] account_sid The SID of the
330
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created the
331
- # IncomingPhoneNumber resource to fetch.
332
- # @param [String] sid The Twilio-provided string that uniquely identifies the
333
- # IncomingPhoneNumber resource to fetch.
334
- # @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext
335
- def initialize(version, account_sid, sid)
336
- super(version)
337
-
338
- # Path Solution
339
- @solution = {account_sid: account_sid, sid: sid, }
340
- @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:sid]}.json"
341
-
342
- # Dependents
343
- @assigned_add_ons = nil
344
- end
345
-
346
- ##
347
- # Update the IncomingPhoneNumberInstance
348
- # @param [String] account_sid The SID of the
349
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created the
350
- # IncomingPhoneNumber resource to update. For more information, see {Exchanging
351
- # Numbers Between
352
- # Subaccounts}[https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers].
353
- # @param [String] api_version The API version to use for incoming calls made to
354
- # the phone number. The default is `2010-04-01`.
355
- # @param [String] friendly_name A descriptive string that you created to describe
356
- # this phone number. It can be up to 64 characters long. By default, this is a
357
- # formatted version of the phone number.
358
- # @param [String] sms_application_sid The SID of the application that should
359
- # handle SMS messages sent to the number. If an `sms_application_sid` is present,
360
- # we ignore all of the `sms_*_url` urls and use those set on the application.
361
- # @param [String] sms_fallback_method The HTTP method that we should use to call
362
- # `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
363
- # @param [String] sms_fallback_url The URL that we should call when an error
364
- # occurs while requesting or executing the TwiML defined by `sms_url`.
365
- # @param [String] sms_method The HTTP method that we should use to call `sms_url`.
366
- # Can be: `GET` or `POST` and defaults to `POST`.
367
- # @param [String] sms_url The URL we should call when the phone number receives an
368
- # incoming SMS message.
369
- # @param [String] status_callback The URL we should call using the
370
- # `status_callback_method` to send status information to your application.
371
- # @param [String] status_callback_method The HTTP method we should use to call
372
- # `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
373
- # @param [String] voice_application_sid The SID of the application we should use
374
- # to handle phone calls to the phone number. If a `voice_application_sid` is
375
- # present, we ignore all of the voice urls and use only those set on the
376
- # application. Setting a `voice_application_sid` will automatically delete your
377
- # `trunk_sid` and vice versa.
378
- # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
379
- # the CNAM database and post it to your app. Can be: `true` or `false` and
380
- # defaults to `false`.
381
- # @param [String] voice_fallback_method The HTTP method that we should use to call
382
- # `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
383
- # @param [String] voice_fallback_url The URL that we should call when an error
384
- # occurs retrieving or executing the TwiML requested by `url`.
385
- # @param [String] voice_method The HTTP method that we should use to call
386
- # `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
387
- # @param [String] voice_url The URL that we should call to answer a call to the
388
- # phone number. The `voice_url` will not be called if a `voice_application_sid` or
389
- # a `trunk_sid` is set.
390
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
391
- # configuration status parameter that determines whether the phone number is
392
- # enabled for emergency calling.
393
- # @param [String] emergency_address_sid The SID of the emergency address
394
- # configuration to use for emergency calling from this phone number.
395
- # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
396
- # calls to the phone number. If a `trunk_sid` is present, we ignore all of the
397
- # voice urls and voice applications and use only those set on the Trunk. Setting a
398
- # `trunk_sid` will automatically delete your `voice_application_sid` and vice
399
- # versa.
400
- # @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
401
- # configuration parameter for the phone number to receive incoming voice calls or
402
- # faxes. Can be: `fax` or `voice` and defaults to `voice`.
403
- # @param [String] identity_sid The SID of the Identity resource that we should
404
- # associate with the phone number. Some regions require an identity to meet local
405
- # regulations.
406
- # @param [String] address_sid The SID of the Address resource we should associate
407
- # with the phone number. Some regions require addresses to meet local regulations.
408
- # @param [String] bundle_sid The SID of the Bundle resource that you associate
409
- # with the phone number. Some regions require a Bundle to meet local Regulations.
410
- # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
411
- def update(account_sid: :unset, api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, voice_receive_mode: :unset, identity_sid: :unset, address_sid: :unset, bundle_sid: :unset)
412
- data = Twilio::Values.of({
413
- 'AccountSid' => account_sid,
414
- 'ApiVersion' => api_version,
415
- 'FriendlyName' => friendly_name,
416
- 'SmsApplicationSid' => sms_application_sid,
417
- 'SmsFallbackMethod' => sms_fallback_method,
418
- 'SmsFallbackUrl' => sms_fallback_url,
419
- 'SmsMethod' => sms_method,
420
- 'SmsUrl' => sms_url,
421
- 'StatusCallback' => status_callback,
422
- 'StatusCallbackMethod' => status_callback_method,
423
- 'VoiceApplicationSid' => voice_application_sid,
424
- 'VoiceCallerIdLookup' => voice_caller_id_lookup,
425
- 'VoiceFallbackMethod' => voice_fallback_method,
426
- 'VoiceFallbackUrl' => voice_fallback_url,
427
- 'VoiceMethod' => voice_method,
428
- 'VoiceUrl' => voice_url,
429
- 'EmergencyStatus' => emergency_status,
430
- 'EmergencyAddressSid' => emergency_address_sid,
431
- 'TrunkSid' => trunk_sid,
432
- 'VoiceReceiveMode' => voice_receive_mode,
433
- 'IdentitySid' => identity_sid,
434
- 'AddressSid' => address_sid,
435
- 'BundleSid' => bundle_sid,
436
- })
437
-
438
- payload = @version.update('POST', @uri, data: data)
439
-
440
- IncomingPhoneNumberInstance.new(
441
- @version,
442
- payload,
443
- account_sid: @solution[:account_sid],
444
- sid: @solution[:sid],
445
- )
446
- end
447
-
448
- ##
449
- # Fetch the IncomingPhoneNumberInstance
450
- # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
451
- def fetch
452
- payload = @version.fetch('GET', @uri)
453
-
454
- IncomingPhoneNumberInstance.new(
455
- @version,
456
- payload,
457
- account_sid: @solution[:account_sid],
458
- sid: @solution[:sid],
459
- )
460
- end
461
-
462
- ##
463
- # Delete the IncomingPhoneNumberInstance
464
- # @return [Boolean] true if delete succeeds, false otherwise
465
- def delete
466
- @version.delete('DELETE', @uri)
467
- end
468
-
469
- ##
470
- # Access the assigned_add_ons
471
- # @return [AssignedAddOnList]
472
- # @return [AssignedAddOnContext] if sid was passed.
473
- def assigned_add_ons(sid=:unset)
474
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
475
-
476
- if sid != :unset
477
- return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
478
- end
479
-
480
- unless @assigned_add_ons
481
- @assigned_add_ons = AssignedAddOnList.new(
482
- @version,
483
- account_sid: @solution[:account_sid],
484
- resource_sid: @solution[:sid],
485
- )
486
- end
487
-
488
- @assigned_add_ons
489
- end
490
-
491
- ##
492
- # Provide a user friendly representation
493
- def to_s
494
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
495
- "#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
496
- end
497
-
498
- ##
499
- # Provide a detailed, user friendly representation
500
- def inspect
501
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
502
- "#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
503
- end
504
- end
505
-
506
- class IncomingPhoneNumberInstance < InstanceResource
507
- ##
508
- # Initialize the IncomingPhoneNumberInstance
509
- # @param [Version] version Version that contains the resource
510
- # @param [Hash] payload payload that contains response from Twilio
511
- # @param [String] account_sid The SID of the
512
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this
513
- # IncomingPhoneNumber resource.
514
- # @param [String] sid The Twilio-provided string that uniquely identifies the
515
- # IncomingPhoneNumber resource to fetch.
516
- # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
517
- def initialize(version, payload, account_sid: nil, sid: nil)
518
- super(version)
519
-
520
- # Marshaled Properties
521
- @properties = {
522
- 'account_sid' => payload['account_sid'],
523
- 'address_sid' => payload['address_sid'],
524
- 'address_requirements' => payload['address_requirements'],
525
- 'api_version' => payload['api_version'],
526
- 'beta' => payload['beta'],
527
- 'capabilities' => payload['capabilities'],
528
- 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
529
- 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
530
- 'friendly_name' => payload['friendly_name'],
531
- 'identity_sid' => payload['identity_sid'],
532
- 'phone_number' => payload['phone_number'],
533
- 'origin' => payload['origin'],
534
- 'sid' => payload['sid'],
535
- 'sms_application_sid' => payload['sms_application_sid'],
536
- 'sms_fallback_method' => payload['sms_fallback_method'],
537
- 'sms_fallback_url' => payload['sms_fallback_url'],
538
- 'sms_method' => payload['sms_method'],
539
- 'sms_url' => payload['sms_url'],
540
- 'status_callback' => payload['status_callback'],
541
- 'status_callback_method' => payload['status_callback_method'],
542
- 'trunk_sid' => payload['trunk_sid'],
543
- 'uri' => payload['uri'],
544
- 'voice_receive_mode' => payload['voice_receive_mode'],
545
- 'voice_application_sid' => payload['voice_application_sid'],
546
- 'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
547
- 'voice_fallback_method' => payload['voice_fallback_method'],
548
- 'voice_fallback_url' => payload['voice_fallback_url'],
549
- 'voice_method' => payload['voice_method'],
550
- 'voice_url' => payload['voice_url'],
551
- 'emergency_status' => payload['emergency_status'],
552
- 'emergency_address_sid' => payload['emergency_address_sid'],
553
- 'bundle_sid' => payload['bundle_sid'],
554
- 'status' => payload['status'],
555
- }
556
-
557
- # Context
558
- @instance_context = nil
559
- @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
560
- end
561
-
562
- ##
563
- # Generate an instance context for the instance, the context is capable of
564
- # performing various actions. All instance actions are proxied to the context
565
- # @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext for this IncomingPhoneNumberInstance
566
- def context
567
- unless @instance_context
568
- @instance_context = IncomingPhoneNumberContext.new(@version, @params['account_sid'], @params['sid'], )
569
- end
570
- @instance_context
571
- end
572
-
573
- ##
574
- # @return [String] The SID of the Account that created the resource
575
- def account_sid
576
- @properties['account_sid']
577
- end
578
-
579
- ##
580
- # @return [String] The SID of the Address resource associated with the phone number
581
- def address_sid
582
- @properties['address_sid']
583
- end
584
-
585
- ##
586
- # @return [incoming_phone_number.AddressRequirement] Whether the phone number requires an Address registered with Twilio.
587
- def address_requirements
588
- @properties['address_requirements']
589
- end
590
-
591
- ##
592
- # @return [String] The API version used to start a new TwiML session
593
- def api_version
594
- @properties['api_version']
595
- end
596
-
597
- ##
598
- # @return [Boolean] Whether the phone number is new to the Twilio platform
599
- def beta
600
- @properties['beta']
601
- end
602
-
603
- ##
604
- # @return [String] Indicate if a phone can receive calls or messages
605
- def capabilities
606
- @properties['capabilities']
607
- end
608
-
609
- ##
610
- # @return [Time] The RFC 2822 date and time in GMT that the resource was created
611
- def date_created
612
- @properties['date_created']
613
- end
614
-
615
- ##
616
- # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
617
- def date_updated
618
- @properties['date_updated']
619
- end
620
-
621
- ##
622
- # @return [String] The string that you assigned to describe the resource
623
- def friendly_name
624
- @properties['friendly_name']
625
- end
626
-
627
- ##
628
- # @return [String] The SID of the Identity resource associated with number
629
- def identity_sid
630
- @properties['identity_sid']
631
- end
632
-
633
- ##
634
- # @return [String] The phone number in E.164 format
635
- def phone_number
636
- @properties['phone_number']
637
- end
638
-
639
- ##
640
- # @return [String] The phone number's origin. Can be twilio or hosted.
641
- def origin
642
- @properties['origin']
643
- end
644
-
645
- ##
646
- # @return [String] The unique string that identifies the resource
647
- def sid
648
- @properties['sid']
649
- end
650
-
651
- ##
652
- # @return [String] The SID of the application that handles SMS messages sent to the phone number
653
- def sms_application_sid
654
- @properties['sms_application_sid']
655
- end
656
-
657
- ##
658
- # @return [String] The HTTP method used with sms_fallback_url
659
- def sms_fallback_method
660
- @properties['sms_fallback_method']
661
- end
662
-
663
- ##
664
- # @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML
665
- def sms_fallback_url
666
- @properties['sms_fallback_url']
667
- end
668
-
669
- ##
670
- # @return [String] The HTTP method to use with sms_url
671
- def sms_method
672
- @properties['sms_method']
673
- end
674
-
675
- ##
676
- # @return [String] The URL we call when the phone number receives an incoming SMS message
677
- def sms_url
678
- @properties['sms_url']
679
- end
680
-
681
- ##
682
- # @return [String] The URL to send status information to your application
683
- def status_callback
684
- @properties['status_callback']
685
- end
686
-
687
- ##
688
- # @return [String] The HTTP method we use to call status_callback
689
- def status_callback_method
690
- @properties['status_callback_method']
691
- end
692
-
693
- ##
694
- # @return [String] The SID of the Trunk that handles calls to the phone number
695
- def trunk_sid
696
- @properties['trunk_sid']
697
- end
698
-
699
- ##
700
- # @return [String] The URI of the resource, relative to `https://api.twilio.com`
701
- def uri
702
- @properties['uri']
703
- end
704
-
705
- ##
706
- # @return [incoming_phone_number.VoiceReceiveMode] The voice_receive_mode
707
- def voice_receive_mode
708
- @properties['voice_receive_mode']
709
- end
710
-
711
- ##
712
- # @return [String] The SID of the application that handles calls to the phone number
713
- def voice_application_sid
714
- @properties['voice_application_sid']
715
- end
716
-
717
- ##
718
- # @return [Boolean] Whether to lookup the caller's name
719
- def voice_caller_id_lookup
720
- @properties['voice_caller_id_lookup']
721
- end
722
-
723
- ##
724
- # @return [String] The HTTP method used with voice_fallback_url
725
- def voice_fallback_method
726
- @properties['voice_fallback_method']
727
- end
728
-
729
- ##
730
- # @return [String] The URL we call when an error occurs in TwiML
731
- def voice_fallback_url
732
- @properties['voice_fallback_url']
733
- end
734
-
735
- ##
736
- # @return [String] The HTTP method used with the voice_url
737
- def voice_method
738
- @properties['voice_method']
739
- end
740
-
741
- ##
742
- # @return [String] The URL we call when the phone number receives a call
743
- def voice_url
744
- @properties['voice_url']
745
- end
746
-
747
- ##
748
- # @return [incoming_phone_number.EmergencyStatus] Whether the phone number is enabled for emergency calling
749
- def emergency_status
750
- @properties['emergency_status']
751
- end
752
-
753
- ##
754
- # @return [String] The emergency address configuration to use for emergency calling
755
- def emergency_address_sid
756
- @properties['emergency_address_sid']
757
- end
758
-
759
- ##
760
- # @return [String] The SID of the Bundle resource associated with number
761
- def bundle_sid
762
- @properties['bundle_sid']
763
- end
764
-
765
- ##
766
- # @return [String] The status
767
- def status
768
- @properties['status']
769
- end
770
-
771
- ##
772
- # Update the IncomingPhoneNumberInstance
773
- # @param [String] account_sid The SID of the
774
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created the
775
- # IncomingPhoneNumber resource to update. For more information, see {Exchanging
776
- # Numbers Between
777
- # Subaccounts}[https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers].
778
- # @param [String] api_version The API version to use for incoming calls made to
779
- # the phone number. The default is `2010-04-01`.
780
- # @param [String] friendly_name A descriptive string that you created to describe
781
- # this phone number. It can be up to 64 characters long. By default, this is a
782
- # formatted version of the phone number.
783
- # @param [String] sms_application_sid The SID of the application that should
784
- # handle SMS messages sent to the number. If an `sms_application_sid` is present,
785
- # we ignore all of the `sms_*_url` urls and use those set on the application.
786
- # @param [String] sms_fallback_method The HTTP method that we should use to call
787
- # `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
788
- # @param [String] sms_fallback_url The URL that we should call when an error
789
- # occurs while requesting or executing the TwiML defined by `sms_url`.
790
- # @param [String] sms_method The HTTP method that we should use to call `sms_url`.
791
- # Can be: `GET` or `POST` and defaults to `POST`.
792
- # @param [String] sms_url The URL we should call when the phone number receives an
793
- # incoming SMS message.
794
- # @param [String] status_callback The URL we should call using the
795
- # `status_callback_method` to send status information to your application.
796
- # @param [String] status_callback_method The HTTP method we should use to call
797
- # `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
798
- # @param [String] voice_application_sid The SID of the application we should use
799
- # to handle phone calls to the phone number. If a `voice_application_sid` is
800
- # present, we ignore all of the voice urls and use only those set on the
801
- # application. Setting a `voice_application_sid` will automatically delete your
802
- # `trunk_sid` and vice versa.
803
- # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
804
- # the CNAM database and post it to your app. Can be: `true` or `false` and
805
- # defaults to `false`.
806
- # @param [String] voice_fallback_method The HTTP method that we should use to call
807
- # `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
808
- # @param [String] voice_fallback_url The URL that we should call when an error
809
- # occurs retrieving or executing the TwiML requested by `url`.
810
- # @param [String] voice_method The HTTP method that we should use to call
811
- # `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
812
- # @param [String] voice_url The URL that we should call to answer a call to the
813
- # phone number. The `voice_url` will not be called if a `voice_application_sid` or
814
- # a `trunk_sid` is set.
815
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
816
- # configuration status parameter that determines whether the phone number is
817
- # enabled for emergency calling.
818
- # @param [String] emergency_address_sid The SID of the emergency address
819
- # configuration to use for emergency calling from this phone number.
820
- # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
821
- # calls to the phone number. If a `trunk_sid` is present, we ignore all of the
822
- # voice urls and voice applications and use only those set on the Trunk. Setting a
823
- # `trunk_sid` will automatically delete your `voice_application_sid` and vice
824
- # versa.
825
- # @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
826
- # configuration parameter for the phone number to receive incoming voice calls or
827
- # faxes. Can be: `fax` or `voice` and defaults to `voice`.
828
- # @param [String] identity_sid The SID of the Identity resource that we should
829
- # associate with the phone number. Some regions require an identity to meet local
830
- # regulations.
831
- # @param [String] address_sid The SID of the Address resource we should associate
832
- # with the phone number. Some regions require addresses to meet local regulations.
833
- # @param [String] bundle_sid The SID of the Bundle resource that you associate
834
- # with the phone number. Some regions require a Bundle to meet local Regulations.
835
- # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
836
- def update(account_sid: :unset, api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, voice_receive_mode: :unset, identity_sid: :unset, address_sid: :unset, bundle_sid: :unset)
837
- context.update(
838
- account_sid: account_sid,
839
- api_version: api_version,
840
- friendly_name: friendly_name,
841
- sms_application_sid: sms_application_sid,
842
- sms_fallback_method: sms_fallback_method,
843
- sms_fallback_url: sms_fallback_url,
844
- sms_method: sms_method,
845
- sms_url: sms_url,
846
- status_callback: status_callback,
847
- status_callback_method: status_callback_method,
848
- voice_application_sid: voice_application_sid,
849
- voice_caller_id_lookup: voice_caller_id_lookup,
850
- voice_fallback_method: voice_fallback_method,
851
- voice_fallback_url: voice_fallback_url,
852
- voice_method: voice_method,
853
- voice_url: voice_url,
854
- emergency_status: emergency_status,
855
- emergency_address_sid: emergency_address_sid,
856
- trunk_sid: trunk_sid,
857
- voice_receive_mode: voice_receive_mode,
858
- identity_sid: identity_sid,
859
- address_sid: address_sid,
860
- bundle_sid: bundle_sid,
861
- )
862
- end
863
-
864
- ##
865
- # Fetch the IncomingPhoneNumberInstance
866
- # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
867
- def fetch
868
- context.fetch
869
- end
870
-
871
- ##
872
- # Delete the IncomingPhoneNumberInstance
873
- # @return [Boolean] true if delete succeeds, false otherwise
874
- def delete
875
- context.delete
876
- end
877
-
878
- ##
879
- # Access the assigned_add_ons
880
- # @return [assigned_add_ons] assigned_add_ons
881
- def assigned_add_ons
882
- context.assigned_add_ons
883
- end
884
14
 
885
- ##
886
- # Provide a user friendly representation
887
- def to_s
888
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
889
- "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
890
- end
891
15
 
892
- ##
893
- # Provide a detailed, user friendly representation
894
- def inspect
895
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
896
- "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
16
+ module Twilio
17
+ module REST
18
+ class Api < ApiBase
19
+ class V2010 < Version
20
+ class AccountContext < InstanceContext
21
+
22
+ class IncomingPhoneNumberList < ListResource
23
+
24
+ ##
25
+ # Initialize the IncomingPhoneNumberList
26
+ # @param [Version] version Version that contains the resource
27
+ # @return [IncomingPhoneNumberList] IncomingPhoneNumberList
28
+ def initialize(version, account_sid: nil)
29
+ super(version)
30
+
31
+ # Path Solution
32
+ @solution = { account_sid: account_sid }
33
+ @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers.json"
34
+ # Components
35
+ @toll_free = nil
36
+ @local = nil
37
+ @mobile = nil
38
+ end
39
+ ##
40
+ # Create the IncomingPhoneNumberInstance
41
+ # @param [String] api_version The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
42
+ # @param [String] friendly_name A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
43
+ # @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
44
+ # @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
45
+ # @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
46
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
47
+ # @param [String] sms_url The URL we should call when the new phone number receives an incoming SMS message.
48
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
49
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
50
+ # @param [String] voice_application_sid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
51
+ # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
52
+ # @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
53
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
54
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
55
+ # @param [String] voice_url The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
56
+ # @param [EmergencyStatus] emergency_status
57
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from the new phone number.
58
+ # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
59
+ # @param [String] identity_sid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
60
+ # @param [String] address_sid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
61
+ # @param [VoiceReceiveMode] voice_receive_mode
62
+ # @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
63
+ # @param [String] phone_number The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
64
+ # @param [String] area_code The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
65
+ # @return [IncomingPhoneNumberInstance] Created IncomingPhoneNumberInstance
66
+ def create(
67
+ api_version: :unset,
68
+ friendly_name: :unset,
69
+ sms_application_sid: :unset,
70
+ sms_fallback_method: :unset,
71
+ sms_fallback_url: :unset,
72
+ sms_method: :unset,
73
+ sms_url: :unset,
74
+ status_callback: :unset,
75
+ status_callback_method: :unset,
76
+ voice_application_sid: :unset,
77
+ voice_caller_id_lookup: :unset,
78
+ voice_fallback_method: :unset,
79
+ voice_fallback_url: :unset,
80
+ voice_method: :unset,
81
+ voice_url: :unset,
82
+ emergency_status: :unset,
83
+ emergency_address_sid: :unset,
84
+ trunk_sid: :unset,
85
+ identity_sid: :unset,
86
+ address_sid: :unset,
87
+ voice_receive_mode: :unset,
88
+ bundle_sid: :unset,
89
+ phone_number: :unset,
90
+ area_code: :unset
91
+ )
92
+
93
+ data = Twilio::Values.of({
94
+ 'ApiVersion' => api_version,
95
+ 'FriendlyName' => friendly_name,
96
+ 'SmsApplicationSid' => sms_application_sid,
97
+ 'SmsFallbackMethod' => sms_fallback_method,
98
+ 'SmsFallbackUrl' => sms_fallback_url,
99
+ 'SmsMethod' => sms_method,
100
+ 'SmsUrl' => sms_url,
101
+ 'StatusCallback' => status_callback,
102
+ 'StatusCallbackMethod' => status_callback_method,
103
+ 'VoiceApplicationSid' => voice_application_sid,
104
+ 'VoiceCallerIdLookup' => voice_caller_id_lookup,
105
+ 'VoiceFallbackMethod' => voice_fallback_method,
106
+ 'VoiceFallbackUrl' => voice_fallback_url,
107
+ 'VoiceMethod' => voice_method,
108
+ 'VoiceUrl' => voice_url,
109
+ 'EmergencyStatus' => emergency_status,
110
+ 'EmergencyAddressSid' => emergency_address_sid,
111
+ 'TrunkSid' => trunk_sid,
112
+ 'IdentitySid' => identity_sid,
113
+ 'AddressSid' => address_sid,
114
+ 'VoiceReceiveMode' => voice_receive_mode,
115
+ 'BundleSid' => bundle_sid,
116
+ 'PhoneNumber' => phone_number,
117
+ 'AreaCode' => area_code,
118
+ })
119
+
120
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
121
+
122
+
123
+
124
+
125
+
126
+ payload = @version.create('POST', @uri, data: data, headers: headers)
127
+ IncomingPhoneNumberInstance.new(
128
+ @version,
129
+ payload,
130
+ account_sid: @solution[:account_sid],
131
+ )
132
+ end
133
+
134
+ ##
135
+ # Create the IncomingPhoneNumberInstanceMetadata
136
+ # @param [String] api_version The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
137
+ # @param [String] friendly_name A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
138
+ # @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
139
+ # @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
140
+ # @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
141
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
142
+ # @param [String] sms_url The URL we should call when the new phone number receives an incoming SMS message.
143
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
144
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
145
+ # @param [String] voice_application_sid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
146
+ # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
147
+ # @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
148
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
149
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
150
+ # @param [String] voice_url The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
151
+ # @param [EmergencyStatus] emergency_status
152
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from the new phone number.
153
+ # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
154
+ # @param [String] identity_sid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
155
+ # @param [String] address_sid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
156
+ # @param [VoiceReceiveMode] voice_receive_mode
157
+ # @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
158
+ # @param [String] phone_number The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
159
+ # @param [String] area_code The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
160
+ # @return [IncomingPhoneNumberInstance] Created IncomingPhoneNumberInstance
161
+ def create_with_metadata(
162
+ api_version: :unset,
163
+ friendly_name: :unset,
164
+ sms_application_sid: :unset,
165
+ sms_fallback_method: :unset,
166
+ sms_fallback_url: :unset,
167
+ sms_method: :unset,
168
+ sms_url: :unset,
169
+ status_callback: :unset,
170
+ status_callback_method: :unset,
171
+ voice_application_sid: :unset,
172
+ voice_caller_id_lookup: :unset,
173
+ voice_fallback_method: :unset,
174
+ voice_fallback_url: :unset,
175
+ voice_method: :unset,
176
+ voice_url: :unset,
177
+ emergency_status: :unset,
178
+ emergency_address_sid: :unset,
179
+ trunk_sid: :unset,
180
+ identity_sid: :unset,
181
+ address_sid: :unset,
182
+ voice_receive_mode: :unset,
183
+ bundle_sid: :unset,
184
+ phone_number: :unset,
185
+ area_code: :unset
186
+ )
187
+
188
+ data = Twilio::Values.of({
189
+ 'ApiVersion' => api_version,
190
+ 'FriendlyName' => friendly_name,
191
+ 'SmsApplicationSid' => sms_application_sid,
192
+ 'SmsFallbackMethod' => sms_fallback_method,
193
+ 'SmsFallbackUrl' => sms_fallback_url,
194
+ 'SmsMethod' => sms_method,
195
+ 'SmsUrl' => sms_url,
196
+ 'StatusCallback' => status_callback,
197
+ 'StatusCallbackMethod' => status_callback_method,
198
+ 'VoiceApplicationSid' => voice_application_sid,
199
+ 'VoiceCallerIdLookup' => voice_caller_id_lookup,
200
+ 'VoiceFallbackMethod' => voice_fallback_method,
201
+ 'VoiceFallbackUrl' => voice_fallback_url,
202
+ 'VoiceMethod' => voice_method,
203
+ 'VoiceUrl' => voice_url,
204
+ 'EmergencyStatus' => emergency_status,
205
+ 'EmergencyAddressSid' => emergency_address_sid,
206
+ 'TrunkSid' => trunk_sid,
207
+ 'IdentitySid' => identity_sid,
208
+ 'AddressSid' => address_sid,
209
+ 'VoiceReceiveMode' => voice_receive_mode,
210
+ 'BundleSid' => bundle_sid,
211
+ 'PhoneNumber' => phone_number,
212
+ 'AreaCode' => area_code,
213
+ })
214
+
215
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
216
+
217
+
218
+
219
+
220
+
221
+ response = @version.create_with_metadata('POST', @uri, data: data, headers: headers)
222
+ incoming_phone_number_instance = IncomingPhoneNumberInstance.new(
223
+ @version,
224
+ response.body,
225
+ account_sid: @solution[:account_sid],
226
+ )
227
+ IncomingPhoneNumberInstanceMetadata.new(
228
+ @version,
229
+ incoming_phone_number_instance,
230
+ response.headers,
231
+ response.status_code
232
+ )
233
+ end
234
+
235
+
236
+ ##
237
+ # Lists IncomingPhoneNumberInstance records from the API as a list.
238
+ # Unlike stream(), this operation is eager and will load `limit` records into
239
+ # memory before returning.
240
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
241
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
242
+ # @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
243
+ # @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
244
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
245
+ # guarantees to never return more than limit. Default is no limit
246
+ # @param [Integer] page_size Number of records to fetch per request, when
247
+ # not set will use the default value of 50 records. If no page_size is defined
248
+ # but a limit is defined, stream() will attempt to read the limit with the most
249
+ # efficient page size, i.e. min(limit, 1000)
250
+ # @return [Array] Array of up to limit results
251
+ def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
252
+ self.stream(
253
+ beta: beta,
254
+ friendly_name: friendly_name,
255
+ phone_number: phone_number,
256
+ origin: origin,
257
+ limit: limit,
258
+ page_size: page_size
259
+ ).entries
260
+ end
261
+
262
+ ##
263
+ # Streams Instance records from the API as an Enumerable.
264
+ # This operation lazily loads records as efficiently as possible until the limit
265
+ # is reached.
266
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
267
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
268
+ # @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
269
+ # @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
270
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
271
+ # guarantees to never return more than limit. Default is no limit
272
+ # @param [Integer] page_size Number of records to fetch per request, when
273
+ # not set will use the default value of 50 records. If no page_size is defined
274
+ # but a limit is defined, stream() will attempt to read the limit with the most
275
+ # efficient page size, i.e. min(limit, 1000)
276
+ # @return [Enumerable] Enumerable that will yield up to limit results
277
+ def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
278
+ limits = @version.read_limits(limit, page_size)
279
+
280
+ page = self.page(
281
+ beta: beta,
282
+ friendly_name: friendly_name,
283
+ phone_number: phone_number,
284
+ origin: origin,
285
+ page_size: limits[:page_size], )
286
+
287
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
288
+ end
289
+
290
+ ##
291
+ # Lists IncomingPhoneNumberPageMetadata records from the API as a list.
292
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
293
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
294
+ # @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
295
+ # @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
296
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
297
+ # guarantees to never return more than limit. Default is no limit
298
+ # @param [Integer] page_size Number of records to fetch per request, when
299
+ # not set will use the default value of 50 records. If no page_size is defined
300
+ # but a limit is defined, stream() will attempt to read the limit with the most
301
+ # efficient page size, i.e. min(limit, 1000)
302
+ # @return [Array] Array of up to limit results
303
+ def list_with_metadata(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
304
+ limits = @version.read_limits(limit, page_size)
305
+ params = Twilio::Values.of({
306
+ 'Beta' => beta,
307
+ 'FriendlyName' => friendly_name,
308
+ 'PhoneNumber' => phone_number,
309
+ 'Origin' => origin,
310
+
311
+ 'PageSize' => limits[:page_size],
312
+ });
313
+ headers = Twilio::Values.of({})
314
+
315
+ response = @version.page('GET', @uri, params: params, headers: headers)
316
+
317
+ IncomingPhoneNumberPageMetadata.new(@version, response, @solution, limits[:limit])
318
+ end
319
+
320
+ ##
321
+ # When passed a block, yields IncomingPhoneNumberInstance records from the API.
322
+ # This operation lazily loads records as efficiently as possible until the limit
323
+ # is reached.
324
+ def each
325
+ limits = @version.read_limits
326
+
327
+ page = self.page(page_size: limits[:page_size], )
328
+
329
+ @version.stream(page,
330
+ limit: limits[:limit],
331
+ page_limit: limits[:page_limit]).each {|x| yield x}
332
+ end
333
+
334
+ ##
335
+ # Retrieve a single page of IncomingPhoneNumberInstance records from the API.
336
+ # Request is executed immediately.
337
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
338
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
339
+ # @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
340
+ # @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
341
+ # @param [String] page_token PageToken provided by the API
342
+ # @param [Integer] page_number Page Number, this value is simply for client state
343
+ # @param [Integer] page_size Number of records to return, defaults to 50
344
+ # @return [Page] Page of IncomingPhoneNumberInstance
345
+ def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
346
+ params = Twilio::Values.of({
347
+ 'Beta' => beta,
348
+ 'FriendlyName' => friendly_name,
349
+ 'PhoneNumber' => phone_number,
350
+ 'Origin' => origin,
351
+ 'PageToken' => page_token,
352
+ 'Page' => page_number,
353
+ 'PageSize' => page_size,
354
+ })
355
+ headers = Twilio::Values.of({})
356
+
357
+
358
+
359
+ response = @version.page('GET', @uri, params: params, headers: headers)
360
+
361
+ IncomingPhoneNumberPage.new(@version, response, @solution)
362
+ end
363
+
364
+ ##
365
+ # Retrieve a single page of IncomingPhoneNumberInstance records from the API.
366
+ # Request is executed immediately.
367
+ # @param [String] target_url API-generated URL for the requested results page
368
+ # @return [Page] Page of IncomingPhoneNumberInstance
369
+ def get_page(target_url)
370
+ response = @version.domain.request(
371
+ 'GET',
372
+ target_url
373
+ )
374
+ IncomingPhoneNumberPage.new(@version, response, @solution)
375
+ end
376
+
377
+
378
+ ##
379
+ # Access the toll_free
380
+ # @return [TollFreeList]
381
+ # @return [TollFreeContext]
382
+ def toll_free
383
+ @toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid] )
384
+ end
385
+ ##
386
+ # Access the local
387
+ # @return [LocalList]
388
+ # @return [LocalContext]
389
+ def local
390
+ @local ||= LocalList.new(@version, account_sid: @solution[:account_sid] )
391
+ end
392
+ ##
393
+ # Access the mobile
394
+ # @return [MobileList]
395
+ # @return [MobileContext]
396
+ def mobile
397
+ @mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid] )
398
+ end
399
+
400
+ # Provide a user friendly representation
401
+ def to_s
402
+ '#<Twilio.Api.V2010.IncomingPhoneNumberList>'
403
+ end
404
+ end
405
+
406
+
407
+ class IncomingPhoneNumberContext < InstanceContext
408
+ ##
409
+ # Initialize the IncomingPhoneNumberContext
410
+ # @param [Version] version Version that contains the resource
411
+ # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
412
+ # @param [String] sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update.
413
+ # @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext
414
+ def initialize(version, account_sid, sid)
415
+ super(version)
416
+
417
+
418
+ # Path Solution
419
+ @solution = { account_sid: account_sid, sid: sid, }
420
+ @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:sid]}.json"
421
+
422
+ # Dependents
423
+ @assigned_add_ons = nil
424
+ end
425
+ ##
426
+ # Delete the IncomingPhoneNumberInstance
427
+ # @return [Boolean] True if delete succeeds, false otherwise
428
+ def delete
429
+
430
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
431
+
432
+
433
+
434
+
435
+ @version.delete('DELETE', @uri, headers: headers)
436
+ end
437
+
438
+ ##
439
+ # Delete the IncomingPhoneNumberInstanceMetadata
440
+ # @return [Boolean] True if delete succeeds, false otherwise
441
+ def delete_with_metadata
442
+
443
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
444
+
445
+
446
+
447
+ response = @version.delete_with_metadata('DELETE', @uri, headers: headers)
448
+ incomingPhoneNumber_instance = IncomingPhoneNumberInstance.new(
449
+ @version,
450
+ response.body,
451
+ account_sid: @solution[:account_sid],
452
+ sid: @solution[:sid],
453
+ )
454
+ IncomingPhoneNumberInstanceMetadata.new(@version, incomingPhoneNumber_instance, response.headers, response.status_code)
455
+ end
456
+
457
+ ##
458
+ # Fetch the IncomingPhoneNumberInstance
459
+ # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
460
+ def fetch
461
+
462
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
463
+
464
+
465
+
466
+
467
+
468
+ payload = @version.fetch('GET', @uri, headers: headers)
469
+ IncomingPhoneNumberInstance.new(
470
+ @version,
471
+ payload,
472
+ account_sid: @solution[:account_sid],
473
+ sid: @solution[:sid],
474
+ )
475
+ end
476
+
477
+ ##
478
+ # Fetch the IncomingPhoneNumberInstanceMetadata
479
+ # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
480
+ def fetch_with_metadata
481
+
482
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
483
+
484
+
485
+
486
+
487
+
488
+ response = @version.fetch_with_metadata('GET', @uri, headers: headers)
489
+ incoming_phone_number_instance = IncomingPhoneNumberInstance.new(
490
+ @version,
491
+ response.body,
492
+ account_sid: @solution[:account_sid],
493
+ sid: @solution[:sid],
494
+ )
495
+ IncomingPhoneNumberInstanceMetadata.new(
496
+ @version,
497
+ incoming_phone_number_instance,
498
+ response.headers,
499
+ response.status_code
500
+ )
501
+ end
502
+
503
+ ##
504
+ # Update the IncomingPhoneNumberInstance
505
+ # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
506
+ # @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
507
+ # @param [String] friendly_name A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
508
+ # @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
509
+ # @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
510
+ # @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
511
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
512
+ # @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
513
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
514
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
515
+ # @param [String] voice_application_sid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
516
+ # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
517
+ # @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
518
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
519
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
520
+ # @param [String] voice_url The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
521
+ # @param [EmergencyStatus] emergency_status
522
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
523
+ # @param [String] trunk_sid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
524
+ # @param [VoiceReceiveMode] voice_receive_mode
525
+ # @param [String] identity_sid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
526
+ # @param [String] address_sid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
527
+ # @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
528
+ # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
529
+ def update(
530
+ account_sid: :unset,
531
+ api_version: :unset,
532
+ friendly_name: :unset,
533
+ sms_application_sid: :unset,
534
+ sms_fallback_method: :unset,
535
+ sms_fallback_url: :unset,
536
+ sms_method: :unset,
537
+ sms_url: :unset,
538
+ status_callback: :unset,
539
+ status_callback_method: :unset,
540
+ voice_application_sid: :unset,
541
+ voice_caller_id_lookup: :unset,
542
+ voice_fallback_method: :unset,
543
+ voice_fallback_url: :unset,
544
+ voice_method: :unset,
545
+ voice_url: :unset,
546
+ emergency_status: :unset,
547
+ emergency_address_sid: :unset,
548
+ trunk_sid: :unset,
549
+ voice_receive_mode: :unset,
550
+ identity_sid: :unset,
551
+ address_sid: :unset,
552
+ bundle_sid: :unset
553
+ )
554
+
555
+ data = Twilio::Values.of({
556
+ 'AccountSid' => account_sid,
557
+ 'ApiVersion' => api_version,
558
+ 'FriendlyName' => friendly_name,
559
+ 'SmsApplicationSid' => sms_application_sid,
560
+ 'SmsFallbackMethod' => sms_fallback_method,
561
+ 'SmsFallbackUrl' => sms_fallback_url,
562
+ 'SmsMethod' => sms_method,
563
+ 'SmsUrl' => sms_url,
564
+ 'StatusCallback' => status_callback,
565
+ 'StatusCallbackMethod' => status_callback_method,
566
+ 'VoiceApplicationSid' => voice_application_sid,
567
+ 'VoiceCallerIdLookup' => voice_caller_id_lookup,
568
+ 'VoiceFallbackMethod' => voice_fallback_method,
569
+ 'VoiceFallbackUrl' => voice_fallback_url,
570
+ 'VoiceMethod' => voice_method,
571
+ 'VoiceUrl' => voice_url,
572
+ 'EmergencyStatus' => emergency_status,
573
+ 'EmergencyAddressSid' => emergency_address_sid,
574
+ 'TrunkSid' => trunk_sid,
575
+ 'VoiceReceiveMode' => voice_receive_mode,
576
+ 'IdentitySid' => identity_sid,
577
+ 'AddressSid' => address_sid,
578
+ 'BundleSid' => bundle_sid,
579
+ })
580
+
581
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
582
+
583
+
584
+
585
+
586
+
587
+ payload = @version.update('POST', @uri, data: data, headers: headers)
588
+ IncomingPhoneNumberInstance.new(
589
+ @version,
590
+ payload,
591
+ account_sid: @solution[:account_sid],
592
+ sid: @solution[:sid],
593
+ )
594
+ end
595
+
596
+ ##
597
+ # Update the IncomingPhoneNumberInstanceMetadata
598
+ # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
599
+ # @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
600
+ # @param [String] friendly_name A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
601
+ # @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
602
+ # @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
603
+ # @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
604
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
605
+ # @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
606
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
607
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
608
+ # @param [String] voice_application_sid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
609
+ # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
610
+ # @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
611
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
612
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
613
+ # @param [String] voice_url The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
614
+ # @param [EmergencyStatus] emergency_status
615
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
616
+ # @param [String] trunk_sid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
617
+ # @param [VoiceReceiveMode] voice_receive_mode
618
+ # @param [String] identity_sid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
619
+ # @param [String] address_sid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
620
+ # @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
621
+ # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
622
+ def update_with_metadata(
623
+ account_sid: :unset,
624
+ api_version: :unset,
625
+ friendly_name: :unset,
626
+ sms_application_sid: :unset,
627
+ sms_fallback_method: :unset,
628
+ sms_fallback_url: :unset,
629
+ sms_method: :unset,
630
+ sms_url: :unset,
631
+ status_callback: :unset,
632
+ status_callback_method: :unset,
633
+ voice_application_sid: :unset,
634
+ voice_caller_id_lookup: :unset,
635
+ voice_fallback_method: :unset,
636
+ voice_fallback_url: :unset,
637
+ voice_method: :unset,
638
+ voice_url: :unset,
639
+ emergency_status: :unset,
640
+ emergency_address_sid: :unset,
641
+ trunk_sid: :unset,
642
+ voice_receive_mode: :unset,
643
+ identity_sid: :unset,
644
+ address_sid: :unset,
645
+ bundle_sid: :unset
646
+ )
647
+
648
+ data = Twilio::Values.of({
649
+ 'AccountSid' => account_sid,
650
+ 'ApiVersion' => api_version,
651
+ 'FriendlyName' => friendly_name,
652
+ 'SmsApplicationSid' => sms_application_sid,
653
+ 'SmsFallbackMethod' => sms_fallback_method,
654
+ 'SmsFallbackUrl' => sms_fallback_url,
655
+ 'SmsMethod' => sms_method,
656
+ 'SmsUrl' => sms_url,
657
+ 'StatusCallback' => status_callback,
658
+ 'StatusCallbackMethod' => status_callback_method,
659
+ 'VoiceApplicationSid' => voice_application_sid,
660
+ 'VoiceCallerIdLookup' => voice_caller_id_lookup,
661
+ 'VoiceFallbackMethod' => voice_fallback_method,
662
+ 'VoiceFallbackUrl' => voice_fallback_url,
663
+ 'VoiceMethod' => voice_method,
664
+ 'VoiceUrl' => voice_url,
665
+ 'EmergencyStatus' => emergency_status,
666
+ 'EmergencyAddressSid' => emergency_address_sid,
667
+ 'TrunkSid' => trunk_sid,
668
+ 'VoiceReceiveMode' => voice_receive_mode,
669
+ 'IdentitySid' => identity_sid,
670
+ 'AddressSid' => address_sid,
671
+ 'BundleSid' => bundle_sid,
672
+ })
673
+
674
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
675
+
676
+
677
+
678
+
679
+
680
+ response = @version.update_with_metadata('POST', @uri, data: data, headers: headers)
681
+ incoming_phone_number_instance = IncomingPhoneNumberInstance.new(
682
+ @version,
683
+ response.body,
684
+ account_sid: @solution[:account_sid],
685
+ sid: @solution[:sid],
686
+ )
687
+ IncomingPhoneNumberInstanceMetadata.new(
688
+ @version,
689
+ incoming_phone_number_instance,
690
+ response.headers,
691
+ response.status_code
692
+ )
693
+ end
694
+
695
+ ##
696
+ # Access the assigned_add_ons
697
+ # @return [AssignedAddOnList]
698
+ # @return [AssignedAddOnContext] if sid was passed.
699
+ def assigned_add_ons(sid=:unset)
700
+
701
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
702
+
703
+ if sid != :unset
704
+ return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
705
+ end
706
+
707
+ unless @assigned_add_ons
708
+ @assigned_add_ons = AssignedAddOnList.new(
709
+ @version, account_sid: @solution[:account_sid], resource_sid: @solution[:sid], )
710
+ end
711
+
712
+ @assigned_add_ons
713
+ end
714
+
715
+ ##
716
+ # Provide a user friendly representation
717
+ def to_s
718
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
719
+ "#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
720
+ end
721
+
722
+ ##
723
+ # Provide a detailed, user friendly representation
724
+ def inspect
725
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
726
+ "#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
727
+ end
728
+ end
729
+
730
+ class IncomingPhoneNumberInstanceMetadata < InstanceResourceMetadata
731
+ ##
732
+ # Initializes a new IncomingPhoneNumberInstanceMetadata.
733
+ # @param [Version] version Version that contains the resource
734
+ # @param [}IncomingPhoneNumberInstance] incoming_phone_number_instance The instance associated with the metadata.
735
+ # @param [Hash] headers Header object with response headers.
736
+ # @param [Integer] status_code The HTTP status code of the response.
737
+ # @return [IncomingPhoneNumberInstanceMetadata] The initialized instance with metadata.
738
+ def initialize(version, incoming_phone_number_instance, headers, status_code)
739
+ super(version, headers, status_code)
740
+ @incoming_phone_number_instance = incoming_phone_number_instance
741
+ end
742
+
743
+ def incoming_phone_number
744
+ @incoming_phone_number_instance
745
+ end
746
+
747
+ def headers
748
+ @headers
749
+ end
750
+
751
+ def status_code
752
+ @status_code
753
+ end
754
+
755
+ def to_s
756
+ "<Twilio.Api.V2010.IncomingPhoneNumberInstanceMetadata status=#{@status_code}>"
757
+ end
758
+ end
759
+
760
+ class IncomingPhoneNumberListResponse < InstanceListResource
761
+ # @param [Array<IncomingPhoneNumberInstance>] instance
762
+ # @param [Hash{String => Object}] headers
763
+ # @param [Integer] status_code
764
+ def initialize(version, payload, key)
765
+ @incoming_phone_number_instance = payload.body[key].map do |data|
766
+ IncomingPhoneNumberInstance.new(version, data)
767
+ end
768
+ @headers = payload.headers
769
+ @status_code = payload.status_code
770
+ end
771
+
772
+ def incoming_phone_number_instance
773
+ @instance
774
+ end
775
+ end
776
+
777
+ class IncomingPhoneNumberPage < Page
778
+ ##
779
+ # Initialize the IncomingPhoneNumberPage
780
+ # @param [Version] version Version that contains the resource
781
+ # @param [Response] response Response from the API
782
+ # @param [Hash] solution Path solution for the resource
783
+ # @return [IncomingPhoneNumberPage] IncomingPhoneNumberPage
784
+ def initialize(version, response, solution)
785
+ super(version, response)
786
+
787
+
788
+ # Path Solution
789
+ @solution = solution
790
+ end
791
+
792
+ ##
793
+ # Build an instance of IncomingPhoneNumberInstance
794
+ # @param [Hash] payload Payload response from the API
795
+ # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
796
+ def get_instance(payload)
797
+ IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid])
798
+ end
799
+
800
+ ##
801
+ # Provide a user friendly representation
802
+ def to_s
803
+ '<Twilio.Api.V2010.IncomingPhoneNumberPage>'
804
+ end
805
+ end
806
+
807
+ class IncomingPhoneNumberPageMetadata < PageMetadata
808
+ attr_reader :incoming_phone_number_page
809
+
810
+ def initialize(version, response, solution, limit)
811
+ super(version, response)
812
+ @incoming_phone_number_page = []
813
+ @limit = limit
814
+ key = get_key(response.body)
815
+ records = 0
816
+ while( limit != :unset && records < limit )
817
+ @incoming_phone_number_page << IncomingPhoneNumberListResponse.new(version, @payload, key, limit - records)
818
+ @payload = self.next_page
819
+ break unless @payload
820
+ records += @payload.body[key].size
821
+ end
822
+ # Path Solution
823
+ @solution = solution
824
+ end
825
+
826
+ def each
827
+ @incoming_phone_number_page.each do |record|
828
+ yield record
829
+ end
830
+ end
831
+
832
+ def to_s
833
+ '<Twilio::REST::Api::V2010PageMetadata>';
834
+ end
835
+ end
836
+ class IncomingPhoneNumberListResponse < InstanceListResource
837
+
838
+ # @param [Array<IncomingPhoneNumberInstance>] instance
839
+ # @param [Hash{String => Object}] headers
840
+ # @param [Integer] status_code
841
+ def initialize(version, payload, key, limit = :unset)
842
+ data_list = payload.body[key]
843
+ if limit != :unset
844
+ data_list = data_list[0, limit]
845
+ end
846
+ @incoming_phone_number = data_list.map do |data|
847
+ IncomingPhoneNumberInstance.new(version, data)
848
+ end
849
+ @headers = payload.headers
850
+ @status_code = payload.status_code
851
+ end
852
+
853
+ def incoming_phone_number
854
+ @incoming_phone_number
855
+ end
856
+
857
+ def headers
858
+ @headers
859
+ end
860
+
861
+ def status_code
862
+ @status_code
863
+ end
864
+ end
865
+
866
+ class IncomingPhoneNumberInstance < InstanceResource
867
+ ##
868
+ # Initialize the IncomingPhoneNumberInstance
869
+ # @param [Version] version Version that contains the resource
870
+ # @param [Hash] payload payload that contains response from Twilio
871
+ # @param [String] account_sid The SID of the
872
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this IncomingPhoneNumber
873
+ # resource.
874
+ # @param [String] sid The SID of the Call resource to fetch.
875
+ # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
876
+ def initialize(version, payload , account_sid: nil, sid: nil)
877
+ super(version)
878
+
879
+
880
+ # Marshaled Properties
881
+ @properties = {
882
+ 'account_sid' => payload['account_sid'],
883
+ 'address_sid' => payload['address_sid'],
884
+ 'address_requirements' => payload['address_requirements'],
885
+ 'api_version' => payload['api_version'],
886
+ 'beta' => payload['beta'],
887
+ 'capabilities' => payload['capabilities'],
888
+ 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
889
+ 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
890
+ 'friendly_name' => payload['friendly_name'],
891
+ 'identity_sid' => payload['identity_sid'],
892
+ 'phone_number' => payload['phone_number'],
893
+ 'origin' => payload['origin'],
894
+ 'sid' => payload['sid'],
895
+ 'sms_application_sid' => payload['sms_application_sid'],
896
+ 'sms_fallback_method' => payload['sms_fallback_method'],
897
+ 'sms_fallback_url' => payload['sms_fallback_url'],
898
+ 'sms_method' => payload['sms_method'],
899
+ 'sms_url' => payload['sms_url'],
900
+ 'status_callback' => payload['status_callback'],
901
+ 'status_callback_method' => payload['status_callback_method'],
902
+ 'trunk_sid' => payload['trunk_sid'],
903
+ 'uri' => payload['uri'],
904
+ 'voice_receive_mode' => payload['voice_receive_mode'],
905
+ 'voice_application_sid' => payload['voice_application_sid'],
906
+ 'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
907
+ 'voice_fallback_method' => payload['voice_fallback_method'],
908
+ 'voice_fallback_url' => payload['voice_fallback_url'],
909
+ 'voice_method' => payload['voice_method'],
910
+ 'voice_url' => payload['voice_url'],
911
+ 'emergency_status' => payload['emergency_status'],
912
+ 'emergency_address_sid' => payload['emergency_address_sid'],
913
+ 'emergency_address_status' => payload['emergency_address_status'],
914
+ 'bundle_sid' => payload['bundle_sid'],
915
+ 'status' => payload['status'],
916
+ 'type' => payload['type'],
917
+ }
918
+
919
+ # Context
920
+ @instance_context = nil
921
+ @params = { 'account_sid' => account_sid ,'sid' => sid || @properties['sid'] , }
922
+ end
923
+
924
+ ##
925
+ # Generate an instance context for the instance, the context is capable of
926
+ # performing various actions. All instance actions are proxied to the context
927
+ # @return [IncomingPhoneNumberContext] CallContext for this CallInstance
928
+ def context
929
+ unless @instance_context
930
+ @instance_context = IncomingPhoneNumberContext.new(@version , @params['account_sid'], @params['sid'])
931
+ end
932
+ @instance_context
933
+ end
934
+
935
+ ##
936
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource.
937
+ def account_sid
938
+ @properties['account_sid']
939
+ end
940
+
941
+ ##
942
+ # @return [String] The SID of the Address resource associated with the phone number.
943
+ def address_sid
944
+ @properties['address_sid']
945
+ end
946
+
947
+ ##
948
+ # @return [AddressRequirement]
949
+ def address_requirements
950
+ @properties['address_requirements']
951
+ end
952
+
953
+ ##
954
+ # @return [String] The API version used to start a new TwiML session.
955
+ def api_version
956
+ @properties['api_version']
957
+ end
958
+
959
+ ##
960
+ # @return [Boolean] Whether the phone number is new to the Twilio platform. Can be: `true` or `false`.
961
+ def beta
962
+ @properties['beta']
963
+ end
964
+
965
+ ##
966
+ # @return [ApiV2010AccountIncomingPhoneNumberCapabilities]
967
+ def capabilities
968
+ @properties['capabilities']
969
+ end
970
+
971
+ ##
972
+ # @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
973
+ def date_created
974
+ @properties['date_created']
975
+ end
976
+
977
+ ##
978
+ # @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
979
+ def date_updated
980
+ @properties['date_updated']
981
+ end
982
+
983
+ ##
984
+ # @return [String] The string that you assigned to describe the resource.
985
+ def friendly_name
986
+ @properties['friendly_name']
987
+ end
988
+
989
+ ##
990
+ # @return [String] The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations.
991
+ def identity_sid
992
+ @properties['identity_sid']
993
+ end
994
+
995
+ ##
996
+ # @return [String] The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
997
+ def phone_number
998
+ @properties['phone_number']
999
+ end
1000
+
1001
+ ##
1002
+ # @return [String] The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers.
1003
+ def origin
1004
+ @properties['origin']
1005
+ end
1006
+
1007
+ ##
1008
+ # @return [String] The unique string that that we created to identify this IncomingPhoneNumber resource.
1009
+ def sid
1010
+ @properties['sid']
1011
+ end
1012
+
1013
+ ##
1014
+ # @return [String] The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.
1015
+ def sms_application_sid
1016
+ @properties['sms_application_sid']
1017
+ end
1018
+
1019
+ ##
1020
+ # @return [String] The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
1021
+ def sms_fallback_method
1022
+ @properties['sms_fallback_method']
1023
+ end
1024
+
1025
+ ##
1026
+ # @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`.
1027
+ def sms_fallback_url
1028
+ @properties['sms_fallback_url']
1029
+ end
1030
+
1031
+ ##
1032
+ # @return [String] The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
1033
+ def sms_method
1034
+ @properties['sms_method']
1035
+ end
1036
+
1037
+ ##
1038
+ # @return [String] The URL we call when the phone number receives an incoming SMS message.
1039
+ def sms_url
1040
+ @properties['sms_url']
1041
+ end
1042
+
1043
+ ##
1044
+ # @return [String] The URL we call using the `status_callback_method` to send status information to your application.
1045
+ def status_callback
1046
+ @properties['status_callback']
1047
+ end
1048
+
1049
+ ##
1050
+ # @return [String] The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
1051
+ def status_callback_method
1052
+ @properties['status_callback_method']
1053
+ end
1054
+
1055
+ ##
1056
+ # @return [String] The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
1057
+ def trunk_sid
1058
+ @properties['trunk_sid']
1059
+ end
1060
+
1061
+ ##
1062
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`.
1063
+ def uri
1064
+ @properties['uri']
1065
+ end
1066
+
1067
+ ##
1068
+ # @return [VoiceReceiveMode]
1069
+ def voice_receive_mode
1070
+ @properties['voice_receive_mode']
1071
+ end
1072
+
1073
+ ##
1074
+ # @return [String] The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
1075
+ def voice_application_sid
1076
+ @properties['voice_application_sid']
1077
+ end
1078
+
1079
+ ##
1080
+ # @return [Boolean] Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`.
1081
+ def voice_caller_id_lookup
1082
+ @properties['voice_caller_id_lookup']
1083
+ end
1084
+
1085
+ ##
1086
+ # @return [String] The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
1087
+ def voice_fallback_method
1088
+ @properties['voice_fallback_method']
1089
+ end
1090
+
1091
+ ##
1092
+ # @return [String] The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`.
1093
+ def voice_fallback_url
1094
+ @properties['voice_fallback_url']
1095
+ end
1096
+
1097
+ ##
1098
+ # @return [String] The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
1099
+ def voice_method
1100
+ @properties['voice_method']
1101
+ end
1102
+
1103
+ ##
1104
+ # @return [String] The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set.
1105
+ def voice_url
1106
+ @properties['voice_url']
1107
+ end
1108
+
1109
+ ##
1110
+ # @return [EmergencyStatus]
1111
+ def emergency_status
1112
+ @properties['emergency_status']
1113
+ end
1114
+
1115
+ ##
1116
+ # @return [String] The SID of the emergency address configuration that we use for emergency calling from this phone number.
1117
+ def emergency_address_sid
1118
+ @properties['emergency_address_sid']
1119
+ end
1120
+
1121
+ ##
1122
+ # @return [EmergencyAddressStatus]
1123
+ def emergency_address_status
1124
+ @properties['emergency_address_status']
1125
+ end
1126
+
1127
+ ##
1128
+ # @return [String] The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
1129
+ def bundle_sid
1130
+ @properties['bundle_sid']
1131
+ end
1132
+
1133
+ ##
1134
+ # @return [String]
1135
+ def status
1136
+ @properties['status']
1137
+ end
1138
+
1139
+ ##
1140
+ # @return [String] The phone number type.
1141
+ def type
1142
+ @properties['type']
1143
+ end
1144
+
1145
+ ##
1146
+ # Delete the IncomingPhoneNumberInstance
1147
+ # @return [Boolean] True if delete succeeds, false otherwise
1148
+ def delete
1149
+
1150
+ context.delete
1151
+ end
1152
+
1153
+ ##
1154
+ # Fetch the IncomingPhoneNumberInstance
1155
+ # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
1156
+ def fetch
1157
+
1158
+ context.fetch
1159
+ end
1160
+
1161
+ ##
1162
+ # Update the IncomingPhoneNumberInstance
1163
+ # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
1164
+ # @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
1165
+ # @param [String] friendly_name A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
1166
+ # @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
1167
+ # @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
1168
+ # @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
1169
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
1170
+ # @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
1171
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
1172
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
1173
+ # @param [String] voice_application_sid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
1174
+ # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
1175
+ # @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
1176
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
1177
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
1178
+ # @param [String] voice_url The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
1179
+ # @param [EmergencyStatus] emergency_status
1180
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
1181
+ # @param [String] trunk_sid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
1182
+ # @param [VoiceReceiveMode] voice_receive_mode
1183
+ # @param [String] identity_sid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
1184
+ # @param [String] address_sid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
1185
+ # @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
1186
+ # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
1187
+ def update(
1188
+ account_sid: :unset,
1189
+ api_version: :unset,
1190
+ friendly_name: :unset,
1191
+ sms_application_sid: :unset,
1192
+ sms_fallback_method: :unset,
1193
+ sms_fallback_url: :unset,
1194
+ sms_method: :unset,
1195
+ sms_url: :unset,
1196
+ status_callback: :unset,
1197
+ status_callback_method: :unset,
1198
+ voice_application_sid: :unset,
1199
+ voice_caller_id_lookup: :unset,
1200
+ voice_fallback_method: :unset,
1201
+ voice_fallback_url: :unset,
1202
+ voice_method: :unset,
1203
+ voice_url: :unset,
1204
+ emergency_status: :unset,
1205
+ emergency_address_sid: :unset,
1206
+ trunk_sid: :unset,
1207
+ voice_receive_mode: :unset,
1208
+ identity_sid: :unset,
1209
+ address_sid: :unset,
1210
+ bundle_sid: :unset
1211
+ )
1212
+
1213
+ context.update(
1214
+ account_sid: account_sid,
1215
+ api_version: api_version,
1216
+ friendly_name: friendly_name,
1217
+ sms_application_sid: sms_application_sid,
1218
+ sms_fallback_method: sms_fallback_method,
1219
+ sms_fallback_url: sms_fallback_url,
1220
+ sms_method: sms_method,
1221
+ sms_url: sms_url,
1222
+ status_callback: status_callback,
1223
+ status_callback_method: status_callback_method,
1224
+ voice_application_sid: voice_application_sid,
1225
+ voice_caller_id_lookup: voice_caller_id_lookup,
1226
+ voice_fallback_method: voice_fallback_method,
1227
+ voice_fallback_url: voice_fallback_url,
1228
+ voice_method: voice_method,
1229
+ voice_url: voice_url,
1230
+ emergency_status: emergency_status,
1231
+ emergency_address_sid: emergency_address_sid,
1232
+ trunk_sid: trunk_sid,
1233
+ voice_receive_mode: voice_receive_mode,
1234
+ identity_sid: identity_sid,
1235
+ address_sid: address_sid,
1236
+ bundle_sid: bundle_sid,
1237
+ )
1238
+ end
1239
+
1240
+ ##
1241
+ # Access the assigned_add_ons
1242
+ # @return [assigned_add_ons] assigned_add_ons
1243
+ def assigned_add_ons
1244
+ context.assigned_add_ons
1245
+ end
1246
+
1247
+ ##
1248
+ # Provide a user friendly representation
1249
+ def to_s
1250
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
1251
+ "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
1252
+ end
1253
+
1254
+ ##
1255
+ # Provide a detailed, user friendly representation
1256
+ def inspect
1257
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
1258
+ "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
1259
+ end
1260
+ end
1261
+
1262
+ end
897
1263
  end
898
- end
899
1264
  end
900
- end
901
1265
  end
902
- end
903
- end
1266
+ end
1267
+
1268
+