twilio-ruby 5.77.0 → 7.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (728) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +11 -1
  3. data/.gitignore +3 -0
  4. data/CHANGES.md +722 -0
  5. data/CONTRIBUTING.md +10 -2
  6. data/Gemfile +3 -0
  7. data/LICENSE +1 -1
  8. data/Makefile +6 -0
  9. data/README.md +15 -9
  10. data/UPGRADE.md +21 -0
  11. data/cluster_spec.rb +77 -0
  12. data/lib/twilio-ruby/base/client_base.rb +124 -0
  13. data/lib/twilio-ruby/framework/request.rb +8 -1
  14. data/lib/twilio-ruby/framework/rest/error.rb +0 -12
  15. data/lib/twilio-ruby/http/http_client.rb +13 -5
  16. data/lib/twilio-ruby/jwt/access_token.rb +0 -59
  17. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +201 -178
  18. data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +133 -0
  19. data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +133 -0
  20. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +380 -332
  21. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +380 -332
  22. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +122 -114
  23. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +176 -0
  24. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +219 -192
  25. data/lib/twilio-ruby/rest/accounts/v1.rb +63 -42
  26. data/lib/twilio-ruby/rest/accounts.rb +4 -34
  27. data/lib/twilio-ruby/rest/accounts_base.rb +38 -0
  28. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +371 -365
  29. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +560 -530
  30. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +624 -605
  31. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +316 -320
  32. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +395 -0
  33. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +395 -0
  34. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +395 -0
  35. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +395 -0
  36. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +395 -0
  37. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +395 -0
  38. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +395 -0
  39. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +435 -0
  40. data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +139 -118
  41. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +203 -194
  42. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +403 -417
  43. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +294 -342
  44. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +503 -511
  45. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +844 -641
  46. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +844 -641
  47. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +307 -0
  48. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +159 -153
  49. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +233 -240
  50. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +955 -1050
  51. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +668 -756
  52. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +458 -458
  53. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +494 -493
  54. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +433 -407
  55. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +323 -352
  56. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +403 -418
  57. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +539 -554
  58. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +539 -553
  59. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +539 -553
  60. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +850 -903
  61. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +342 -302
  62. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +170 -166
  63. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +345 -350
  64. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +624 -641
  65. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +160 -138
  66. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +160 -138
  67. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +403 -399
  68. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +375 -358
  69. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +345 -338
  70. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +435 -390
  71. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +200 -0
  72. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +384 -380
  73. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +373 -385
  74. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +369 -372
  75. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +512 -513
  76. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +422 -408
  77. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +342 -306
  78. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +384 -368
  79. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +408 -373
  80. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +353 -0
  81. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb +353 -0
  82. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +141 -0
  83. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb +353 -0
  84. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +127 -0
  85. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +95 -103
  86. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +346 -339
  87. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +346 -338
  88. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +658 -645
  89. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +421 -421
  90. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +408 -374
  91. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +142 -150
  92. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +174 -154
  93. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +369 -350
  94. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +315 -339
  95. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +315 -339
  96. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +315 -339
  97. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +315 -339
  98. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +315 -339
  99. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +315 -339
  100. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +315 -339
  101. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +315 -339
  102. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +382 -416
  103. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +494 -484
  104. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +113 -104
  105. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +175 -161
  106. data/lib/twilio-ruby/rest/api/v2010/account.rb +986 -943
  107. data/lib/twilio-ruby/rest/api/v2010.rb +126 -148
  108. data/lib/twilio-ruby/rest/api.rb +25 -34
  109. data/lib/twilio-ruby/rest/api_base.rb +38 -0
  110. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +355 -0
  111. data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +362 -0
  112. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +303 -0
  113. data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +201 -0
  114. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +668 -0
  115. data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +229 -0
  116. data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +209 -0
  117. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +591 -0
  118. data/lib/twilio-ruby/rest/assistants/v1/policy.rb +264 -0
  119. data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +264 -0
  120. data/lib/twilio-ruby/rest/assistants/v1/session.rb +328 -0
  121. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +586 -0
  122. data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
  123. data/lib/twilio-ruby/rest/assistants.rb +6 -0
  124. data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
  125. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +302 -279
  126. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +301 -279
  127. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +276 -248
  128. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +249 -235
  129. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +248 -216
  130. data/lib/twilio-ruby/rest/bulkexports/v1.rb +57 -55
  131. data/lib/twilio-ruby/rest/bulkexports.rb +3 -34
  132. data/lib/twilio-ruby/rest/bulkexports_base.rb +38 -0
  133. data/lib/twilio-ruby/rest/chat/v1/credential.rb +428 -403
  134. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +381 -391
  135. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +431 -440
  136. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +447 -437
  137. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +543 -515
  138. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +405 -367
  139. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +245 -239
  140. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +474 -440
  141. data/lib/twilio-ruby/rest/chat/v1/service.rb +870 -894
  142. data/lib/twilio-ruby/rest/chat/v1.rb +57 -55
  143. data/lib/twilio-ruby/rest/chat/v2/credential.rb +428 -401
  144. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +376 -370
  145. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +381 -386
  146. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +492 -527
  147. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +519 -533
  148. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +449 -467
  149. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +612 -605
  150. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +405 -369
  151. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +369 -381
  152. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +412 -419
  153. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +516 -491
  154. data/lib/twilio-ruby/rest/chat/v2/service.rb +773 -778
  155. data/lib/twilio-ruby/rest/chat/v2.rb +57 -53
  156. data/lib/twilio-ruby/rest/chat/v3/channel.rb +291 -267
  157. data/lib/twilio-ruby/rest/chat/v3.rb +64 -41
  158. data/lib/twilio-ruby/rest/chat.rb +4 -48
  159. data/lib/twilio-ruby/rest/chat_base.rb +48 -0
  160. data/lib/twilio-ruby/rest/client.rb +333 -584
  161. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +185 -0
  162. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +202 -188
  163. data/lib/twilio-ruby/rest/content/v1/content.rb +941 -336
  164. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +244 -232
  165. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +258 -246
  166. data/lib/twilio-ruby/rest/content/v1.rb +54 -52
  167. data/lib/twilio-ruby/rest/content/v2/content.rb +316 -0
  168. data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +309 -0
  169. data/lib/twilio-ruby/rest/content/v2.rb +46 -0
  170. data/lib/twilio-ruby/rest/content.rb +2 -46
  171. data/lib/twilio-ruby/rest/content_base.rb +43 -0
  172. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +481 -444
  173. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +259 -227
  174. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +284 -252
  175. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +337 -344
  176. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +543 -510
  177. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +504 -495
  178. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +434 -403
  179. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +626 -590
  180. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +434 -409
  181. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +305 -304
  182. data/lib/twilio-ruby/rest/conversations/v1/role.rb +393 -356
  183. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +369 -373
  184. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +305 -289
  185. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +251 -235
  186. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +312 -279
  187. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +344 -371
  188. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +550 -550
  189. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +513 -530
  190. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +443 -438
  191. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +638 -626
  192. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +311 -317
  193. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +405 -380
  194. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +453 -455
  195. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +490 -474
  196. data/lib/twilio-ruby/rest/conversations/v1/service.rb +483 -447
  197. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +452 -435
  198. data/lib/twilio-ruby/rest/conversations/v1/user.rb +478 -441
  199. data/lib/twilio-ruby/rest/conversations/v1.rb +129 -136
  200. data/lib/twilio-ruby/rest/conversations.rb +9 -34
  201. data/lib/twilio-ruby/rest/conversations_base.rb +38 -0
  202. data/lib/twilio-ruby/rest/events/v1/event_type.rb +319 -288
  203. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +302 -0
  204. data/lib/twilio-ruby/rest/events/v1/schema.rb +230 -218
  205. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +117 -100
  206. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +123 -103
  207. data/lib/twilio-ruby/rest/events/v1/sink.rb +443 -408
  208. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +374 -339
  209. data/lib/twilio-ruby/rest/events/v1/subscription.rb +425 -387
  210. data/lib/twilio-ruby/rest/events/v1.rb +87 -87
  211. data/lib/twilio-ruby/rest/events.rb +5 -34
  212. data/lib/twilio-ruby/rest/events_base.rb +38 -0
  213. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +439 -387
  214. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +372 -330
  215. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +547 -496
  216. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +572 -570
  217. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +321 -306
  218. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +221 -208
  219. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +435 -384
  220. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +350 -303
  221. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +435 -380
  222. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +352 -403
  223. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +209 -190
  224. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +157 -0
  225. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +137 -124
  226. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +188 -166
  227. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +247 -229
  228. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +343 -319
  229. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +404 -398
  230. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +264 -225
  231. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +397 -0
  232. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +446 -0
  233. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +247 -0
  234. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +393 -0
  235. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +386 -0
  236. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +233 -0
  237. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +332 -0
  238. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +256 -0
  239. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +188 -0
  240. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +387 -331
  241. data/lib/twilio-ruby/rest/flex_api/v1.rb +313 -214
  242. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +370 -0
  243. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +145 -127
  244. data/lib/twilio-ruby/rest/flex_api/v2.rb +70 -28
  245. data/lib/twilio-ruby/rest/flex_api.rb +21 -117
  246. data/lib/twilio-ruby/rest/flex_api_base.rb +43 -0
  247. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +247 -227
  248. data/lib/twilio-ruby/rest/frontline_api/v1.rb +42 -38
  249. data/lib/twilio-ruby/rest/frontline_api.rb +2 -34
  250. data/lib/twilio-ruby/rest/frontline_api_base.rb +38 -0
  251. data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
  252. data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
  253. data/lib/twilio-ruby/rest/iam/v1/key.rb +177 -0
  254. data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
  255. data/lib/twilio-ruby/rest/iam.rb +6 -0
  256. data/lib/twilio-ruby/rest/iam_base.rb +38 -0
  257. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +315 -315
  258. data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +353 -0
  259. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +270 -255
  260. data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +242 -225
  261. data/lib/twilio-ruby/rest/insights/v1/call.rb +263 -236
  262. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +534 -439
  263. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +484 -467
  264. data/lib/twilio-ruby/rest/insights/v1/conference.rb +498 -502
  265. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +379 -371
  266. data/lib/twilio-ruby/rest/insights/v1/room.rb +491 -489
  267. data/lib/twilio-ruby/rest/insights/v1/setting.rb +249 -205
  268. data/lib/twilio-ruby/rest/insights/v1.rb +84 -83
  269. data/lib/twilio-ruby/rest/insights.rb +6 -34
  270. data/lib/twilio-ruby/rest/insights_base.rb +38 -0
  271. data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +447 -0
  272. data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +356 -0
  273. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +217 -0
  274. data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +197 -0
  275. data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +358 -0
  276. data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +356 -0
  277. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +517 -0
  278. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +227 -0
  279. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +389 -0
  280. data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +262 -0
  281. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +525 -0
  282. data/lib/twilio-ruby/rest/intelligence/v2.rb +176 -0
  283. data/lib/twilio-ruby/rest/intelligence.rb +6 -0
  284. data/lib/twilio-ruby/rest/intelligence_base.rb +38 -0
  285. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +428 -364
  286. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +381 -359
  287. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +431 -397
  288. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +447 -409
  289. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +543 -488
  290. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +405 -347
  291. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +245 -233
  292. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +474 -418
  293. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +870 -779
  294. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +57 -53
  295. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +428 -364
  296. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +376 -343
  297. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +381 -359
  298. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +492 -451
  299. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +519 -479
  300. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +449 -411
  301. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +612 -555
  302. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +405 -347
  303. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +369 -351
  304. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +404 -384
  305. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +516 -467
  306. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +773 -689
  307. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +57 -53
  308. data/lib/twilio-ruby/rest/ip_messaging.rb +3 -41
  309. data/lib/twilio-ruby/rest/ip_messaging_base.rb +43 -0
  310. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +246 -239
  311. data/lib/twilio-ruby/rest/lookups/v1.rb +42 -39
  312. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +376 -335
  313. data/lib/twilio-ruby/rest/lookups/v2.rb +42 -38
  314. data/lib/twilio-ruby/rest/lookups.rb +2 -41
  315. data/lib/twilio-ruby/rest/lookups_base.rb +43 -0
  316. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +309 -0
  317. data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +336 -0
  318. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +352 -0
  319. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +157 -0
  320. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +465 -0
  321. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +310 -0
  322. data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +199 -0
  323. data/lib/twilio-ruby/rest/marketplace/v1.rb +85 -0
  324. data/lib/twilio-ruby/rest/marketplace.rb +6 -0
  325. data/lib/twilio-ruby/rest/marketplace_base.rb +38 -0
  326. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +124 -119
  327. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +361 -346
  328. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +499 -466
  329. data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +192 -0
  330. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +285 -0
  331. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +282 -232
  332. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +231 -218
  333. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +161 -144
  334. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +209 -210
  335. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +197 -0
  336. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +356 -335
  337. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +370 -0
  338. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +363 -341
  339. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +363 -336
  340. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +613 -521
  341. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +124 -115
  342. data/lib/twilio-ruby/rest/messaging/v1/service.rb +774 -763
  343. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +793 -713
  344. data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +109 -94
  345. data/lib/twilio-ruby/rest/messaging/v1.rb +187 -165
  346. data/lib/twilio-ruby/rest/messaging.rb +10 -53
  347. data/lib/twilio-ruby/rest/messaging_base.rb +38 -0
  348. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +355 -307
  349. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +348 -300
  350. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +202 -185
  351. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +342 -320
  352. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +374 -335
  353. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +367 -328
  354. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +420 -383
  355. data/lib/twilio-ruby/rest/microvisor/v1.rb +87 -85
  356. data/lib/twilio-ruby/rest/microvisor.rb +4 -50
  357. data/lib/twilio-ruby/rest/microvisor_base.rb +38 -0
  358. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +401 -395
  359. data/lib/twilio-ruby/rest/monitor/v1/event.rb +384 -390
  360. data/lib/twilio-ruby/rest/monitor/v1.rb +57 -53
  361. data/lib/twilio-ruby/rest/monitor.rb +3 -34
  362. data/lib/twilio-ruby/rest/monitor_base.rb +38 -0
  363. data/lib/twilio-ruby/rest/notify/v1/credential.rb +428 -408
  364. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +442 -452
  365. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +316 -362
  366. data/lib/twilio-ruby/rest/notify/v1/service.rb +633 -622
  367. data/lib/twilio-ruby/rest/notify/v1.rb +57 -55
  368. data/lib/twilio-ruby/rest/notify.rb +3 -34
  369. data/lib/twilio-ruby/rest/notify_base.rb +38 -0
  370. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +241 -0
  371. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +111 -94
  372. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +294 -0
  373. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +322 -0
  374. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +256 -0
  375. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +149 -0
  376. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +168 -0
  377. data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +273 -0
  378. data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +161 -0
  379. data/lib/twilio-ruby/rest/numbers/v1.rb +148 -28
  380. data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +344 -0
  381. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +408 -0
  382. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +266 -0
  383. data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +277 -0
  384. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +507 -0
  385. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +281 -261
  386. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +329 -298
  387. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +340 -309
  388. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +197 -181
  389. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +613 -607
  390. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +400 -351
  391. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +293 -266
  392. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +342 -307
  393. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +428 -371
  394. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +293 -266
  395. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +178 -181
  396. data/lib/twilio-ruby/rest/numbers/v2.rb +93 -28
  397. data/lib/twilio-ruby/rest/numbers.rb +2 -47
  398. data/lib/twilio-ruby/rest/numbers_base.rb +43 -0
  399. data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +144 -0
  400. data/lib/twilio-ruby/rest/oauth/v1/token.rb +176 -151
  401. data/lib/twilio-ruby/rest/oauth/v1.rb +39 -56
  402. data/lib/twilio-ruby/rest/oauth.rb +3 -65
  403. data/lib/twilio-ruby/rest/oauth_base.rb +38 -0
  404. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +371 -396
  405. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +451 -446
  406. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +617 -625
  407. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +57 -55
  408. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +302 -298
  409. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +326 -309
  410. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +345 -330
  411. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +436 -398
  412. data/lib/twilio-ruby/rest/preview/marketplace.rb +57 -53
  413. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +383 -374
  414. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +448 -399
  415. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +439 -407
  416. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +383 -374
  417. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +424 -398
  418. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +442 -404
  419. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +383 -374
  420. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +424 -398
  421. data/lib/twilio-ruby/rest/preview/sync/service.rb +502 -452
  422. data/lib/twilio-ruby/rest/preview/sync.rb +42 -37
  423. data/lib/twilio-ruby/rest/preview/wireless/command.rb +390 -364
  424. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +455 -398
  425. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +233 -205
  426. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +577 -523
  427. data/lib/twilio-ruby/rest/preview/wireless.rb +72 -69
  428. data/lib/twilio-ruby/rest/preview.rb +11 -79
  429. data/lib/twilio-ruby/rest/preview_base.rb +53 -0
  430. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +300 -275
  431. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +108 -119
  432. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +293 -268
  433. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +108 -119
  434. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +300 -275
  435. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +223 -197
  436. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +122 -135
  437. data/lib/twilio-ruby/rest/pricing/v1.rb +45 -42
  438. data/lib/twilio-ruby/rest/pricing/v2/country.rb +292 -270
  439. data/lib/twilio-ruby/rest/pricing/v2/number.rb +235 -217
  440. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +300 -275
  441. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +241 -220
  442. data/lib/twilio-ruby/rest/pricing/v2/voice.rb +122 -138
  443. data/lib/twilio-ruby/rest/pricing/v2.rb +63 -65
  444. data/lib/twilio-ruby/rest/pricing.rb +6 -41
  445. data/lib/twilio-ruby/rest/pricing_base.rb +43 -0
  446. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +426 -403
  447. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +411 -418
  448. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +433 -449
  449. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +426 -442
  450. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +529 -506
  451. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +406 -370
  452. data/lib/twilio-ruby/rest/proxy/v1/service.rb +566 -596
  453. data/lib/twilio-ruby/rest/proxy/v1.rb +42 -38
  454. data/lib/twilio-ruby/rest/proxy.rb +2 -34
  455. data/lib/twilio-ruby/rest/proxy_base.rb +38 -0
  456. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +265 -227
  457. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +265 -223
  458. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +265 -227
  459. data/lib/twilio-ruby/rest/routes/v2.rb +72 -69
  460. data/lib/twilio-ruby/rest/routes.rb +4 -34
  461. data/lib/twilio-ruby/rest/routes_base.rb +38 -0
  462. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +316 -323
  463. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +419 -380
  464. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +209 -208
  465. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +412 -384
  466. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +342 -338
  467. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +362 -383
  468. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +410 -396
  469. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +461 -447
  470. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +224 -234
  471. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +343 -353
  472. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +419 -380
  473. data/lib/twilio-ruby/rest/serverless/v1/service.rb +530 -493
  474. data/lib/twilio-ruby/rest/serverless/v1.rb +42 -37
  475. data/lib/twilio-ruby/rest/serverless.rb +2 -34
  476. data/lib/twilio-ruby/rest/serverless_base.rb +38 -0
  477. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +209 -199
  478. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +224 -218
  479. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +364 -355
  480. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +429 -394
  481. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +209 -200
  482. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +224 -221
  483. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +364 -361
  484. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +477 -449
  485. data/lib/twilio-ruby/rest/studio/v1/flow.rb +385 -355
  486. data/lib/twilio-ruby/rest/studio/v1.rb +42 -37
  487. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +209 -200
  488. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +224 -221
  489. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +364 -361
  490. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +470 -442
  491. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +344 -320
  492. data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +237 -0
  493. data/lib/twilio-ruby/rest/studio/v2/flow.rb +528 -472
  494. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +124 -99
  495. data/lib/twilio-ruby/rest/studio/v2.rb +48 -44
  496. data/lib/twilio-ruby/rest/studio.rb +3 -41
  497. data/lib/twilio-ruby/rest/studio_base.rb +43 -0
  498. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +396 -382
  499. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +477 -483
  500. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +401 -409
  501. data/lib/twilio-ruby/rest/supersim/v1/network.rb +303 -297
  502. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +342 -332
  503. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +385 -351
  504. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -237
  505. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +243 -224
  506. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +201 -188
  507. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +465 -453
  508. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +361 -361
  509. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +306 -344
  510. data/lib/twilio-ruby/rest/supersim/v1.rb +144 -147
  511. data/lib/twilio-ruby/rest/supersim.rb +10 -34
  512. data/lib/twilio-ruby/rest/supersim_base.rb +38 -0
  513. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +383 -371
  514. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +464 -423
  515. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +473 -490
  516. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +383 -370
  517. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +479 -445
  518. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +476 -495
  519. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +383 -368
  520. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +479 -444
  521. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +142 -132
  522. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +428 -400
  523. data/lib/twilio-ruby/rest/sync/v1/service.rb +584 -567
  524. data/lib/twilio-ruby/rest/sync/v1.rb +42 -37
  525. data/lib/twilio-ruby/rest/sync.rb +2 -34
  526. data/lib/twilio-ruby/rest/sync_base.rb +38 -0
  527. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +414 -395
  528. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +445 -464
  529. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +709 -749
  530. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +659 -661
  531. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +418 -382
  532. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +164 -0
  533. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +362 -369
  534. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +282 -275
  535. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +233 -236
  536. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +240 -258
  537. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +583 -572
  538. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +691 -732
  539. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +394 -388
  540. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +238 -239
  541. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +284 -265
  542. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +218 -193
  543. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +254 -234
  544. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +630 -637
  545. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +362 -375
  546. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +248 -241
  547. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +233 -244
  548. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +532 -510
  549. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +356 -356
  550. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +234 -206
  551. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +244 -234
  552. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +729 -730
  553. data/lib/twilio-ruby/rest/taskrouter/v1.rb +42 -37
  554. data/lib/twilio-ruby/rest/taskrouter.rb +2 -34
  555. data/lib/twilio-ruby/rest/taskrouter_base.rb +38 -0
  556. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +349 -320
  557. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +349 -317
  558. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +449 -419
  559. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +482 -451
  560. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +229 -191
  561. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +632 -630
  562. data/lib/twilio-ruby/rest/trunking/v1.rb +42 -38
  563. data/lib/twilio-ruby/rest/trunking.rb +2 -34
  564. data/lib/twilio-ruby/rest/trunking_base.rb +38 -0
  565. data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +249 -0
  566. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +357 -0
  567. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +220 -0
  568. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +364 -352
  569. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +348 -323
  570. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +338 -321
  571. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +541 -513
  572. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +392 -346
  573. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +285 -261
  574. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +278 -252
  575. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +406 -359
  576. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +285 -261
  577. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +364 -352
  578. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +348 -323
  579. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +338 -321
  580. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +541 -513
  581. data/lib/twilio-ruby/rest/trusthub/v1.rb +168 -139
  582. data/lib/twilio-ruby/rest/trusthub.rb +8 -34
  583. data/lib/twilio-ruby/rest/trusthub_base.rb +38 -0
  584. data/lib/twilio-ruby/rest/verify/v2/form.rb +196 -183
  585. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +228 -207
  586. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +277 -254
  587. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +194 -192
  588. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +503 -531
  589. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +454 -453
  590. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +252 -283
  591. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +429 -414
  592. data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +388 -363
  593. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +410 -388
  594. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +429 -384
  595. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +390 -372
  596. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +224 -205
  597. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +456 -412
  598. data/lib/twilio-ruby/rest/verify/v2/service.rb +816 -780
  599. data/lib/twilio-ruby/rest/verify/v2/template.rb +222 -205
  600. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +375 -387
  601. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +242 -226
  602. data/lib/twilio-ruby/rest/verify/v2.rb +99 -103
  603. data/lib/twilio-ruby/rest/verify.rb +7 -34
  604. data/lib/twilio-ruby/rest/verify_base.rb +38 -0
  605. data/lib/twilio-ruby/rest/video/v1/composition.rb +484 -507
  606. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +534 -647
  607. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +286 -261
  608. data/lib/twilio-ruby/rest/video/v1/recording.rb +431 -426
  609. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +286 -261
  610. data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +262 -0
  611. data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +334 -0
  612. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +186 -0
  613. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +341 -0
  614. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +503 -0
  615. data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +175 -0
  616. data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +428 -0
  617. data/lib/twilio-ruby/rest/video/v1/room.rb +613 -602
  618. data/lib/twilio-ruby/rest/video/v1.rb +99 -99
  619. data/lib/twilio-ruby/rest/video.rb +7 -34
  620. data/lib/twilio-ruby/rest/video_base.rb +38 -0
  621. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +161 -176
  622. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +510 -486
  623. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +449 -434
  624. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +400 -352
  625. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +138 -121
  626. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +196 -183
  627. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +376 -397
  628. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +220 -190
  629. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +123 -121
  630. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +386 -339
  631. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +369 -319
  632. data/lib/twilio-ruby/rest/voice/v1.rb +130 -117
  633. data/lib/twilio-ruby/rest/voice.rb +7 -34
  634. data/lib/twilio-ruby/rest/voice_base.rb +38 -0
  635. data/lib/twilio-ruby/rest/wireless/v1/command.rb +415 -406
  636. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +472 -436
  637. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +299 -284
  638. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +240 -243
  639. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +641 -647
  640. data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +227 -221
  641. data/lib/twilio-ruby/rest/wireless/v1.rb +78 -76
  642. data/lib/twilio-ruby/rest/wireless.rb +5 -34
  643. data/lib/twilio-ruby/rest/wireless_base.rb +38 -0
  644. data/lib/twilio-ruby/rest.rb +1 -0
  645. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  646. data/lib/twilio-ruby/twiml/voice_response.rb +97 -18
  647. data/lib/twilio-ruby/version.rb +1 -1
  648. data/sonar-project.properties +1 -1
  649. data/twilio-ruby.gemspec +2 -1
  650. metadata +148 -80
  651. data/conf/cacert.pem +0 -3376
  652. data/lib/twilio-ruby/framework/twilio_response.rb +0 -19
  653. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +0 -500
  654. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +0 -500
  655. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +0 -500
  656. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +0 -500
  657. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +0 -500
  658. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +0 -500
  659. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +0 -500
  660. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -464
  661. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -301
  662. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -314
  663. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +0 -348
  664. 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
  665. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +0 -163
  666. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +0 -348
  667. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +0 -137
  668. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -220
  669. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -214
  670. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -399
  671. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -418
  672. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -392
  673. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -469
  674. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -218
  675. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -386
  676. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -456
  677. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -255
  678. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -237
  679. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -507
  680. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -420
  681. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -650
  682. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -194
  683. data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -52
  684. data/lib/twilio-ruby/rest/autopilot.rb +0 -53
  685. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +0 -290
  686. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +0 -144
  687. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +0 -321
  688. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +0 -397
  689. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -399
  690. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +0 -221
  691. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +0 -403
  692. data/lib/twilio-ruby/rest/media/v1.rb +0 -76
  693. data/lib/twilio-ruby/rest/media.rb +0 -65
  694. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +0 -164
  695. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +0 -257
  696. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +0 -153
  697. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +0 -162
  698. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +0 -242
  699. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +0 -193
  700. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -382
  701. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -365
  702. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -425
  703. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -376
  704. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -469
  705. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -45
  706. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -212
  707. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -212
  708. data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -206
  709. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -386
  710. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -407
  711. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -380
  712. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -437
  713. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -212
  714. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
  715. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -428
  716. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -241
  717. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -225
  718. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -495
  719. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -629
  720. data/lib/twilio-ruby/rest/preview/understand.rb +0 -45
  721. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +0 -199
  722. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -413
  723. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +0 -240
  724. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +0 -335
  725. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -175
  726. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +0 -340
  727. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +0 -499
  728. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -144
