twilio-ruby 6.2.0 → 6.8.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 (394) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +205 -0
  3. data/CONTRIBUTING.md +1 -1
  4. data/LICENSE +1 -1
  5. data/README.md +2 -2
  6. data/lib/twilio-ruby/base/client_base.rb +4 -7
  7. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +0 -1
  8. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +0 -1
  9. data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +169 -0
  10. data/lib/twilio-ruby/rest/accounts/v1.rb +6 -0
  11. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +0 -1
  12. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -5
  13. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +0 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +0 -1
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +0 -19
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +0 -19
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +0 -19
  18. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +0 -19
  19. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +0 -19
  20. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +0 -19
  21. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +0 -19
  22. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -8
  23. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +0 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +0 -5
  25. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +0 -4
  26. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -19
  27. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -6
  28. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +0 -4
  29. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -11
  30. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +0 -1
  31. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -1
  32. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -2
  33. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +0 -5
  34. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +0 -5
  35. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +0 -5
  36. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -6
  37. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +0 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +4 -4
  39. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +19 -23
  40. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +55 -58
  41. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +0 -5
  42. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +0 -3
  43. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +0 -1
  44. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -2
  45. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +0 -1
  46. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -2
  47. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +0 -1
  48. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -9
  49. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +0 -3
  50. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +0 -1
  51. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +0 -1
  52. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -2
  53. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +0 -1
  54. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb +0 -1
  55. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb +0 -1
  56. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +0 -1
  57. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +0 -1
  58. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -4
  59. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +0 -1
  60. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -2
  61. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +0 -1
  62. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +0 -5
  63. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +0 -5
  64. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +0 -5
  65. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +0 -5
  66. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +0 -5
  67. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +0 -5
  68. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +0 -5
  69. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +0 -5
  70. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +0 -5
  71. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +0 -4
  72. data/lib/twilio-ruby/rest/api/v2010/account.rb +0 -3
  73. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -2
  74. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -2
  75. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -1
  76. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -5
  77. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -1
  78. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -2
  79. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -3
  80. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -1
  81. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -1
  82. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -1
  83. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -1
  84. data/lib/twilio-ruby/rest/chat/v1/credential.rb +0 -1
  85. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +1 -2
  86. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +1 -2
  87. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +0 -2
  88. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +4 -5
  89. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +0 -1
  90. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +0 -1
  91. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -2
  92. data/lib/twilio-ruby/rest/chat/v1/service.rb +0 -1
  93. data/lib/twilio-ruby/rest/chat/v2/credential.rb +0 -1
  94. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +2 -3
  95. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +1 -2
  96. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +1 -2
  97. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +0 -2
  98. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +0 -1
  99. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +5 -6
  100. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +0 -1
  101. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +1 -2
  102. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +0 -1
  103. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -3
  104. data/lib/twilio-ruby/rest/chat/v2/service.rb +0 -1
  105. data/lib/twilio-ruby/rest/chat/v3/channel.rb +3 -3
  106. data/lib/twilio-ruby/rest/client.rb +1 -6
  107. data/lib/twilio-ruby/rest/content/v1/content.rb +1 -2
  108. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -2
  109. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -2
  110. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +0 -2
  111. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +3 -3
  112. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +0 -1
  113. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  114. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +0 -1
  115. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +0 -1
  116. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +22 -8
  117. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +0 -1
  118. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +0 -3
  119. data/lib/twilio-ruby/rest/conversations/v1/role.rb +0 -1
  120. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +2 -3
  121. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +12 -12
  122. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +0 -1
  123. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  124. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +19 -20
  125. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +0 -1
  126. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +25 -11
  127. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +0 -3
  128. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +0 -1
  129. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +0 -1
  130. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -2
  131. data/lib/twilio-ruby/rest/conversations/v1/service.rb +0 -1
  132. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +0 -1
  133. data/lib/twilio-ruby/rest/conversations/v1/user.rb +0 -1
  134. data/lib/twilio-ruby/rest/events/v1/event_type.rb +0 -2
  135. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +0 -1
  136. data/lib/twilio-ruby/rest/events/v1/sink.rb +0 -3
  137. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +0 -1
  138. data/lib/twilio-ruby/rest/events/v1/subscription.rb +0 -2
  139. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -3
  140. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +0 -1
  141. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +21 -0
  142. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +0 -2
  143. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +0 -4
  144. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +0 -3
  145. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +0 -3
  146. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +0 -2
  147. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +1 -3
  148. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +1 -4
  149. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +0 -1
  150. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +0 -1
  151. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +6 -7
  152. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +11 -1
  153. data/lib/twilio-ruby/rest/{oauth/v1/oauth.rb → flex_api/v1/provisioning_status.rb} +39 -37
  154. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +0 -1
  155. data/lib/twilio-ruby/rest/flex_api/v1.rb +6 -0
  156. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +1 -1
  157. data/lib/twilio-ruby/rest/insights/v1/call/event.rb +0 -2
  158. data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +0 -3
  159. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +33 -51
  160. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +0 -4
  161. data/lib/twilio-ruby/rest/insights/v1/conference.rb +0 -11
  162. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +3 -4
  163. data/lib/twilio-ruby/rest/insights/v1/room.rb +2 -6
  164. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +4 -5
  165. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +2 -2
  166. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +12 -7
  167. data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +3 -5
  168. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +5 -25
  169. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +0 -1
  170. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +1 -2
  171. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +1 -2
  172. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +0 -2
  173. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +4 -5
  174. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +0 -1
  175. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +0 -1
  176. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -2
  177. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +0 -1
  178. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +0 -1
  179. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +2 -3
  180. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +1 -2
  181. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +1 -2
  182. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +0 -2
  183. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +0 -1
  184. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +5 -6
  185. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +0 -1
  186. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +1 -2
  187. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +0 -1
  188. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -3
  189. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +0 -1
  190. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +7 -0
  191. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +7 -10
  192. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +1 -6
  193. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +2 -5
  194. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
  195. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -1
  196. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +2 -2
  197. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -1
  198. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +329 -0
  199. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -1
  200. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -1
  201. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +4 -5
  202. data/lib/twilio-ruby/rest/messaging/v1/service.rb +78 -52
  203. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +777 -0
  204. data/lib/twilio-ruby/rest/messaging/v1.rb +15 -0
  205. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -1
  206. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -1
  207. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -1
  208. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -1
  209. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -1
  210. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +8 -3
  211. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +0 -4
  212. data/lib/twilio-ruby/rest/monitor/v1/event.rb +0 -7
  213. data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -1
  214. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +2 -5
  215. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  216. data/lib/twilio-ruby/rest/notify/v1/service.rb +4 -6
  217. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +22 -4
  218. data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +7 -12
  219. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +6 -6
  220. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +249 -0
  221. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +7 -20
  222. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +0 -1
  223. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +0 -1
  224. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +0 -1
  225. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +19 -31
  226. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +0 -1
  227. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +0 -1
  228. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +0 -4
  229. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +0 -1
  230. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +0 -1
  231. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +14 -14
  232. data/lib/twilio-ruby/rest/numbers/v2.rb +15 -0
  233. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
  234. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -1
  235. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
  236. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
  237. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -1
  238. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +3 -9
  239. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +4 -7
  240. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +3 -9
  241. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -1
  242. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -1
  243. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -1
  244. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -1
  245. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -1
  246. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -2
  247. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -4
  248. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -1
  249. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -3
  250. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -4
  251. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -1
  252. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -3
  253. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -1
  254. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -2
  255. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -2
  256. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -1
  257. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -4
  258. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -1
  259. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -2
  260. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -3
  261. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -1
  262. data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -5
  263. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -1
  264. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -6
  265. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +0 -1
  266. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +0 -1
  267. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +0 -1
  268. data/lib/twilio-ruby/rest/pricing/v2/country.rb +0 -1
  269. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +0 -1
  270. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -1
  271. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +1 -2
  272. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -1
  273. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -2
  274. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -3
  275. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +1 -2
  276. data/lib/twilio-ruby/rest/proxy/v1/service.rb +4 -5
  277. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -1
  278. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -2
  279. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -1
  280. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -1
  281. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -4
  282. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -1
  283. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -4
  284. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -1
  285. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -2
  286. data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -1
  287. data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +0 -1
  288. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -2
  289. data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +0 -1
  290. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -4
  291. data/lib/twilio-ruby/rest/studio/v1/flow.rb +0 -1
  292. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -1
  293. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -4
  294. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +0 -1
  295. data/lib/twilio-ruby/rest/studio/v2/flow.rb +0 -1
  296. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +4 -8
  297. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
  298. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +3 -8
  299. data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -4
  300. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -1
  301. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -1
  302. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +0 -3
  303. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +0 -1
  304. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +0 -1
  305. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -4
  306. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -4
  307. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +0 -9
  308. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -1
  309. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -2
  310. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +0 -4
  311. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -1
  312. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -3
  313. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +0 -4
  314. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +0 -1
  315. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -3
  316. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -2
  317. data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -1
  318. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +0 -3
  319. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +0 -12
  320. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +0 -3
  321. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +26 -19
  322. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +0 -1
  323. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +0 -7
  324. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -5
  325. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +0 -2
  326. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +0 -1
  327. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -11
  328. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +0 -2
  329. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +0 -2
  330. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +0 -1
  331. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +0 -1
  332. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +0 -1
  333. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +0 -1
  334. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +0 -1
  335. data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +232 -0
  336. data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +154 -0
  337. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +0 -3
  338. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +0 -1
  339. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +0 -1
  340. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +0 -4
  341. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +0 -1
  342. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +0 -1
  343. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +0 -1
  344. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +0 -1
  345. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +0 -1
  346. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +0 -3
  347. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +0 -1
  348. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +0 -1
  349. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +0 -4
  350. data/lib/twilio-ruby/rest/trusthub/v1.rb +21 -0
  351. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -5
  352. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -1
  353. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -4
  354. data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +4 -5
  355. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +0 -1
  356. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -2
  357. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -1
  358. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -1
  359. data/lib/twilio-ruby/rest/verify/v2/service.rb +19 -4
  360. data/lib/twilio-ruby/rest/verify/v2/template.rb +0 -2
  361. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +7 -16
  362. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +6 -6
  363. data/lib/twilio-ruby/rest/video/v1/composition.rb +0 -5
  364. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -5
  365. data/lib/twilio-ruby/rest/video/v1/recording.rb +1 -7
  366. data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +0 -1
  367. data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +0 -1
  368. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -8
  369. data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +0 -5
  370. data/lib/twilio-ruby/rest/video/v1/room.rb +2 -7
  371. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +0 -1
  372. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +0 -1
  373. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +0 -1
  374. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +0 -1
  375. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +4 -11
  376. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +0 -1
  377. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +0 -1
  378. data/lib/twilio-ruby/rest/wireless/v1/command.rb +5 -10
  379. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +7 -8
  380. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +3 -4
  381. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +3 -7
  382. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +13 -19
  383. data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +2 -6
  384. data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
  385. data/lib/twilio-ruby/version.rb +1 -1
  386. metadata +9 -11
  387. data/conf/cacert.pem +0 -3376
  388. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +0 -171
  389. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +0 -262
  390. data/lib/twilio-ruby/rest/oauth/v1/token.rb +0 -179
  391. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +0 -213
  392. data/lib/twilio-ruby/rest/oauth/v1.rb +0 -64
  393. data/lib/twilio-ruby/rest/oauth.rb +0 -33
  394. data/lib/twilio-ruby/rest/oauth_base.rb +0 -38