@@ -1,910 +1,857 @@
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 parameter
203
- # displays if emergency calling is enabled for this number. Active numbers may
204
- # place emergency calls by dialing valid emergency numbers for the country.
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 parameter
391
- # displays if emergency calling is enabled for this number. Active numbers may
392
- # place emergency calls by dialing valid emergency numbers for the country.
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
- 'emergency_address_status' => payload['emergency_address_status'],
554
- 'bundle_sid' => payload['bundle_sid'],
555
- 'status' => payload['status'],
556
- }
557
-
558
- # Context
559
- @instance_context = nil
560
- @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
561
- end
562
-
563
- ##
564
- # Generate an instance context for the instance, the context is capable of
565
- # performing various actions. All instance actions are proxied to the context
566
- # @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext for this IncomingPhoneNumberInstance
567
- def context
568
- unless @instance_context
569
- @instance_context = IncomingPhoneNumberContext.new(@version, @params['account_sid'], @params['sid'], )
570
- end
571
- @instance_context
572
- end
573
-
574
- ##
575
- # @return [String] The SID of the Account that created the resource
576
- def account_sid
577
- @properties['account_sid']
578
- end
579
-
580
- ##
581
- # @return [String] The SID of the Address resource associated with the phone number
582
- def address_sid
583
- @properties['address_sid']
584
- end
585
-
586
- ##
587
- # @return [incoming_phone_number.AddressRequirement] Whether the phone number requires an Address registered with Twilio.
588
- def address_requirements
589
- @properties['address_requirements']
590
- end
591
-
592
- ##
593
- # @return [String] The API version used to start a new TwiML session
594
- def api_version
595
- @properties['api_version']
596
- end
597
-
598
- ##
599
- # @return [Boolean] Whether the phone number is new to the Twilio platform
600
- def beta
601
- @properties['beta']
602
- end
603
-
604
- ##
605
- # @return [String] Indicate if a phone can receive calls or messages
606
- def capabilities
607
- @properties['capabilities']
608
- end
609
-
610
- ##
611
- # @return [Time] The RFC 2822 date and time in GMT that the resource was created
612
- def date_created
613
- @properties['date_created']
614
- end
615
-
616
- ##
617
- # @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
618
- def date_updated
619
- @properties['date_updated']
620
- end
621
-
622
- ##
623
- # @return [String] The string that you assigned to describe the resource
624
- def friendly_name
625
- @properties['friendly_name']
626
- end
627
-
628
- ##
629
- # @return [String] The SID of the Identity resource associated with number
630
- def identity_sid
631
- @properties['identity_sid']
632
- end
633
-
634
- ##
635
- # @return [String] The phone number in E.164 format
636
- def phone_number
637
- @properties['phone_number']
638
- end
639
-
640
- ##
641
- # @return [String] The phone number's origin. Can be twilio or hosted.
642
- def origin
643
- @properties['origin']
644
- end
645
-
646
- ##
647
- # @return [String] The unique string that identifies the resource
648
- def sid
649
- @properties['sid']
650
- end
651
-
652
- ##
653
- # @return [String] The SID of the application that handles SMS messages sent to the phone number
654
- def sms_application_sid
655
- @properties['sms_application_sid']
656
- end
657
-
658
- ##
659
- # @return [String] The HTTP method used with sms_fallback_url
660
- def sms_fallback_method
661
- @properties['sms_fallback_method']
662
- end
663
-
664
- ##
665
- # @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML
666
- def sms_fallback_url
667
- @properties['sms_fallback_url']
668
- end
669
-
670
- ##
671
- # @return [String] The HTTP method to use with sms_url
672
- def sms_method
673
- @properties['sms_method']
674
- end
675
-
676
- ##
677
- # @return [String] The URL we call when the phone number receives an incoming SMS message
678
- def sms_url
679
- @properties['sms_url']
680
- end
681
-
682
- ##
683
- # @return [String] The URL to send status information to your application
684
- def status_callback
685
- @properties['status_callback']
686
- end
687
-
688
- ##
689
- # @return [String] The HTTP method we use to call status_callback
690
- def status_callback_method
691
- @properties['status_callback_method']
692
- end
693
-
694
- ##
695
- # @return [String] The SID of the Trunk that handles calls to the phone number
696
- def trunk_sid
697
- @properties['trunk_sid']
698
- end
699
-
700
- ##
701
- # @return [String] The URI of the resource, relative to `https://api.twilio.com`
702
- def uri
703
- @properties['uri']
704
- end
705
-
706
- ##
707
- # @return [incoming_phone_number.VoiceReceiveMode] The voice_receive_mode
708
- def voice_receive_mode
709
- @properties['voice_receive_mode']
710
- end
711
-
712
- ##
713
- # @return [String] The SID of the application that handles calls to the phone number
714
- def voice_application_sid
715
- @properties['voice_application_sid']
716
- end
717
-
718
- ##
719
- # @return [Boolean] Whether to lookup the caller's name
720
- def voice_caller_id_lookup
721
- @properties['voice_caller_id_lookup']
722
- end
723
-
724
- ##
725
- # @return [String] The HTTP method used with voice_fallback_url
726
- def voice_fallback_method
727
- @properties['voice_fallback_method']
728
- end
729
-
730
- ##
731
- # @return [String] The URL we call when an error occurs in TwiML
732
- def voice_fallback_url
733
- @properties['voice_fallback_url']
734
- end
735
-
736
- ##
737
- # @return [String] The HTTP method used with the voice_url
738
- def voice_method
739
- @properties['voice_method']
740
- end
741
-
742
- ##
743
- # @return [String] The URL we call when the phone number receives a call
744
- def voice_url
745
- @properties['voice_url']
746
- end
747
-
748
- ##
749
- # @return [incoming_phone_number.EmergencyStatus] Displays if emergency calling is enabled for this number.
750
- def emergency_status
751
- @properties['emergency_status']
752
- end
753
-
754
- ##
755
- # @return [String] The emergency address configuration to use for emergency calling
756
- def emergency_address_sid
757
- @properties['emergency_address_sid']
758
- end
759
-
760
- ##
761
- # @return [incoming_phone_number.EmergencyAddressStatus] State of the emergency address configuration for the phone number
762
- def emergency_address_status
763
- @properties['emergency_address_status']
764
- end
765
-
766
- ##
767
- # @return [String] The SID of the Bundle resource associated with number
768
- def bundle_sid
769
- @properties['bundle_sid']
770
- end
771
-
772
- ##
773
- # @return [String] The status
774
- def status
775
- @properties['status']
776
- end
777
-
778
- ##
779
- # Update the IncomingPhoneNumberInstance
780
- # @param [String] account_sid The SID of the
781
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created the
782
- # IncomingPhoneNumber resource to update. For more information, see {Exchanging
783
- # Numbers Between
784
- # Subaccounts}[https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers].
785
- # @param [String] api_version The API version to use for incoming calls made to
786
- # the phone number. The default is `2010-04-01`.
787
- # @param [String] friendly_name A descriptive string that you created to describe
788
- # this phone number. It can be up to 64 characters long. By default, this is a
789
- # formatted version of the phone number.
790
- # @param [String] sms_application_sid The SID of the application that should
791
- # handle SMS messages sent to the number. If an `sms_application_sid` is present,
792
- # we ignore all of the `sms_*_url` urls and use those set on the application.
793
- # @param [String] sms_fallback_method The HTTP method that we should use to call
794
- # `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
795
- # @param [String] sms_fallback_url The URL that we should call when an error
796
- # occurs while requesting or executing the TwiML defined by `sms_url`.
797
- # @param [String] sms_method The HTTP method that we should use to call `sms_url`.
798
- # Can be: `GET` or `POST` and defaults to `POST`.
799
- # @param [String] sms_url The URL we should call when the phone number receives an
800
- # incoming SMS message.
801
- # @param [String] status_callback The URL we should call using the
802
- # `status_callback_method` to send status information to your application.
803
- # @param [String] status_callback_method The HTTP method we should use to call
804
- # `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
805
- # @param [String] voice_application_sid The SID of the application we should use
806
- # to handle phone calls to the phone number. If a `voice_application_sid` is
807
- # present, we ignore all of the voice urls and use only those set on the
808
- # application. Setting a `voice_application_sid` will automatically delete your
809
- # `trunk_sid` and vice versa.
810
- # @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
811
- # the CNAM database and post it to your app. Can be: `true` or `false` and
812
- # defaults to `false`.
813
- # @param [String] voice_fallback_method The HTTP method that we should use to call
814
- # `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
815
- # @param [String] voice_fallback_url The URL that we should call when an error
816
- # occurs retrieving or executing the TwiML requested by `url`.
817
- # @param [String] voice_method The HTTP method that we should use to call
818
- # `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
819
- # @param [String] voice_url The URL that we should call to answer a call to the
820
- # phone number. The `voice_url` will not be called if a `voice_application_sid` or
821
- # a `trunk_sid` is set.
822
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
823
- # displays if emergency calling is enabled for this number. Active numbers may
824
- # place emergency calls by dialing valid emergency numbers for the country.
825
- # @param [String] emergency_address_sid The SID of the emergency address
826
- # configuration to use for emergency calling from this phone number.
827
- # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
828
- # calls to the phone number. If a `trunk_sid` is present, we ignore all of the
829
- # voice urls and voice applications and use only those set on the Trunk. Setting a
830
- # `trunk_sid` will automatically delete your `voice_application_sid` and vice
831
- # versa.
832
- # @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
833
- # configuration parameter for the phone number to receive incoming voice calls or
834
- # faxes. Can be: `fax` or `voice` and defaults to `voice`.
835
- # @param [String] identity_sid The SID of the Identity resource that we should
836
- # associate with the phone number. Some regions require an identity to meet local
837
- # regulations.
838
- # @param [String] address_sid The SID of the Address resource we should associate
839
- # with the phone number. Some regions require addresses to meet local regulations.
840
- # @param [String] bundle_sid The SID of the Bundle resource that you associate
841
- # with the phone number. Some regions require a Bundle to meet local Regulations.
842
- # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
843
- 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)
844
- context.update(
845
- account_sid: account_sid,
846
- api_version: api_version,
847
- friendly_name: friendly_name,
848
- sms_application_sid: sms_application_sid,
849
- sms_fallback_method: sms_fallback_method,
850
- sms_fallback_url: sms_fallback_url,
851
- sms_method: sms_method,
852
- sms_url: sms_url,
853
- status_callback: status_callback,
854
- status_callback_method: status_callback_method,
855
- voice_application_sid: voice_application_sid,
856
- voice_caller_id_lookup: voice_caller_id_lookup,
857
- voice_fallback_method: voice_fallback_method,
858
- voice_fallback_url: voice_fallback_url,
859
- voice_method: voice_method,
860
- voice_url: voice_url,
861
- emergency_status: emergency_status,
862
- emergency_address_sid: emergency_address_sid,
863
- trunk_sid: trunk_sid,
864
- voice_receive_mode: voice_receive_mode,
865
- identity_sid: identity_sid,
866
- address_sid: address_sid,
867
- bundle_sid: bundle_sid,
868
- )
869
- end
870
-
871
- ##
872
- # Fetch the IncomingPhoneNumberInstance
873
- # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
874
- def fetch
875
- context.fetch
876
- end
877
-
878
- ##
879
- # Delete the IncomingPhoneNumberInstance
880
- # @return [Boolean] true if delete succeeds, false otherwise
881
- def delete
882
- context.delete
883
- end
884
-
885
- ##
886
- # Access the assigned_add_ons
887
- # @return [assigned_add_ons] assigned_add_ons
888
- def assigned_add_ons
889
- context.assigned_add_ons
890
- end
891
14
 