@@ -0,0 +1,777 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Messaging
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.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Messaging < MessagingBase
19
+ class V1 < Version
20
+ class TollfreeVerificationList < ListResource
21
+ ##
22
+ # Initialize the TollfreeVerificationList
23
+ # @param [Version] version Version that contains the resource
24
+ # @return [TollfreeVerificationList] TollfreeVerificationList
25
+ def initialize(version)
26
+ super(version)
27
+ # Path Solution
28
+ @solution = { }
29
+ @uri = "/Tollfree/Verifications"
30
+
31
+ end
32
+ ##
33
+ # Create the TollfreeVerificationInstance
34
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
35
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
36
+ # @param [String] notification_email The email address to receive the notification about the verification result. .
37
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
38
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
39
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
40
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
41
+ # @param [OptInType] opt_in_type
42
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
43
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
44
+ # @param [String] customer_profile_sid Customer's Profile Bundle BundleSid.
45
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
46
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
47
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
48
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
49
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
50
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
51
+ # @param [String] additional_information Additional information to be provided for verification.
52
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
53
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
54
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
55
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
56
+ # @param [String] external_reference_id An optional external reference ID supplied by customer and echoed back on status retrieval.
57
+ # @return [TollfreeVerificationInstance] Created TollfreeVerificationInstance
58
+ def create(
59
+ business_name: nil,
60
+ business_website: nil,
61
+ notification_email: nil,
62
+ use_case_categories: nil,
63
+ use_case_summary: nil,
64
+ production_message_sample: nil,
65
+ opt_in_image_urls: nil,
66
+ opt_in_type: nil,
67
+ message_volume: nil,
68
+ tollfree_phone_number_sid: nil,
69
+ customer_profile_sid: :unset,
70
+ business_street_address: :unset,
71
+ business_street_address2: :unset,
72
+ business_city: :unset,
73
+ business_state_province_region: :unset,
74
+ business_postal_code: :unset,
75
+ business_country: :unset,
76
+ additional_information: :unset,
77
+ business_contact_first_name: :unset,
78
+ business_contact_last_name: :unset,
79
+ business_contact_email: :unset,
80
+ business_contact_phone: :unset,
81
+ external_reference_id: :unset
82
+ )
83
+
84
+ data = Twilio::Values.of({
85
+ 'BusinessName' => business_name,
86
+ 'BusinessWebsite' => business_website,
87
+ 'NotificationEmail' => notification_email,
88
+ 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
89
+ 'UseCaseSummary' => use_case_summary,
90
+ 'ProductionMessageSample' => production_message_sample,
91
+ 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
92
+ 'OptInType' => opt_in_type,
93
+ 'MessageVolume' => message_volume,
94
+ 'TollfreePhoneNumberSid' => tollfree_phone_number_sid,
95
+ 'CustomerProfileSid' => customer_profile_sid,
96
+ 'BusinessStreetAddress' => business_street_address,
97
+ 'BusinessStreetAddress2' => business_street_address2,
98
+ 'BusinessCity' => business_city,
99
+ 'BusinessStateProvinceRegion' => business_state_province_region,
100
+ 'BusinessPostalCode' => business_postal_code,
101
+ 'BusinessCountry' => business_country,
102
+ 'AdditionalInformation' => additional_information,
103
+ 'BusinessContactFirstName' => business_contact_first_name,
104
+ 'BusinessContactLastName' => business_contact_last_name,
105
+ 'BusinessContactEmail' => business_contact_email,
106
+ 'BusinessContactPhone' => business_contact_phone,
107
+ 'ExternalReferenceId' => external_reference_id,
108
+ })
109
+
110
+ payload = @version.create('POST', @uri, data: data)
111
+ TollfreeVerificationInstance.new(
112
+ @version,
113
+ payload,
114
+ )
115
+ end
116
+
117
+
118
+ ##
119
+ # Lists TollfreeVerificationInstance records from the API as a list.
120
+ # Unlike stream(), this operation is eager and will load `limit` records into
121
+ # memory before returning.
122
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
123
+ # @param [Status] status The compliance status of the Tollfree Verification record.
124
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
125
+ # guarantees to never return more than limit. Default is no limit
126
+ # @param [Integer] page_size Number of records to fetch per request, when
127
+ # not set will use the default value of 50 records. If no page_size is defined
128
+ # but a limit is defined, stream() will attempt to read the limit with the most
129
+ # efficient page size, i.e. min(limit, 1000)
130
+ # @return [Array] Array of up to limit results
131
+ def list(tollfree_phone_number_sid: :unset, status: :unset, limit: nil, page_size: nil)
132
+ self.stream(
133
+ tollfree_phone_number_sid: tollfree_phone_number_sid,
134
+ status: status,
135
+ limit: limit,
136
+ page_size: page_size
137
+ ).entries
138
+ end
139
+
140
+ ##
141
+ # Streams Instance records from the API as an Enumerable.
142
+ # This operation lazily loads records as efficiently as possible until the limit
143
+ # is reached.
144
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
145
+ # @param [Status] status The compliance status of the Tollfree Verification record.
146
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
147
+ # guarantees to never return more than limit. Default is no limit
148
+ # @param [Integer] page_size Number of records to fetch per request, when
149
+ # not set will use the default value of 50 records. If no page_size is defined
150
+ # but a limit is defined, stream() will attempt to read the limit with the most
151
+ # efficient page size, i.e. min(limit, 1000)
152
+ # @return [Enumerable] Enumerable that will yield up to limit results
153
+ def stream(tollfree_phone_number_sid: :unset, status: :unset, limit: nil, page_size: nil)
154
+ limits = @version.read_limits(limit, page_size)
155
+
156
+ page = self.page(
157
+ tollfree_phone_number_sid: tollfree_phone_number_sid,
158
+ status: status,
159
+ page_size: limits[:page_size], )
160
+
161
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
162
+ end
163
+
164
+ ##
165
+ # When passed a block, yields TollfreeVerificationInstance records from the API.
166
+ # This operation lazily loads records as efficiently as possible until the limit
167
+ # is reached.
168
+ def each
169
+ limits = @version.read_limits
170
+
171
+ page = self.page(page_size: limits[:page_size], )
172
+
173
+ @version.stream(page,
174
+ limit: limits[:limit],
175
+ page_limit: limits[:page_limit]).each {|x| yield x}
176
+ end
177
+
178
+ ##
179
+ # Retrieve a single page of TollfreeVerificationInstance records from the API.
180
+ # Request is executed immediately.
181
+ # @param [String] tollfree_phone_number_sid The SID of the Phone Number associated with the Tollfree Verification.
182
+ # @param [Status] status The compliance status of the Tollfree Verification record.
183
+ # @param [String] page_token PageToken provided by the API
184
+ # @param [Integer] page_number Page Number, this value is simply for client state
185
+ # @param [Integer] page_size Number of records to return, defaults to 50
186
+ # @return [Page] Page of TollfreeVerificationInstance
187
+ def page(tollfree_phone_number_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
188
+ params = Twilio::Values.of({
189
+ 'TollfreePhoneNumberSid' => tollfree_phone_number_sid,
190
+ 'Status' => status,
191
+ 'PageToken' => page_token,
192
+ 'Page' => page_number,
193
+ 'PageSize' => page_size,
194
+ })
195
+
196
+ response = @version.page('GET', @uri, params: params)
197
+
198
+ TollfreeVerificationPage.new(@version, response, @solution)
199
+ end
200
+
201
+ ##
202
+ # Retrieve a single page of TollfreeVerificationInstance records from the API.
203
+ # Request is executed immediately.
204
+ # @param [String] target_url API-generated URL for the requested results page
205
+ # @return [Page] Page of TollfreeVerificationInstance
206
+ def get_page(target_url)
207
+ response = @version.domain.request(
208
+ 'GET',
209
+ target_url
210
+ )
211
+ TollfreeVerificationPage.new(@version, response, @solution)
212
+ end
213
+
214
+
215
+
216
+ # Provide a user friendly representation
217
+ def to_s
218
+ '#<Twilio.Messaging.V1.TollfreeVerificationList>'
219
+ end
220
+ end
221
+
222
+
223
+ ##
224
+ #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
225
+ class TollfreeVerificationContext < InstanceContext
226
+ ##
227
+ # Initialize the TollfreeVerificationContext
228
+ # @param [Version] version Version that contains the resource
229
+ # @param [String] sid The unique string to identify Tollfree Verification.
230
+ # @return [TollfreeVerificationContext] TollfreeVerificationContext
231
+ def initialize(version, sid)
232
+ super(version)
233
+
234
+ # Path Solution
235
+ @solution = { sid: sid, }
236
+ @uri = "/Tollfree/Verifications/#{@solution[:sid]}"
237
+
238
+
239
+ end
240
+ ##
241
+ # Delete the TollfreeVerificationInstance
242
+ # @return [Boolean] True if delete succeeds, false otherwise
243
+ def delete
244
+
245
+ @version.delete('DELETE', @uri)
246
+ end
247
+
248
+ ##
249
+ # Fetch the TollfreeVerificationInstance
250
+ # @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
251
+ def fetch
252
+
253
+ payload = @version.fetch('GET', @uri)
254
+ TollfreeVerificationInstance.new(
255
+ @version,
256
+ payload,
257
+ sid: @solution[:sid],
258
+ )
259
+ end
260
+
261
+ ##
262
+ # Update the TollfreeVerificationInstance
263
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
264
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
265
+ # @param [String] notification_email The email address to receive the notification about the verification result. .
266
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
267
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
268
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
269
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
270
+ # @param [OptInType] opt_in_type
271
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
272
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
273
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
274
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
275
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
276
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
277
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
278
+ # @param [String] additional_information Additional information to be provided for verification.
279
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
280
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
281
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
282
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
283
+ # @param [String] edit_reason Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
284
+ # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
285
+ def update(
286
+ business_name: :unset,
287
+ business_website: :unset,
288
+ notification_email: :unset,
289
+ use_case_categories: :unset,
290
+ use_case_summary: :unset,
291
+ production_message_sample: :unset,
292
+ opt_in_image_urls: :unset,
293
+ opt_in_type: :unset,
294
+ message_volume: :unset,
295
+ business_street_address: :unset,
296
+ business_street_address2: :unset,
297
+ business_city: :unset,
298
+ business_state_province_region: :unset,
299
+ business_postal_code: :unset,
300
+ business_country: :unset,
301
+ additional_information: :unset,
302
+ business_contact_first_name: :unset,
303
+ business_contact_last_name: :unset,
304
+ business_contact_email: :unset,
305
+ business_contact_phone: :unset,
306
+ edit_reason: :unset
307
+ )
308
+
309
+ data = Twilio::Values.of({
310
+ 'BusinessName' => business_name,
311
+ 'BusinessWebsite' => business_website,
312
+ 'NotificationEmail' => notification_email,
313
+ 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
314
+ 'UseCaseSummary' => use_case_summary,
315
+ 'ProductionMessageSample' => production_message_sample,
316
+ 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
317
+ 'OptInType' => opt_in_type,
318
+ 'MessageVolume' => message_volume,
319
+ 'BusinessStreetAddress' => business_street_address,
320
+ 'BusinessStreetAddress2' => business_street_address2,
321
+ 'BusinessCity' => business_city,
322
+ 'BusinessStateProvinceRegion' => business_state_province_region,
323
+ 'BusinessPostalCode' => business_postal_code,
324
+ 'BusinessCountry' => business_country,
325
+ 'AdditionalInformation' => additional_information,
326
+ 'BusinessContactFirstName' => business_contact_first_name,
327
+ 'BusinessContactLastName' => business_contact_last_name,
328
+ 'BusinessContactEmail' => business_contact_email,
329
+ 'BusinessContactPhone' => business_contact_phone,
330
+ 'EditReason' => edit_reason,
331
+ })
332
+
333
+ payload = @version.update('POST', @uri, data: data)
334
+ TollfreeVerificationInstance.new(
335
+ @version,
336
+ payload,
337
+ sid: @solution[:sid],
338
+ )
339
+ end
340
+
341
+
342
+ ##
343
+ # Provide a user friendly representation
344
+ def to_s
345
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
346
+ "#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>"
347
+ end
348
+
349
+ ##
350
+ # Provide a detailed, user friendly representation
351
+ def inspect
352
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
353
+ "#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>"
354
+ end
355
+ end
356
+
357
+ class TollfreeVerificationPage < Page
358
+ ##
359
+ # Initialize the TollfreeVerificationPage
360
+ # @param [Version] version Version that contains the resource
361
+ # @param [Response] response Response from the API
362
+ # @param [Hash] solution Path solution for the resource
363
+ # @return [TollfreeVerificationPage] TollfreeVerificationPage
364
+ def initialize(version, response, solution)
365
+ super(version, response)
366
+
367
+ # Path Solution
368
+ @solution = solution
369
+ end
370
+
371
+ ##
372
+ # Build an instance of TollfreeVerificationInstance
373
+ # @param [Hash] payload Payload response from the API
374
+ # @return [TollfreeVerificationInstance] TollfreeVerificationInstance
375
+ def get_instance(payload)
376
+ TollfreeVerificationInstance.new(@version, payload)
377
+ end
378
+
379
+ ##
380
+ # Provide a user friendly representation
381
+ def to_s
382
+ '<Twilio.Messaging.V1.TollfreeVerificationPage>'
383
+ end
384
+ end
385
+ class TollfreeVerificationInstance < InstanceResource
386
+ ##
387
+ # Initialize the TollfreeVerificationInstance
388
+ # @param [Version] version Version that contains the resource
389
+ # @param [Hash] payload payload that contains response from Twilio
390
+ # @param [String] account_sid The SID of the
391
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this TollfreeVerification
392
+ # resource.
393
+ # @param [String] sid The SID of the Call resource to fetch.
394
+ # @return [TollfreeVerificationInstance] TollfreeVerificationInstance
395
+ def initialize(version, payload , sid: nil)
396
+ super(version)
397
+
398
+ # Marshaled Properties
399
+ @properties = {
400
+ 'sid' => payload['sid'],
401
+ 'account_sid' => payload['account_sid'],
402
+ 'customer_profile_sid' => payload['customer_profile_sid'],
403
+ 'trust_product_sid' => payload['trust_product_sid'],
404
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
405
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
406
+ 'regulated_item_sid' => payload['regulated_item_sid'],
407
+ 'business_name' => payload['business_name'],
408
+ 'business_street_address' => payload['business_street_address'],
409
+ 'business_street_address2' => payload['business_street_address2'],
410
+ 'business_city' => payload['business_city'],
411
+ 'business_state_province_region' => payload['business_state_province_region'],
412
+ 'business_postal_code' => payload['business_postal_code'],
413
+ 'business_country' => payload['business_country'],
414
+ 'business_website' => payload['business_website'],
415
+ 'business_contact_first_name' => payload['business_contact_first_name'],
416
+ 'business_contact_last_name' => payload['business_contact_last_name'],
417
+ 'business_contact_email' => payload['business_contact_email'],
418
+ 'business_contact_phone' => payload['business_contact_phone'],
419
+ 'notification_email' => payload['notification_email'],
420
+ 'use_case_categories' => payload['use_case_categories'],
421
+ 'use_case_summary' => payload['use_case_summary'],
422
+ 'production_message_sample' => payload['production_message_sample'],
423
+ 'opt_in_image_urls' => payload['opt_in_image_urls'],
424
+ 'opt_in_type' => payload['opt_in_type'],
425
+ 'message_volume' => payload['message_volume'],
426
+ 'additional_information' => payload['additional_information'],
427
+ 'tollfree_phone_number_sid' => payload['tollfree_phone_number_sid'],
428
+ 'status' => payload['status'],
429
+ 'url' => payload['url'],
430
+ 'rejection_reason' => payload['rejection_reason'],
431
+ 'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
432
+ 'edit_expiration' => Twilio.deserialize_iso8601_datetime(payload['edit_expiration']),
433
+ 'edit_allowed' => payload['edit_allowed'],
434
+ 'resource_links' => payload['resource_links'],
435
+ 'external_reference_id' => payload['external_reference_id'],
436
+ }
437
+
438
+ # Context
439
+ @instance_context = nil
440
+ @params = { 'sid' => sid || @properties['sid'] , }
441
+ end
442
+
443
+ ##
444
+ # Generate an instance context for the instance, the context is capable of
445
+ # performing various actions. All instance actions are proxied to the context
446
+ # @return [TollfreeVerificationContext] CallContext for this CallInstance
447
+ def context
448
+ unless @instance_context
449
+ @instance_context = TollfreeVerificationContext.new(@version , @params['sid'])
450
+ end
451
+ @instance_context
452
+ end
453
+
454
+ ##
455
+ # @return [String] The unique string to identify Tollfree Verification.
456
+ def sid
457
+ @properties['sid']
458
+ end
459
+
460
+ ##
461
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tollfree Verification resource.
462
+ def account_sid
463
+ @properties['account_sid']
464
+ end
465
+
466
+ ##
467
+ # @return [String] Customer's Profile Bundle BundleSid.
468
+ def customer_profile_sid
469
+ @properties['customer_profile_sid']
470
+ end
471
+
472
+ ##
473
+ # @return [String] Tollfree TrustProduct Bundle BundleSid.
474
+ def trust_product_sid
475
+ @properties['trust_product_sid']
476
+ end
477
+
478
+ ##
479
+ # @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
480
+ def date_created
481
+ @properties['date_created']
482
+ end
483
+
484
+ ##
485
+ # @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
486
+ def date_updated
487
+ @properties['date_updated']
488
+ end
489
+
490
+ ##
491
+ # @return [String] The SID of the Regulated Item.
492
+ def regulated_item_sid
493
+ @properties['regulated_item_sid']
494
+ end
495
+
496
+ ##
497
+ # @return [String] The name of the business or organization using the Tollfree number.
498
+ def business_name
499
+ @properties['business_name']
500
+ end
501
+
502
+ ##
503
+ # @return [String] The address of the business or organization using the Tollfree number.
504
+ def business_street_address
505
+ @properties['business_street_address']
506
+ end
507
+
508
+ ##
509
+ # @return [String] The address of the business or organization using the Tollfree number.
510
+ def business_street_address2
511
+ @properties['business_street_address2']
512
+ end
513
+
514
+ ##
515
+ # @return [String] The city of the business or organization using the Tollfree number.
516
+ def business_city
517
+ @properties['business_city']
518
+ end
519
+
520
+ ##
521
+ # @return [String] The state/province/region of the business or organization using the Tollfree number.
522
+ def business_state_province_region
523
+ @properties['business_state_province_region']
524
+ end
525
+
526
+ ##
527
+ # @return [String] The postal code of the business or organization using the Tollfree number.
528
+ def business_postal_code
529
+ @properties['business_postal_code']
530
+ end
531
+
532
+ ##
533
+ # @return [String] The country of the business or organization using the Tollfree number.
534
+ def business_country
535
+ @properties['business_country']
536
+ end
537
+
538
+ ##
539
+ # @return [String] The website of the business or organization using the Tollfree number.
540
+ def business_website
541
+ @properties['business_website']
542
+ end
543
+
544
+ ##
545
+ # @return [String] The first name of the contact for the business or organization using the Tollfree number.
546
+ def business_contact_first_name
547
+ @properties['business_contact_first_name']
548
+ end
549
+
550
+ ##
551
+ # @return [String] The last name of the contact for the business or organization using the Tollfree number.
552
+ def business_contact_last_name
553
+ @properties['business_contact_last_name']
554
+ end
555
+
556
+ ##
557
+ # @return [String] The email address of the contact for the business or organization using the Tollfree number.
558
+ def business_contact_email
559
+ @properties['business_contact_email']
560
+ end
561
+
562
+ ##
563
+ # @return [String] The phone number of the contact for the business or organization using the Tollfree number.
564
+ def business_contact_phone
565
+ @properties['business_contact_phone']
566
+ end
567
+
568
+ ##
569
+ # @return [String] The email address to receive the notification about the verification result. .
570
+ def notification_email
571
+ @properties['notification_email']
572
+ end
573
+
574
+ ##
575
+ # @return [Array<String>] The category of the use case for the Tollfree Number. List as many are applicable..
576
+ def use_case_categories
577
+ @properties['use_case_categories']
578
+ end
579
+
580
+ ##
581
+ # @return [String] Use this to further explain how messaging is used by the business or organization.
582
+ def use_case_summary
583
+ @properties['use_case_summary']
584
+ end
585
+
586
+ ##
587
+ # @return [String] An example of message content, i.e. a sample message.
588
+ def production_message_sample
589
+ @properties['production_message_sample']
590
+ end
591
+
592
+ ##
593
+ # @return [Array<String>] Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
594
+ def opt_in_image_urls
595
+ @properties['opt_in_image_urls']
596
+ end
597
+
598
+ ##
599
+ # @return [OptInType]
600
+ def opt_in_type
601
+ @properties['opt_in_type']
602
+ end
603
+
604
+ ##
605
+ # @return [String] Estimate monthly volume of messages from the Tollfree Number.
606
+ def message_volume
607
+ @properties['message_volume']
608
+ end
609
+
610
+ ##
611
+ # @return [String] Additional information to be provided for verification.
612
+ def additional_information
613
+ @properties['additional_information']
614
+ end
615
+
616
+ ##
617
+ # @return [String] The SID of the Phone Number associated with the Tollfree Verification.
618
+ def tollfree_phone_number_sid
619
+ @properties['tollfree_phone_number_sid']
620
+ end
621
+
622
+ ##
623
+ # @return [Status]
624
+ def status
625
+ @properties['status']
626
+ end
627
+
628
+ ##
629
+ # @return [String] The absolute URL of the Tollfree Verification resource.
630
+ def url
631
+ @properties['url']
632
+ end
633
+
634
+ ##
635
+ # @return [String] The rejection reason given when a Tollfree Verification has been rejected.
636
+ def rejection_reason
637
+ @properties['rejection_reason']
638
+ end
639
+
640
+ ##
641
+ # @return [String] The error code given when a Tollfree Verification has been rejected.
642
+ def error_code
643
+ @properties['error_code']
644
+ end
645
+
646
+ ##
647
+ # @return [Time] The date and time when the ability to edit a rejected verification expires.
648
+ def edit_expiration
649
+ @properties['edit_expiration']
650
+ end
651
+
652
+ ##
653
+ # @return [Boolean] If a rejected verification is allowed to be edited/resubmitted. Some rejection reasons allow editing and some do not.
654
+ def edit_allowed
655
+ @properties['edit_allowed']
656
+ end
657
+
658
+ ##
659
+ # @return [Hash] The URLs of the documents associated with the Tollfree Verification resource.
660
+ def resource_links
661
+ @properties['resource_links']
662
+ end
663
+
664
+ ##
665
+ # @return [String] An optional external reference ID supplied by customer and echoed back on status retrieval.
666
+ def external_reference_id
667
+ @properties['external_reference_id']
668
+ end
669
+
670
+ ##
671
+ # Delete the TollfreeVerificationInstance
672
+ # @return [Boolean] True if delete succeeds, false otherwise
673
+ def delete
674
+
675
+ context.delete
676
+ end
677
+
678
+ ##
679
+ # Fetch the TollfreeVerificationInstance
680
+ # @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
681
+ def fetch
682
+
683
+ context.fetch
684
+ end
685
+
686
+ ##
687
+ # Update the TollfreeVerificationInstance
688
+ # @param [String] business_name The name of the business or organization using the Tollfree number.
689
+ # @param [String] business_website The website of the business or organization using the Tollfree number.
690
+ # @param [String] notification_email The email address to receive the notification about the verification result. .
691
+ # @param [Array[String]] use_case_categories The category of the use case for the Tollfree Number. List as many are applicable..
692
+ # @param [String] use_case_summary Use this to further explain how messaging is used by the business or organization.
693
+ # @param [String] production_message_sample An example of message content, i.e. a sample message.
694
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
695
+ # @param [OptInType] opt_in_type
696
+ # @param [String] message_volume Estimate monthly volume of messages from the Tollfree Number.
697
+ # @param [String] business_street_address The address of the business or organization using the Tollfree number.
698
+ # @param [String] business_street_address2 The address of the business or organization using the Tollfree number.
699
+ # @param [String] business_city The city of the business or organization using the Tollfree number.
700
+ # @param [String] business_state_province_region The state/province/region of the business or organization using the Tollfree number.
701
+ # @param [String] business_postal_code The postal code of the business or organization using the Tollfree number.
702
+ # @param [String] business_country The country of the business or organization using the Tollfree number.
703
+ # @param [String] additional_information Additional information to be provided for verification.
704
+ # @param [String] business_contact_first_name The first name of the contact for the business or organization using the Tollfree number.
705
+ # @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
706
+ # @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
707
+ # @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
708
+ # @param [String] edit_reason Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.
709
+ # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
710
+ def update(
711
+ business_name: :unset,
712
+ business_website: :unset,
713
+ notification_email: :unset,
714
+ use_case_categories: :unset,
715
+ use_case_summary: :unset,
716
+ production_message_sample: :unset,
717
+ opt_in_image_urls: :unset,
718
+ opt_in_type: :unset,
719
+ message_volume: :unset,
720
+ business_street_address: :unset,
721
+ business_street_address2: :unset,
722
+ business_city: :unset,
723
+ business_state_province_region: :unset,
724
+ business_postal_code: :unset,
725
+ business_country: :unset,
726
+ additional_information: :unset,
727
+ business_contact_first_name: :unset,
728
+ business_contact_last_name: :unset,
729
+ business_contact_email: :unset,
730
+ business_contact_phone: :unset,
731
+ edit_reason: :unset
732
+ )
733
+
734
+ context.update(
735
+ business_name: business_name,
736
+ business_website: business_website,
737
+ notification_email: notification_email,
738
+ use_case_categories: use_case_categories,
739
+ use_case_summary: use_case_summary,
740
+ production_message_sample: production_message_sample,
741
+ opt_in_image_urls: opt_in_image_urls,
742
+ opt_in_type: opt_in_type,
743
+ message_volume: message_volume,
744
+ business_street_address: business_street_address,
745
+ business_street_address2: business_street_address2,
746
+ business_city: business_city,
747
+ business_state_province_region: business_state_province_region,
748
+ business_postal_code: business_postal_code,
749
+ business_country: business_country,
750
+ additional_information: additional_information,
751
+ business_contact_first_name: business_contact_first_name,
752
+ business_contact_last_name: business_contact_last_name,
753
+ business_contact_email: business_contact_email,
754
+ business_contact_phone: business_contact_phone,
755
+ edit_reason: edit_reason,
756
+ )
757
+ end
758
+
759
+ ##
760
+ # Provide a user friendly representation
761
+ def to_s
762
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
763
+ "<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
764
+ end
765
+
766
+ ##
767
+ # Provide a detailed, user friendly representation
768
+ def inspect
769
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
770
+ "<Twilio.Messaging.V1.TollfreeVerificationInstance #{values}>"
771
+ end
772
+ end
773
+
774
+ end
775
+ end
776
+ end
777
+ end