892
- ##
893
- # Provide a user friendly representation
894
- def to_s
895
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
896
- "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
897
- end
898
15
 
899
- ##
900
- # Provide a detailed, user friendly representation
901
- def inspect
902
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
903
- "<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
+ # Path Solution
31
+ @solution = { account_sid: account_sid }
32
+ @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers.json"
33
+ # Components
34
+ @toll_free = nil
35
+ @local = nil
36
+ @mobile = nil
37
+ end
38
+ ##
39
+ # Create the IncomingPhoneNumberInstance
40
+ # @param [String] api_version The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
41
+ # @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.
42
+ # @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.
43
+ # @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`.
44
+ # @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`.
45
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
46
+ # @param [String] sms_url The URL we should call when the new phone number receives an incoming SMS message.
47
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
48
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
49
+ # @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.
50
+ # @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`.
51
+ # @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`.
52
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
53
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
54
+ # @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.
55
+ # @param [EmergencyStatus] emergency_status
56
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from the new phone number.
57
+ # @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.
58
+ # @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.
59
+ # @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.
60
+ # @param [VoiceReceiveMode] voice_receive_mode
61
+ # @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.
62
+ # @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.
63
+ # @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).
64
+ # @return [IncomingPhoneNumberInstance] Created IncomingPhoneNumberInstance
65
+ def create(
66
+ api_version: :unset,
67
+ friendly_name: :unset,
68
+ sms_application_sid: :unset,
69
+ sms_fallback_method: :unset,
70
+ sms_fallback_url: :unset,
71
+ sms_method: :unset,
72
+ sms_url: :unset,
73
+ status_callback: :unset,
74
+ status_callback_method: :unset,
75
+ voice_application_sid: :unset,
76
+ voice_caller_id_lookup: :unset,
77
+ voice_fallback_method: :unset,
78
+ voice_fallback_url: :unset,
79
+ voice_method: :unset,
80
+ voice_url: :unset,
81
+ emergency_status: :unset,
82
+ emergency_address_sid: :unset,
83
+ trunk_sid: :unset,
84
+ identity_sid: :unset,
85
+ address_sid: :unset,
86
+ voice_receive_mode: :unset,
87
+ bundle_sid: :unset,
88
+ phone_number: :unset,
89
+ area_code: :unset
90
+ )
91
+
92
+ data = Twilio::Values.of({
93
+ 'ApiVersion' => api_version,
94
+ 'FriendlyName' => friendly_name,
95
+ 'SmsApplicationSid' => sms_application_sid,
96
+ 'SmsFallbackMethod' => sms_fallback_method,
97
+ 'SmsFallbackUrl' => sms_fallback_url,
98
+ 'SmsMethod' => sms_method,
99
+ 'SmsUrl' => sms_url,
100
+ 'StatusCallback' => status_callback,
101
+ 'StatusCallbackMethod' => status_callback_method,
102
+ 'VoiceApplicationSid' => voice_application_sid,
103
+ 'VoiceCallerIdLookup' => voice_caller_id_lookup,
104
+ 'VoiceFallbackMethod' => voice_fallback_method,
105
+ 'VoiceFallbackUrl' => voice_fallback_url,
106
+ 'VoiceMethod' => voice_method,
107
+ 'VoiceUrl' => voice_url,
108
+ 'EmergencyStatus' => emergency_status,
109
+ 'EmergencyAddressSid' => emergency_address_sid,
110
+ 'TrunkSid' => trunk_sid,
111
+ 'IdentitySid' => identity_sid,
112
+ 'AddressSid' => address_sid,
113
+ 'VoiceReceiveMode' => voice_receive_mode,
114
+ 'BundleSid' => bundle_sid,
115
+ 'PhoneNumber' => phone_number,
116
+ 'AreaCode' => area_code,
117
+ })
118
+
119
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
120
+
121
+ payload = @version.create('POST', @uri, data: data, headers: headers)
122
+ IncomingPhoneNumberInstance.new(
123
+ @version,
124
+ payload,
125
+ account_sid: @solution[:account_sid],
126
+ )
127
+ end
128
+
129
+
130
+ ##
131
+ # Lists IncomingPhoneNumberInstance records from the API as a list.
132
+ # Unlike stream(), this operation is eager and will load `limit` records into
133
+ # memory before returning.
134
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
135
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
136
+ # @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.
137
+ # @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.
138
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
139
+ # guarantees to never return more than limit. Default is no limit
140
+ # @param [Integer] page_size Number of records to fetch per request, when
141
+ # not set will use the default value of 50 records. If no page_size is defined
142
+ # but a limit is defined, stream() will attempt to read the limit with the most
143
+ # efficient page size, i.e. min(limit, 1000)
144
+ # @return [Array] Array of up to limit results
145
+ def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
146
+ self.stream(
147
+ beta: beta,
148
+ friendly_name: friendly_name,
149
+ phone_number: phone_number,
150
+ origin: origin,
151
+ limit: limit,
152
+ page_size: page_size
153
+ ).entries
154
+ end
155
+
156
+ ##
157
+ # Streams Instance records from the API as an Enumerable.
158
+ # This operation lazily loads records as efficiently as possible until the limit
159
+ # is reached.
160
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
161
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
162
+ # @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.
163
+ # @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.
164
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
165
+ # guarantees to never return more than limit. Default is no limit
166
+ # @param [Integer] page_size Number of records to fetch per request, when
167
+ # not set will use the default value of 50 records. If no page_size is defined
168
+ # but a limit is defined, stream() will attempt to read the limit with the most
169
+ # efficient page size, i.e. min(limit, 1000)
170
+ # @return [Enumerable] Enumerable that will yield up to limit results
171
+ def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
172
+ limits = @version.read_limits(limit, page_size)
173
+
174
+ page = self.page(
175
+ beta: beta,
176
+ friendly_name: friendly_name,
177
+ phone_number: phone_number,
178
+ origin: origin,
179
+ page_size: limits[:page_size], )
180
+
181
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
182
+ end
183
+
184
+ ##
185
+ # When passed a block, yields IncomingPhoneNumberInstance records from the API.
186
+ # This operation lazily loads records as efficiently as possible until the limit
187
+ # is reached.
188
+ def each
189
+ limits = @version.read_limits
190
+
191
+ page = self.page(page_size: limits[:page_size], )
192
+
193
+ @version.stream(page,
194
+ limit: limits[:limit],
195
+ page_limit: limits[:page_limit]).each {|x| yield x}
196
+ end
197
+
198
+ ##
199
+ # Retrieve a single page of IncomingPhoneNumberInstance records from the API.
200
+ # Request is executed immediately.
201
+ # @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
202
+ # @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
203
+ # @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.
204
+ # @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.
205
+ # @param [String] page_token PageToken provided by the API
206
+ # @param [Integer] page_number Page Number, this value is simply for client state
207
+ # @param [Integer] page_size Number of records to return, defaults to 50
208
+ # @return [Page] Page of IncomingPhoneNumberInstance
209
+ def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
210
+ params = Twilio::Values.of({
211
+ 'Beta' => beta,
212
+ 'FriendlyName' => friendly_name,
213
+ 'PhoneNumber' => phone_number,
214
+ 'Origin' => origin,
215
+ 'PageToken' => page_token,
216
+ 'Page' => page_number,
217
+ 'PageSize' => page_size,
218
+ })
219
+
220
+ response = @version.page('GET', @uri, params: params)
221
+
222
+ IncomingPhoneNumberPage.new(@version, response, @solution)
223
+ end
224
+
225
+ ##
226
+ # Retrieve a single page of IncomingPhoneNumberInstance records from the API.
227
+ # Request is executed immediately.
228
+ # @param [String] target_url API-generated URL for the requested results page
229
+ # @return [Page] Page of IncomingPhoneNumberInstance
230
+ def get_page(target_url)
231
+ response = @version.domain.request(
232
+ 'GET',
233
+ target_url
234
+ )
235
+ IncomingPhoneNumberPage.new(@version, response, @solution)
236
+ end
237
+
238
+
239
+ ##
240
+ # Access the toll_free
241
+ # @return [TollFreeList]
242
+ # @return [TollFreeContext]
243
+ def toll_free
244
+ @toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid] )
245
+ end
246
+ ##
247
+ # Access the local
248
+ # @return [LocalList]
249
+ # @return [LocalContext]
250
+ def local
251
+ @local ||= LocalList.new(@version, account_sid: @solution[:account_sid] )
252
+ end
253
+ ##
254
+ # Access the mobile
255
+ # @return [MobileList]
256
+ # @return [MobileContext]
257
+ def mobile
258
+ @mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid] )
259
+ end
260
+
261
+ # Provide a user friendly representation
262
+ def to_s
263
+ '#<Twilio.Api.V2010.IncomingPhoneNumberList>'
264
+ end
265
+ end
266
+
267
+
268
+ class IncomingPhoneNumberContext < InstanceContext
269
+ ##
270
+ # Initialize the IncomingPhoneNumberContext
271
+ # @param [Version] version Version that contains the resource
272
+ # @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).
273
+ # @param [String] sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update.
274
+ # @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext
275
+ def initialize(version, account_sid, sid)
276
+ super(version)
277
+
278
+ # Path Solution
279
+ @solution = { account_sid: account_sid, sid: sid, }
280
+ @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:sid]}.json"
281
+
282
+ # Dependents
283
+ @assigned_add_ons = nil
284
+ end
285
+ ##
286
+ # Delete the IncomingPhoneNumberInstance
287
+ # @return [Boolean] True if delete succeeds, false otherwise
288
+ def delete
289
+
290
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
291
+
292
+ @version.delete('DELETE', @uri, headers: headers)
293
+ end
294
+
295
+ ##
296
+ # Fetch the IncomingPhoneNumberInstance
297
+ # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
298
+ def fetch
299
+
300
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
301
+
302
+ payload = @version.fetch('GET', @uri, headers: headers)
303
+ IncomingPhoneNumberInstance.new(
304
+ @version,
305
+ payload,
306
+ account_sid: @solution[:account_sid],
307
+ sid: @solution[:sid],
308
+ )
309
+ end
310
+
311
+ ##
312
+ # Update the IncomingPhoneNumberInstance
313
+ # @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).
314
+ # @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
315
+ # @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.
316
+ # @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.
317
+ # @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`.
318
+ # @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`.
319
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
320
+ # @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
321
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
322
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
323
+ # @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.
324
+ # @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`.
325
+ # @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`.
326
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
327
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
328
+ # @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.
329
+ # @param [EmergencyStatus] emergency_status
330
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
331
+ # @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.
332
+ # @param [VoiceReceiveMode] voice_receive_mode
333
+ # @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.
334
+ # @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.
335
+ # @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.
336
+ # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
337
+ def update(
338
+ account_sid: :unset,
339
+ api_version: :unset,
340
+ friendly_name: :unset,
341
+ sms_application_sid: :unset,
342
+ sms_fallback_method: :unset,
343
+ sms_fallback_url: :unset,
344
+ sms_method: :unset,
345
+ sms_url: :unset,
346
+ status_callback: :unset,
347
+ status_callback_method: :unset,
348
+ voice_application_sid: :unset,
349
+ voice_caller_id_lookup: :unset,
350
+ voice_fallback_method: :unset,
351
+ voice_fallback_url: :unset,
352
+ voice_method: :unset,
353
+ voice_url: :unset,
354
+ emergency_status: :unset,
355
+ emergency_address_sid: :unset,
356
+ trunk_sid: :unset,
357
+ voice_receive_mode: :unset,
358
+ identity_sid: :unset,
359
+ address_sid: :unset,
360
+ bundle_sid: :unset
361
+ )
362
+
363
+ data = Twilio::Values.of({
364
+ 'AccountSid' => account_sid,
365
+ 'ApiVersion' => api_version,
366
+ 'FriendlyName' => friendly_name,
367
+ 'SmsApplicationSid' => sms_application_sid,
368
+ 'SmsFallbackMethod' => sms_fallback_method,
369
+ 'SmsFallbackUrl' => sms_fallback_url,
370
+ 'SmsMethod' => sms_method,
371
+ 'SmsUrl' => sms_url,
372
+ 'StatusCallback' => status_callback,
373
+ 'StatusCallbackMethod' => status_callback_method,
374
+ 'VoiceApplicationSid' => voice_application_sid,
375
+ 'VoiceCallerIdLookup' => voice_caller_id_lookup,
376
+ 'VoiceFallbackMethod' => voice_fallback_method,
377
+ 'VoiceFallbackUrl' => voice_fallback_url,
378
+ 'VoiceMethod' => voice_method,
379
+ 'VoiceUrl' => voice_url,
380
+ 'EmergencyStatus' => emergency_status,
381
+ 'EmergencyAddressSid' => emergency_address_sid,
382
+ 'TrunkSid' => trunk_sid,
383
+ 'VoiceReceiveMode' => voice_receive_mode,
384
+ 'IdentitySid' => identity_sid,
385
+ 'AddressSid' => address_sid,
386
+ 'BundleSid' => bundle_sid,
387
+ })
388
+
389
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
390
+
391
+ payload = @version.update('POST', @uri, data: data, headers: headers)
392
+ IncomingPhoneNumberInstance.new(
393
+ @version,
394
+ payload,
395
+ account_sid: @solution[:account_sid],
396
+ sid: @solution[:sid],
397
+ )
398
+ end
399
+
400
+ ##
401
+ # Access the assigned_add_ons
402
+ # @return [AssignedAddOnList]
403
+ # @return [AssignedAddOnContext] if sid was passed.
404
+ def assigned_add_ons(sid=:unset)
405
+
406
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
407
+
408
+ if sid != :unset
409
+ return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
410
+ end
411
+
412
+ unless @assigned_add_ons
413
+ @assigned_add_ons = AssignedAddOnList.new(
414
+ @version, account_sid: @solution[:account_sid], resource_sid: @solution[:sid], )
415
+ end
416
+
417
+ @assigned_add_ons
418
+ end
419
+
420
+ ##
421
+ # Provide a user friendly representation
422
+ def to_s
423
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
424
+ "#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
425
+ end
426
+
427
+ ##
428
+ # Provide a detailed, user friendly representation
429
+ def inspect
430
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
431
+ "#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
432
+ end
433
+ end
434
+
435
+ class IncomingPhoneNumberPage < Page
436
+ ##
437
+ # Initialize the IncomingPhoneNumberPage
438
+ # @param [Version] version Version that contains the resource
439
+ # @param [Response] response Response from the API
440
+ # @param [Hash] solution Path solution for the resource
441
+ # @return [IncomingPhoneNumberPage] IncomingPhoneNumberPage
442
+ def initialize(version, response, solution)
443
+ super(version, response)
444
+
445
+ # Path Solution
446
+ @solution = solution
447
+ end
448
+
449
+ ##
450
+ # Build an instance of IncomingPhoneNumberInstance
451
+ # @param [Hash] payload Payload response from the API
452
+ # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
453
+ def get_instance(payload)
454
+ IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid])
455
+ end
456
+
457
+ ##
458
+ # Provide a user friendly representation
459
+ def to_s
460
+ '<Twilio.Api.V2010.IncomingPhoneNumberPage>'
461
+ end
462
+ end
463
+ class IncomingPhoneNumberInstance < InstanceResource
464
+ ##
465
+ # Initialize the IncomingPhoneNumberInstance
466
+ # @param [Version] version Version that contains the resource
467
+ # @param [Hash] payload payload that contains response from Twilio
468
+ # @param [String] account_sid The SID of the
469
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this IncomingPhoneNumber
470
+ # resource.
471
+ # @param [String] sid The SID of the Call resource to fetch.
472
+ # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
473
+ def initialize(version, payload , account_sid: nil, sid: nil)
474
+ super(version)
475
+
476
+ # Marshaled Properties
477
+ @properties = {
478
+ 'account_sid' => payload['account_sid'],
479
+ 'address_sid' => payload['address_sid'],
480
+ 'address_requirements' => payload['address_requirements'],
481
+ 'api_version' => payload['api_version'],
482
+ 'beta' => payload['beta'],
483
+ 'capabilities' => payload['capabilities'],
484
+ 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
485
+ 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
486
+ 'friendly_name' => payload['friendly_name'],
487
+ 'identity_sid' => payload['identity_sid'],
488
+ 'phone_number' => payload['phone_number'],
489
+ 'origin' => payload['origin'],
490
+ 'sid' => payload['sid'],
491
+ 'sms_application_sid' => payload['sms_application_sid'],
492
+ 'sms_fallback_method' => payload['sms_fallback_method'],
493
+ 'sms_fallback_url' => payload['sms_fallback_url'],
494
+ 'sms_method' => payload['sms_method'],
495
+ 'sms_url' => payload['sms_url'],
496
+ 'status_callback' => payload['status_callback'],
497
+ 'status_callback_method' => payload['status_callback_method'],
498
+ 'trunk_sid' => payload['trunk_sid'],
499
+ 'uri' => payload['uri'],
500
+ 'voice_receive_mode' => payload['voice_receive_mode'],
501
+ 'voice_application_sid' => payload['voice_application_sid'],
502
+ 'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
503
+ 'voice_fallback_method' => payload['voice_fallback_method'],
504
+ 'voice_fallback_url' => payload['voice_fallback_url'],
505
+ 'voice_method' => payload['voice_method'],
506
+ 'voice_url' => payload['voice_url'],
507
+ 'emergency_status' => payload['emergency_status'],
508
+ 'emergency_address_sid' => payload['emergency_address_sid'],
509
+ 'emergency_address_status' => payload['emergency_address_status'],
510
+ 'bundle_sid' => payload['bundle_sid'],
511
+ 'status' => payload['status'],
512
+ }
513
+
514
+ # Context
515
+ @instance_context = nil
516
+ @params = { 'account_sid' => account_sid ,'sid' => sid || @properties['sid'] , }
517
+ end
518
+
519
+ ##
520
+ # Generate an instance context for the instance, the context is capable of
521
+ # performing various actions. All instance actions are proxied to the context
522
+ # @return [IncomingPhoneNumberContext] CallContext for this CallInstance
523
+ def context
524
+ unless @instance_context
525
+ @instance_context = IncomingPhoneNumberContext.new(@version , @params['account_sid'], @params['sid'])
526
+ end
527
+ @instance_context
528
+ end
529
+
530
+ ##
531
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource.
532
+ def account_sid
533
+ @properties['account_sid']
534
+ end
535
+
536
+ ##
537
+ # @return [String] The SID of the Address resource associated with the phone number.
538
+ def address_sid
539
+ @properties['address_sid']
540
+ end
541
+
542
+ ##
543
+ # @return [AddressRequirement]
544
+ def address_requirements
545
+ @properties['address_requirements']
546
+ end
547
+
548
+ ##
549
+ # @return [String] The API version used to start a new TwiML session.
550
+ def api_version
551
+ @properties['api_version']
552
+ end
553
+
554
+ ##
555
+ # @return [Boolean] Whether the phone number is new to the Twilio platform. Can be: `true` or `false`.
556
+ def beta
557
+ @properties['beta']
558
+ end
559
+
560
+ ##
561
+ # @return [ApiV2010AccountIncomingPhoneNumberCapabilities]
562
+ def capabilities
563
+ @properties['capabilities']
564
+ end
565
+
566
+ ##
567
+ # @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.
568
+ def date_created
569
+ @properties['date_created']
570
+ end
571
+
572
+ ##
573
+ # @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.
574
+ def date_updated
575
+ @properties['date_updated']
576
+ end
577
+
578
+ ##
579
+ # @return [String] The string that you assigned to describe the resource.
580
+ def friendly_name
581
+ @properties['friendly_name']
582
+ end
583
+
584
+ ##
585
+ # @return [String] The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations.
586
+ def identity_sid
587
+ @properties['identity_sid']
588
+ end
589
+
590
+ ##
591
+ # @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.
592
+ def phone_number
593
+ @properties['phone_number']
594
+ end
595
+
596
+ ##
597
+ # @return [String] The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers.
598
+ def origin
599
+ @properties['origin']
600
+ end
601
+
602
+ ##
603
+ # @return [String] The unique string that that we created to identify this IncomingPhoneNumber resource.
604
+ def sid
605
+ @properties['sid']
606
+ end
607
+
608
+ ##
609
+ # @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.
610
+ def sms_application_sid
611
+ @properties['sms_application_sid']
612
+ end
613
+
614
+ ##
615
+ # @return [String] The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
616
+ def sms_fallback_method
617
+ @properties['sms_fallback_method']
618
+ end
619
+
620
+ ##
621
+ # @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`.
622
+ def sms_fallback_url
623
+ @properties['sms_fallback_url']
624
+ end
625
+
626
+ ##
627
+ # @return [String] The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
628
+ def sms_method
629
+ @properties['sms_method']
630
+ end
631
+
632
+ ##
633
+ # @return [String] The URL we call when the phone number receives an incoming SMS message.
634
+ def sms_url
635
+ @properties['sms_url']
636
+ end
637
+
638
+ ##
639
+ # @return [String] The URL we call using the `status_callback_method` to send status information to your application.
640
+ def status_callback
641
+ @properties['status_callback']
642
+ end
643
+
644
+ ##
645
+ # @return [String] The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
646
+ def status_callback_method
647
+ @properties['status_callback_method']
648
+ end
649
+
650
+ ##
651
+ # @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.
652
+ def trunk_sid
653
+ @properties['trunk_sid']
654
+ end
655
+
656
+ ##
657
+ # @return [String] The URI of the resource, relative to `https://api.twilio.com`.
658
+ def uri
659
+ @properties['uri']
660
+ end
661
+
662
+ ##
663
+ # @return [VoiceReceiveMode]
664
+ def voice_receive_mode
665
+ @properties['voice_receive_mode']
666
+ end
667
+
668
+ ##
669
+ # @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.
670
+ def voice_application_sid
671
+ @properties['voice_application_sid']
672
+ end
673
+
674
+ ##
675
+ # @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`.
676
+ def voice_caller_id_lookup
677
+ @properties['voice_caller_id_lookup']
678
+ end
679
+
680
+ ##
681
+ # @return [String] The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
682
+ def voice_fallback_method
683
+ @properties['voice_fallback_method']
684
+ end
685
+
686
+ ##
687
+ # @return [String] The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`.
688
+ def voice_fallback_url
689
+ @properties['voice_fallback_url']
690
+ end
691
+
692
+ ##
693
+ # @return [String] The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
694
+ def voice_method
695
+ @properties['voice_method']
696
+ end
697
+
698
+ ##
699
+ # @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.
700
+ def voice_url
701
+ @properties['voice_url']
702
+ end
703
+
704
+ ##
705
+ # @return [EmergencyStatus]
706
+ def emergency_status
707
+ @properties['emergency_status']
708
+ end
709
+
710
+ ##
711
+ # @return [String] The SID of the emergency address configuration that we use for emergency calling from this phone number.
712
+ def emergency_address_sid
713
+ @properties['emergency_address_sid']
714
+ end
715
+
716
+ ##
717
+ # @return [EmergencyAddressStatus]
718
+ def emergency_address_status
719
+ @properties['emergency_address_status']
720
+ end
721
+
722
+ ##
723
+ # @return [String] The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
724
+ def bundle_sid
725
+ @properties['bundle_sid']
726
+ end
727
+
728
+ ##
729
+ # @return [String]
730
+ def status
731
+ @properties['status']
732
+ end
733
+
734
+ ##
735
+ # Delete the IncomingPhoneNumberInstance
736
+ # @return [Boolean] True if delete succeeds, false otherwise
737
+ def delete
738
+
739
+ context.delete
740
+ end
741
+
742
+ ##
743
+ # Fetch the IncomingPhoneNumberInstance
744
+ # @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
745
+ def fetch
746
+
747
+ context.fetch
748
+ end
749
+
750
+ ##
751
+ # Update the IncomingPhoneNumberInstance
752
+ # @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).
753
+ # @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
754
+ # @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.
755
+ # @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.
756
+ # @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`.
757
+ # @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`.
758
+ # @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
759
+ # @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
760
+ # @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
761
+ # @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
762
+ # @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.
763
+ # @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`.
764
+ # @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`.
765
+ # @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
766
+ # @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
767
+ # @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.
768
+ # @param [EmergencyStatus] emergency_status
769
+ # @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
770
+ # @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.
771
+ # @param [VoiceReceiveMode] voice_receive_mode
772
+ # @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.
773
+ # @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.
774
+ # @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.
775
+ # @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
776
+ def update(
777
+ account_sid: :unset,
778
+ api_version: :unset,
779
+ friendly_name: :unset,
780
+ sms_application_sid: :unset,
781
+ sms_fallback_method: :unset,
782
+ sms_fallback_url: :unset,
783
+ sms_method: :unset,
784
+ sms_url: :unset,
785
+ status_callback: :unset,
786
+ status_callback_method: :unset,
787
+ voice_application_sid: :unset,
788
+ voice_caller_id_lookup: :unset,
789
+ voice_fallback_method: :unset,
790
+ voice_fallback_url: :unset,
791
+ voice_method: :unset,
792
+ voice_url: :unset,
793
+ emergency_status: :unset,
794
+ emergency_address_sid: :unset,
795
+ trunk_sid: :unset,
796
+ voice_receive_mode: :unset,
797
+ identity_sid: :unset,
798
+ address_sid: :unset,
799
+ bundle_sid: :unset
800
+ )
801
+
802
+ context.update(
803
+ account_sid: account_sid,
804
+ api_version: api_version,
805
+ friendly_name: friendly_name,
806
+ sms_application_sid: sms_application_sid,
807
+ sms_fallback_method: sms_fallback_method,
808
+ sms_fallback_url: sms_fallback_url,
809
+ sms_method: sms_method,
810
+ sms_url: sms_url,
811
+ status_callback: status_callback,
812
+ status_callback_method: status_callback_method,
813
+ voice_application_sid: voice_application_sid,
814
+ voice_caller_id_lookup: voice_caller_id_lookup,
815
+ voice_fallback_method: voice_fallback_method,
816
+ voice_fallback_url: voice_fallback_url,
817
+ voice_method: voice_method,
818
+ voice_url: voice_url,
819
+ emergency_status: emergency_status,
820
+ emergency_address_sid: emergency_address_sid,
821
+ trunk_sid: trunk_sid,
822
+ voice_receive_mode: voice_receive_mode,
823
+ identity_sid: identity_sid,
824
+ address_sid: address_sid,
825
+ bundle_sid: bundle_sid,
826
+ )
827
+ end
828
+
829
+ ##
830
+ # Access the assigned_add_ons
831
+ # @return [assigned_add_ons] assigned_add_ons
832
+ def assigned_add_ons
833
+ context.assigned_add_ons
834
+ end
835
+
836
+ ##
837
+ # Provide a user friendly representation
838
+ def to_s
839
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
840
+ "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
841
+ end
842
+
843
+ ##
844
+ # Provide a detailed, user friendly representation
845
+ def inspect
846
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
847
+ "<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
848
+ end
849
+ end
850
+
851
+ end
904
852
  end
905
- end
906
853
  end
907
- end
908
854
  end
909
- end
910
- end
855
+ end
856
+
857
+