twilio-api-sdk 1.0.0

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 (278) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +213 -0
  4. data/bin/console +15 -0
  5. data/lib/twilio_ap_is/api_helper.rb +10 -0
  6. data/lib/twilio_ap_is/apis/accounts_v1_auth_token_promotion_api.rb +27 -0
  7. data/lib/twilio_ap_is/apis/accounts_v1_aws_api.rb +137 -0
  8. data/lib/twilio_ap_is/apis/accounts_v1_bulk_consents_api.rb +41 -0
  9. data/lib/twilio_ap_is/apis/accounts_v1_bulk_contacts_api.rb +36 -0
  10. data/lib/twilio_ap_is/apis/accounts_v1_messaging_geopermissions_api.rb +54 -0
  11. data/lib/twilio_ap_is/apis/accounts_v1_public_key_api.rb +136 -0
  12. data/lib/twilio_ap_is/apis/accounts_v1_safelist_api.rb +69 -0
  13. data/lib/twilio_ap_is/apis/accounts_v1_secondary_auth_token_api.rb +39 -0
  14. data/lib/twilio_ap_is/apis/base_api.rb +67 -0
  15. data/lib/twilio_ap_is/apis/chat_v3_channel_api.rb +51 -0
  16. data/lib/twilio_ap_is/apis/conversations_v1_address_configuration_api.rb +218 -0
  17. data/lib/twilio_ap_is/apis/conversations_v1_binding_api.rb +116 -0
  18. data/lib/twilio_ap_is/apis/conversations_v1_configuration_api.rb +133 -0
  19. data/lib/twilio_ap_is/apis/conversations_v1_conversation_api.rb +550 -0
  20. data/lib/twilio_ap_is/apis/conversations_v1_conversation_with_participants_api.rb +182 -0
  21. data/lib/twilio_ap_is/apis/conversations_v1_credential_api.rb +189 -0
  22. data/lib/twilio_ap_is/apis/conversations_v1_delivery_receipt_api.rb +183 -0
  23. data/lib/twilio_ap_is/apis/conversations_v1_message_api.rb +497 -0
  24. data/lib/twilio_ap_is/apis/conversations_v1_notification_api.rb +124 -0
  25. data/lib/twilio_ap_is/apis/conversations_v1_participant_api.rb +546 -0
  26. data/lib/twilio_ap_is/apis/conversations_v1_participant_conversation_api.rb +99 -0
  27. data/lib/twilio_ap_is/apis/conversations_v1_role_api.rb +325 -0
  28. data/lib/twilio_ap_is/apis/conversations_v1_service_api.rb +98 -0
  29. data/lib/twilio_ap_is/apis/conversations_v1_user_api.rb +364 -0
  30. data/lib/twilio_ap_is/apis/conversations_v1_user_conversation_api.rb +335 -0
  31. data/lib/twilio_ap_is/apis/conversations_v1_webhook_api.rb +561 -0
  32. data/lib/twilio_ap_is/apis/notify_v1_binding_api.rb +186 -0
  33. data/lib/twilio_ap_is/apis/notify_v1_credential_api.rb +183 -0
  34. data/lib/twilio_ap_is/apis/notify_v1_notification_api.rb +174 -0
  35. data/lib/twilio_ap_is/apis/notify_v1_service_api.rb +262 -0
  36. data/lib/twilio_ap_is/apis/taskrouter_v1_activity_api.rb +177 -0
  37. data/lib/twilio_ap_is/apis/taskrouter_v1_event_api.rb +125 -0
  38. data/lib/twilio_ap_is/apis/taskrouter_v1_task_api.rb +310 -0
  39. data/lib/twilio_ap_is/apis/taskrouter_v1_task_channel_api.rb +173 -0
  40. data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_api.rb +232 -0
  41. data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_bulk_real_time_statistics_api.rb +36 -0
  42. data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_cumulative_statistics_api.rb +63 -0
  43. data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_real_time_statistics_api.rb +41 -0
  44. data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_statistics_api.rb +63 -0
  45. data/lib/twilio_ap_is/apis/taskrouter_v1_task_queues_statistics_api.rb +72 -0
  46. data/lib/twilio_ap_is/apis/taskrouter_v1_task_reservation_api.rb +396 -0
  47. data/lib/twilio_ap_is/apis/taskrouter_v1_worker_api.rb +232 -0
  48. data/lib/twilio_ap_is/apis/taskrouter_v1_worker_channel_api.rb +126 -0
  49. data/lib/twilio_ap_is/apis/taskrouter_v1_worker_reservation_api.rb +385 -0
  50. data/lib/twilio_ap_is/apis/taskrouter_v1_worker_statistics_api.rb +57 -0
  51. data/lib/twilio_ap_is/apis/taskrouter_v1_workers_cumulative_statistics_api.rb +51 -0
  52. data/lib/twilio_ap_is/apis/taskrouter_v1_workers_real_time_statistics_api.rb +35 -0
  53. data/lib/twilio_ap_is/apis/taskrouter_v1_workers_statistics_api.rb +63 -0
  54. data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_api.rb +213 -0
  55. data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_cumulative_statistics_api.rb +68 -0
  56. data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_real_time_statistics_api.rb +41 -0
  57. data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_statistics_api.rb +67 -0
  58. data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_api.rb +225 -0
  59. data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_cumulative_statistics_api.rb +62 -0
  60. data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_real_time_statistics_api.rb +35 -0
  61. data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_statistics_api.rb +61 -0
  62. data/lib/twilio_ap_is/apis/verify_v2_service_api.rb +178 -0
  63. data/lib/twilio_ap_is/apis/verify_v2_verification_api.rb +143 -0
  64. data/lib/twilio_ap_is/apis/verify_v2_verification_check_api.rb +61 -0
  65. data/lib/twilio_ap_is/client.rb +417 -0
  66. data/lib/twilio_ap_is/configuration.rb +187 -0
  67. data/lib/twilio_ap_is/exceptions/api_exception.rb +21 -0
  68. data/lib/twilio_ap_is/exceptions/v2_services_verifications429_error_exception.rb +63 -0
  69. data/lib/twilio_ap_is/http/api_response.rb +19 -0
  70. data/lib/twilio_ap_is/http/auth/basic_auth.rb +62 -0
  71. data/lib/twilio_ap_is/http/http_call_back.rb +10 -0
  72. data/lib/twilio_ap_is/http/http_method_enum.rb +10 -0
  73. data/lib/twilio_ap_is/http/http_request.rb +10 -0
  74. data/lib/twilio_ap_is/http/http_response.rb +10 -0
  75. data/lib/twilio_ap_is/http/proxy_settings.rb +22 -0
  76. data/lib/twilio_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
  77. data/lib/twilio_ap_is/logging/sdk_logger.rb +17 -0
  78. data/lib/twilio_ap_is/models/access_token.rb +188 -0
  79. data/lib/twilio_ap_is/models/access_token_enum_factor_types.rb +26 -0
  80. data/lib/twilio_ap_is/models/activity.rb +189 -0
  81. data/lib/twilio_ap_is/models/auth_token_promotion.rb +142 -0
  82. data/lib/twilio_ap_is/models/base_model.rb +110 -0
  83. data/lib/twilio_ap_is/models/binding.rb +269 -0
  84. data/lib/twilio_ap_is/models/binding_binding_type.rb +53 -0
  85. data/lib/twilio_ap_is/models/bucket.rb +186 -0
  86. data/lib/twilio_ap_is/models/bulk_consents.rb +83 -0
  87. data/lib/twilio_ap_is/models/bulk_contacts.rb +83 -0
  88. data/lib/twilio_ap_is/models/challenge.rb +317 -0
  89. data/lib/twilio_ap_is/models/challenge_enum_challenge_reasons.rb +41 -0
  90. data/lib/twilio_ap_is/models/challenge_enum_challenge_statuses.rb +45 -0
  91. data/lib/twilio_ap_is/models/challenge_enum_factor_types.rb +41 -0
  92. data/lib/twilio_ap_is/models/channel.rb +249 -0
  93. data/lib/twilio_ap_is/models/channel_channel_type.rb +36 -0
  94. data/lib/twilio_ap_is/models/channel_webhook_enabled_type.rb +36 -0
  95. data/lib/twilio_ap_is/models/configuration.rb +164 -0
  96. data/lib/twilio_ap_is/models/configuration_address.rb +199 -0
  97. data/lib/twilio_ap_is/models/configuration_address_auto_creation_type.rb +40 -0
  98. data/lib/twilio_ap_is/models/configuration_address_method.rb +36 -0
  99. data/lib/twilio_ap_is/models/configuration_address_type.rb +60 -0
  100. data/lib/twilio_ap_is/models/configuration_webhook.rb +154 -0
  101. data/lib/twilio_ap_is/models/configuration_webhook_method.rb +46 -0
  102. data/lib/twilio_ap_is/models/configuration_webhook_target.rb +37 -0
  103. data/lib/twilio_ap_is/models/conversation.rb +264 -0
  104. data/lib/twilio_ap_is/models/conversation_message.rb +268 -0
  105. data/lib/twilio_ap_is/models/conversation_message_order_type.rb +36 -0
  106. data/lib/twilio_ap_is/models/conversation_message_receipt.rb +219 -0
  107. data/lib/twilio_ap_is/models/conversation_message_receipt_delivery_status.rb +49 -0
  108. data/lib/twilio_ap_is/models/conversation_participant.rb +240 -0
  109. data/lib/twilio_ap_is/models/conversation_scoped_webhook.rb +178 -0
  110. data/lib/twilio_ap_is/models/conversation_scoped_webhook_method.rb +36 -0
  111. data/lib/twilio_ap_is/models/conversation_scoped_webhook_target.rb +40 -0
  112. data/lib/twilio_ap_is/models/conversation_state.rb +45 -0
  113. data/lib/twilio_ap_is/models/conversation_webhook_method.rb +36 -0
  114. data/lib/twilio_ap_is/models/conversation_webhook_target.rb +37 -0
  115. data/lib/twilio_ap_is/models/conversation_with_participants.rb +264 -0
  116. data/lib/twilio_ap_is/models/conversation_with_participants_state.rb +45 -0
  117. data/lib/twilio_ap_is/models/credential.rb +175 -0
  118. data/lib/twilio_ap_is/models/credential1.rb +174 -0
  119. data/lib/twilio_ap_is/models/credential_aws.rb +153 -0
  120. data/lib/twilio_ap_is/models/credential_public_key.rb +153 -0
  121. data/lib/twilio_ap_is/models/credential_push_type.rb +41 -0
  122. data/lib/twilio_ap_is/models/entity.rb +177 -0
  123. data/lib/twilio_ap_is/models/event.rb +270 -0
  124. data/lib/twilio_ap_is/models/factor.rb +235 -0
  125. data/lib/twilio_ap_is/models/factor_enum_factor_statuses.rb +36 -0
  126. data/lib/twilio_ap_is/models/factor_enum_factor_type.rb +40 -0
  127. data/lib/twilio_ap_is/models/factor_enum_notification_platforms.rb +40 -0
  128. data/lib/twilio_ap_is/models/factor_enum_totp_algorithms.rb +40 -0
  129. data/lib/twilio_ap_is/models/form_enum_form_types.rb +26 -0
  130. data/lib/twilio_ap_is/models/list_activity_response.rb +94 -0
  131. data/lib/twilio_ap_is/models/list_binding_response.rb +94 -0
  132. data/lib/twilio_ap_is/models/list_configuration_address_response.rb +95 -0
  133. data/lib/twilio_ap_is/models/list_conversation_message_receipt_response.rb +95 -0
  134. data/lib/twilio_ap_is/models/list_conversation_message_response.rb +94 -0
  135. data/lib/twilio_ap_is/models/list_conversation_participant_response.rb +94 -0
  136. data/lib/twilio_ap_is/models/list_conversation_response.rb +94 -0
  137. data/lib/twilio_ap_is/models/list_conversation_scoped_webhook_response.rb +94 -0
  138. data/lib/twilio_ap_is/models/list_credential_aws_response.rb +94 -0
  139. data/lib/twilio_ap_is/models/list_credential_public_key_response.rb +94 -0
  140. data/lib/twilio_ap_is/models/list_credential_response.rb +94 -0
  141. data/lib/twilio_ap_is/models/list_event_response.rb +94 -0
  142. data/lib/twilio_ap_is/models/list_participant_conversation_response.rb +94 -0
  143. data/lib/twilio_ap_is/models/list_role_response.rb +94 -0
  144. data/lib/twilio_ap_is/models/list_service_binding_response.rb +94 -0
  145. data/lib/twilio_ap_is/models/list_service_conversation_message_receipt_response.rb +95 -0
  146. data/lib/twilio_ap_is/models/list_service_conversation_message_response.rb +94 -0
  147. data/lib/twilio_ap_is/models/list_service_conversation_participant_response.rb +94 -0
  148. data/lib/twilio_ap_is/models/list_service_conversation_response.rb +94 -0
  149. data/lib/twilio_ap_is/models/list_service_conversation_scoped_webhook_response.rb +94 -0
  150. data/lib/twilio_ap_is/models/list_service_participant_conversation_response.rb +94 -0
  151. data/lib/twilio_ap_is/models/list_service_response.rb +94 -0
  152. data/lib/twilio_ap_is/models/list_service_role_response.rb +94 -0
  153. data/lib/twilio_ap_is/models/list_service_user_conversation_response.rb +94 -0
  154. data/lib/twilio_ap_is/models/list_service_user_response.rb +94 -0
  155. data/lib/twilio_ap_is/models/list_task_channel_response.rb +94 -0
  156. data/lib/twilio_ap_is/models/list_task_queue_response.rb +94 -0
  157. data/lib/twilio_ap_is/models/list_task_queues_statistics_response.rb +95 -0
  158. data/lib/twilio_ap_is/models/list_task_reservation_response.rb +94 -0
  159. data/lib/twilio_ap_is/models/list_task_response.rb +94 -0
  160. data/lib/twilio_ap_is/models/list_user_conversation_response.rb +94 -0
  161. data/lib/twilio_ap_is/models/list_user_response.rb +94 -0
  162. data/lib/twilio_ap_is/models/list_worker_channel_response.rb +94 -0
  163. data/lib/twilio_ap_is/models/list_worker_reservation_response.rb +94 -0
  164. data/lib/twilio_ap_is/models/list_worker_response.rb +94 -0
  165. data/lib/twilio_ap_is/models/list_workflow_response.rb +94 -0
  166. data/lib/twilio_ap_is/models/list_workspace_response.rb +94 -0
  167. data/lib/twilio_ap_is/models/messaging_configuration.rb +170 -0
  168. data/lib/twilio_ap_is/models/meta.rb +140 -0
  169. data/lib/twilio_ap_is/models/msg_geopermissions.rb +86 -0
  170. data/lib/twilio_ap_is/models/new_factor.rb +277 -0
  171. data/lib/twilio_ap_is/models/new_factor_enum_factor_statuses.rb +36 -0
  172. data/lib/twilio_ap_is/models/new_factor_enum_factor_types.rb +40 -0
  173. data/lib/twilio_ap_is/models/new_factor_enum_notification_platforms.rb +40 -0
  174. data/lib/twilio_ap_is/models/new_factor_enum_totp_algorithms.rb +40 -0
  175. data/lib/twilio_ap_is/models/notif_priority.rb +43 -0
  176. data/lib/twilio_ap_is/models/notification.rb +363 -0
  177. data/lib/twilio_ap_is/models/notification1.rb +181 -0
  178. data/lib/twilio_ap_is/models/participant_conversation.rb +325 -0
  179. data/lib/twilio_ap_is/models/participant_conversation_state.rb +41 -0
  180. data/lib/twilio_ap_is/models/rate_limit.rb +189 -0
  181. data/lib/twilio_ap_is/models/role.rb +192 -0
  182. data/lib/twilio_ap_is/models/role_role_type.rb +40 -0
  183. data/lib/twilio_ap_is/models/safelist.rb +88 -0
  184. data/lib/twilio_ap_is/models/safelist1.rb +99 -0
  185. data/lib/twilio_ap_is/models/secondary_auth_token.rb +145 -0
  186. data/lib/twilio_ap_is/models/service.rb +164 -0
  187. data/lib/twilio_ap_is/models/service1.rb +380 -0
  188. data/lib/twilio_ap_is/models/service2.rb +350 -0
  189. data/lib/twilio_ap_is/models/service_binding.rb +226 -0
  190. data/lib/twilio_ap_is/models/service_binding_binding_type.rb +47 -0
  191. data/lib/twilio_ap_is/models/service_configuration.rb +180 -0
  192. data/lib/twilio_ap_is/models/service_conversation.rb +264 -0
  193. data/lib/twilio_ap_is/models/service_conversation_message.rb +282 -0
  194. data/lib/twilio_ap_is/models/service_conversation_message_order_type.rb +36 -0
  195. data/lib/twilio_ap_is/models/service_conversation_message_receipt.rb +233 -0
  196. data/lib/twilio_ap_is/models/service_conversation_message_receipt_delivery_status.rb +49 -0
  197. data/lib/twilio_ap_is/models/service_conversation_participant.rb +256 -0
  198. data/lib/twilio_ap_is/models/service_conversation_scoped_webhook.rb +191 -0
  199. data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_method.rb +36 -0
  200. data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_target.rb +40 -0
  201. data/lib/twilio_ap_is/models/service_conversation_state.rb +45 -0
  202. data/lib/twilio_ap_is/models/service_conversation_with_participants.rb +264 -0
  203. data/lib/twilio_ap_is/models/service_conversation_with_participants_state.rb +45 -0
  204. data/lib/twilio_ap_is/models/service_notification.rb +155 -0
  205. data/lib/twilio_ap_is/models/service_participant_conversation.rb +325 -0
  206. data/lib/twilio_ap_is/models/service_participant_conversation_state.rb +41 -0
  207. data/lib/twilio_ap_is/models/service_role.rb +192 -0
  208. data/lib/twilio_ap_is/models/service_role_role_type.rb +40 -0
  209. data/lib/twilio_ap_is/models/service_stats_conversations_rate_limiting_errors_source.rb +36 -0
  210. data/lib/twilio_ap_is/models/service_user.rb +250 -0
  211. data/lib/twilio_ap_is/models/service_user_conversation.rb +317 -0
  212. data/lib/twilio_ap_is/models/service_user_conversation_notification_level.rb +37 -0
  213. data/lib/twilio_ap_is/models/service_user_conversation_state.rb +41 -0
  214. data/lib/twilio_ap_is/models/service_webhook_configuration.rb +160 -0
  215. data/lib/twilio_ap_is/models/service_webhook_configuration_method.rb +37 -0
  216. data/lib/twilio_ap_is/models/stats_twilsock_rate_limiting_errors_source.rb +26 -0
  217. data/lib/twilio_ap_is/models/task_channel.rb +204 -0
  218. data/lib/twilio_ap_is/models/task_queue.rb +278 -0
  219. data/lib/twilio_ap_is/models/task_queue_bulk_real_time_statistics.rb +141 -0
  220. data/lib/twilio_ap_is/models/task_queue_cumulative.rb +356 -0
  221. data/lib/twilio_ap_is/models/task_queue_real_time_statistics.rb +250 -0
  222. data/lib/twilio_ap_is/models/task_queue_statistics.rb +135 -0
  223. data/lib/twilio_ap_is/models/task_queue_task_order.rb +40 -0
  224. data/lib/twilio_ap_is/models/task_queues_stats.rb +124 -0
  225. data/lib/twilio_ap_is/models/task_reservation.rb +210 -0
  226. data/lib/twilio_ap_is/models/task_reservation_call_status.rb +44 -0
  227. data/lib/twilio_ap_is/models/task_reservation_conference_event.rb +56 -0
  228. data/lib/twilio_ap_is/models/task_reservation_status.rb +61 -0
  229. data/lib/twilio_ap_is/models/task_reservation_supervisor_mode.rb +40 -0
  230. data/lib/twilio_ap_is/models/task_router_task.rb +394 -0
  231. data/lib/twilio_ap_is/models/task_status.rb +53 -0
  232. data/lib/twilio_ap_is/models/user.rb +250 -0
  233. data/lib/twilio_ap_is/models/user_binding_binding_type.rb +52 -0
  234. data/lib/twilio_ap_is/models/user_conversation.rb +317 -0
  235. data/lib/twilio_ap_is/models/user_conversation_notification_level.rb +37 -0
  236. data/lib/twilio_ap_is/models/user_conversation_state.rb +41 -0
  237. data/lib/twilio_ap_is/models/v2_form.rb +112 -0
  238. data/lib/twilio_ap_is/models/verification.rb +262 -0
  239. data/lib/twilio_ap_is/models/verification_attempt.rb +219 -0
  240. data/lib/twilio_ap_is/models/verification_attempt_enum_attempt_status.rb +40 -0
  241. data/lib/twilio_ap_is/models/verification_attempt_enum_call_status.rb +60 -0
  242. data/lib/twilio_ap_is/models/verification_attempt_enum_channels.rb +49 -0
  243. data/lib/twilio_ap_is/models/verification_attempt_enum_conversion_status.rb +38 -0
  244. data/lib/twilio_ap_is/models/verification_attempt_enum_message_status.rb +80 -0
  245. data/lib/twilio_ap_is/models/verification_attempts.rb +129 -0
  246. data/lib/twilio_ap_is/models/verification_attempts_summary_enum_channels.rb +48 -0
  247. data/lib/twilio_ap_is/models/verification_check.rb +231 -0
  248. data/lib/twilio_ap_is/models/verification_check_enum_channel.rb +50 -0
  249. data/lib/twilio_ap_is/models/verification_enum_channel.rb +50 -0
  250. data/lib/twilio_ap_is/models/verification_enum_risk_check.rb +39 -0
  251. data/lib/twilio_ap_is/models/verification_enum_status.rb +37 -0
  252. data/lib/twilio_ap_is/models/verification_template.rb +126 -0
  253. data/lib/twilio_ap_is/models/webhook.rb +222 -0
  254. data/lib/twilio_ap_is/models/webhook_enum_status.rb +37 -0
  255. data/lib/twilio_ap_is/models/webhook_enum_version.rb +37 -0
  256. data/lib/twilio_ap_is/models/worker.rb +247 -0
  257. data/lib/twilio_ap_is/models/worker_channel.rb +244 -0
  258. data/lib/twilio_ap_is/models/worker_instance_statistics.rb +122 -0
  259. data/lib/twilio_ap_is/models/worker_reservation.rb +210 -0
  260. data/lib/twilio_ap_is/models/worker_reservation_call_status.rb +44 -0
  261. data/lib/twilio_ap_is/models/worker_reservation_conference_event.rb +56 -0
  262. data/lib/twilio_ap_is/models/worker_reservation_status.rb +61 -0
  263. data/lib/twilio_ap_is/models/worker_statistics.rb +122 -0
  264. data/lib/twilio_ap_is/models/workers_cumulative_statistics.rb +221 -0
  265. data/lib/twilio_ap_is/models/workers_real_time_statistics.rb +124 -0
  266. data/lib/twilio_ap_is/models/workflow.rb +247 -0
  267. data/lib/twilio_ap_is/models/workflow_cumulative_statistics.rb +347 -0
  268. data/lib/twilio_ap_is/models/workflow_real_time_statistics.rb +173 -0
  269. data/lib/twilio_ap_is/models/workflow_statistics.rb +135 -0
  270. data/lib/twilio_ap_is/models/workspace.rb +285 -0
  271. data/lib/twilio_ap_is/models/workspace_cumulative_statistics.rb +334 -0
  272. data/lib/twilio_ap_is/models/workspace_queue_order.rb +40 -0
  273. data/lib/twilio_ap_is/models/workspace_real_time_statistics.rb +185 -0
  274. data/lib/twilio_ap_is/models/workspace_statistics.rb +122 -0
  275. data/lib/twilio_ap_is/utilities/date_time_helper.rb +11 -0
  276. data/lib/twilio_ap_is/utilities/file_wrapper.rb +28 -0
  277. data/lib/twilio_ap_is.rb +326 -0
  278. metadata +361 -0
@@ -0,0 +1,136 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioApIs
7
+ # AccountsV1PublicKeyApi
8
+ class AccountsV1PublicKeyApi < BaseApi
9
+ # Retrieves a collection of Public Key Credentials belonging to the account
10
+ # used to make the request
11
+ # @param [Integer] page_size Optional parameter: How many resources to
12
+ # return in each list page. The default is 50, and the maximum is 1000.
13
+ # @param [Integer] page Optional parameter: The page index. This value is
14
+ # simply for client state.
15
+ # @param [String] page_token Optional parameter: The page token. This is
16
+ # provided by the API.
17
+ # @return [ApiResponse] Complete http response with raw body and status code.
18
+ def list_credential_public_key(page_size: nil,
19
+ page: nil,
20
+ page_token: nil)
21
+ @api_call
22
+ .request(new_request_builder(HttpMethodEnum::GET,
23
+ '/v1/Credentials/PublicKeys',
24
+ Server::DEFAULT)
25
+ .query_param(new_parameter(page_size, key: 'PageSize'))
26
+ .query_param(new_parameter(page, key: 'Page'))
27
+ .query_param(new_parameter(page_token, key: 'PageToken'))
28
+ .header_param(new_parameter('application/json', key: 'accept'))
29
+ .auth(Single.new('accountSid_authToken')))
30
+ .response(new_response_handler
31
+ .deserializer(APIHelper.method(:custom_type_deserializer))
32
+ .deserialize_into(ListCredentialPublicKeyResponse.method(:from_hash))
33
+ .is_api_response(true))
34
+ .execute
35
+ end
36
+
37
+ # Create a new Public Key Credential
38
+ # @param [String] public_key Required parameter: A URL encoded
39
+ # representation of the public key. For example, `-----BEGIN PUBLIC
40
+ # KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----`
41
+ # @param [String] friendly_name Optional parameter: A descriptive string
42
+ # that you create to describe the resource. It can be up to 64 characters
43
+ # long.
44
+ # @param [String] account_sid Optional parameter: The SID of the Subaccount
45
+ # that this Credential should be associated with. Must be a valid Subaccount
46
+ # of the account issuing the request
47
+ # @return [ApiResponse] Complete http response with raw body and status code.
48
+ def create_credential_public_key(public_key,
49
+ friendly_name: nil,
50
+ account_sid: nil)
51
+ @api_call
52
+ .request(new_request_builder(HttpMethodEnum::POST,
53
+ '/v1/Credentials/PublicKeys',
54
+ Server::DEFAULT)
55
+ .form_param(new_parameter(public_key, key: 'PublicKey')
56
+ .is_required(true))
57
+ .form_param(new_parameter(friendly_name, key: 'FriendlyName'))
58
+ .form_param(new_parameter(account_sid, key: 'AccountSid'))
59
+ .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
60
+ .header_param(new_parameter('application/json', key: 'accept'))
61
+ .auth(Single.new('accountSid_authToken')))
62
+ .response(new_response_handler
63
+ .deserializer(APIHelper.method(:custom_type_deserializer))
64
+ .deserialize_into(CredentialPublicKey.method(:from_hash))
65
+ .is_api_response(true))
66
+ .execute
67
+ end
68
+
69
+ # Fetch the public key specified by the provided Credential Sid
70
+ # @param [String] sid Required parameter: The Twilio-provided string that
71
+ # uniquely identifies the PublicKey resource to fetch.
72
+ # @return [ApiResponse] Complete http response with raw body and status code.
73
+ def fetch_credential_public_key(sid)
74
+ @api_call
75
+ .request(new_request_builder(HttpMethodEnum::GET,
76
+ '/v1/Credentials/PublicKeys/{Sid}',
77
+ Server::DEFAULT)
78
+ .template_param(new_parameter(sid, key: 'Sid')
79
+ .is_required(true)
80
+ .should_encode(true))
81
+ .header_param(new_parameter('application/json', key: 'accept'))
82
+ .auth(Single.new('accountSid_authToken')))
83
+ .response(new_response_handler
84
+ .deserializer(APIHelper.method(:custom_type_deserializer))
85
+ .deserialize_into(CredentialPublicKey.method(:from_hash))
86
+ .is_api_response(true))
87
+ .execute
88
+ end
89
+
90
+ # Modify the properties of a given Account
91
+ # @param [String] sid Required parameter: The Twilio-provided string that
92
+ # uniquely identifies the PublicKey resource to update.
93
+ # @param [String] friendly_name Optional parameter: A descriptive string
94
+ # that you create to describe the resource. It can be up to 64 characters
95
+ # long.
96
+ # @return [ApiResponse] Complete http response with raw body and status code.
97
+ def update_credential_public_key(sid,
98
+ friendly_name: nil)
99
+ @api_call
100
+ .request(new_request_builder(HttpMethodEnum::POST,
101
+ '/v1/Credentials/PublicKeys/{Sid}',
102
+ Server::DEFAULT)
103
+ .template_param(new_parameter(sid, key: 'Sid')
104
+ .is_required(true)
105
+ .should_encode(true))
106
+ .form_param(new_parameter(friendly_name, key: 'FriendlyName'))
107
+ .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
108
+ .header_param(new_parameter('application/json', key: 'accept'))
109
+ .auth(Single.new('accountSid_authToken')))
110
+ .response(new_response_handler
111
+ .deserializer(APIHelper.method(:custom_type_deserializer))
112
+ .deserialize_into(CredentialPublicKey.method(:from_hash))
113
+ .is_api_response(true))
114
+ .execute
115
+ end
116
+
117
+ # Delete a Credential from your account
118
+ # @param [String] sid Required parameter: The Twilio-provided string that
119
+ # uniquely identifies the PublicKey resource to delete.
120
+ # @return [ApiResponse] Complete http response with raw body and status code.
121
+ def delete_credential_public_key(sid)
122
+ @api_call
123
+ .request(new_request_builder(HttpMethodEnum::DELETE,
124
+ '/v1/Credentials/PublicKeys/{Sid}',
125
+ Server::DEFAULT)
126
+ .template_param(new_parameter(sid, key: 'Sid')
127
+ .is_required(true)
128
+ .should_encode(true))
129
+ .auth(Single.new('accountSid_authToken')))
130
+ .response(new_response_handler
131
+ .is_response_void(true)
132
+ .is_api_response(true))
133
+ .execute
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,69 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioApIs
7
+ # AccountsV1SafelistApi
8
+ class AccountsV1SafelistApi < BaseApi
9
+ # Add a new phone number or phone number 1k prefix to SafeList.
10
+ # @param [String] phone_number Required parameter: The phone number or phone
11
+ # number 1k prefix to be added in SafeList. Phone numbers must be in [E.164
12
+ # format](https://www.twilio.com/docs/glossary/what-e164).
13
+ # @return [ApiResponse] Complete http response with raw body and status code.
14
+ def create_safelist(phone_number)
15
+ @api_call
16
+ .request(new_request_builder(HttpMethodEnum::POST,
17
+ '/v1/SafeList/Numbers',
18
+ Server::DEFAULT)
19
+ .form_param(new_parameter(phone_number, key: 'PhoneNumber')
20
+ .is_required(true))
21
+ .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
22
+ .header_param(new_parameter('application/json', key: 'accept'))
23
+ .auth(Single.new('accountSid_authToken')))
24
+ .response(new_response_handler
25
+ .deserializer(APIHelper.method(:custom_type_deserializer))
26
+ .deserialize_into(Safelist.method(:from_hash))
27
+ .is_api_response(true))
28
+ .execute
29
+ end
30
+
31
+ # Check if a phone number or phone number 1k prefix exists in SafeList.
32
+ # @param [String] phone_number Optional parameter: The phone number or phone
33
+ # number 1k prefix to be fetched from SafeList. Phone numbers must be in
34
+ # [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
35
+ # @return [ApiResponse] Complete http response with raw body and status code.
36
+ def fetch_safelist(phone_number: nil)
37
+ @api_call
38
+ .request(new_request_builder(HttpMethodEnum::GET,
39
+ '/v1/SafeList/Numbers',
40
+ Server::DEFAULT)
41
+ .query_param(new_parameter(phone_number, key: 'PhoneNumber'))
42
+ .header_param(new_parameter('application/json', key: 'accept'))
43
+ .auth(Single.new('accountSid_authToken')))
44
+ .response(new_response_handler
45
+ .deserializer(APIHelper.method(:custom_type_deserializer))
46
+ .deserialize_into(Safelist.method(:from_hash))
47
+ .is_api_response(true))
48
+ .execute
49
+ end
50
+
51
+ # Remove a phone number or phone number 1k prefix from SafeList.
52
+ # @param [String] phone_number Optional parameter: The phone number or phone
53
+ # number 1k prefix to be removed from SafeList. Phone numbers must be in
54
+ # [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
55
+ # @return [ApiResponse] Complete http response with raw body and status code.
56
+ def delete_safelist(phone_number: nil)
57
+ @api_call
58
+ .request(new_request_builder(HttpMethodEnum::DELETE,
59
+ '/v1/SafeList/Numbers',
60
+ Server::DEFAULT)
61
+ .query_param(new_parameter(phone_number, key: 'PhoneNumber'))
62
+ .auth(Single.new('accountSid_authToken')))
63
+ .response(new_response_handler
64
+ .is_response_void(true)
65
+ .is_api_response(true))
66
+ .execute
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,39 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioApIs
7
+ # AccountsV1SecondaryAuthTokenApi
8
+ class AccountsV1SecondaryAuthTokenApi < BaseApi
9
+ # Create a new secondary Auth Token
10
+ # @return [ApiResponse] Complete http response with raw body and status code.
11
+ def create_secondary_auth_token
12
+ @api_call
13
+ .request(new_request_builder(HttpMethodEnum::POST,
14
+ '/v1/AuthTokens/Secondary',
15
+ Server::DEFAULT)
16
+ .header_param(new_parameter('application/json', key: 'accept'))
17
+ .auth(Single.new('accountSid_authToken')))
18
+ .response(new_response_handler
19
+ .deserializer(APIHelper.method(:custom_type_deserializer))
20
+ .deserialize_into(SecondaryAuthToken.method(:from_hash))
21
+ .is_api_response(true))
22
+ .execute
23
+ end
24
+
25
+ # Delete the secondary Auth Token from your account
26
+ # @return [ApiResponse] Complete http response with raw body and status code.
27
+ def delete_secondary_auth_token
28
+ @api_call
29
+ .request(new_request_builder(HttpMethodEnum::DELETE,
30
+ '/v1/AuthTokens/Secondary',
31
+ Server::DEFAULT)
32
+ .auth(Single.new('accountSid_authToken')))
33
+ .response(new_response_handler
34
+ .is_response_void(true)
35
+ .is_api_response(true))
36
+ .execute
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,67 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioApIs
7
+ # BaseApi.
8
+ class BaseApi
9
+ include CoreLibrary
10
+ attr_accessor :config, :http_call_back
11
+
12
+ def self.user_agent
13
+ 'Ruby-SDK/1.0.0 (OS: {os-info}, Engine: {engine}/{engine-version})'
14
+ end
15
+
16
+ def self.user_agent_parameters
17
+ {
18
+ '{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
19
+ '{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
20
+ '{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
21
+ }
22
+ end
23
+
24
+ GLOBAL_ERRORS = {
25
+ 'default' => ErrorCase.new
26
+ .error_message('HTTP response not OK.')
27
+ .exception_type(APIException)
28
+ }.freeze
29
+
30
+ # Initialization constructor.
31
+ # @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
32
+ def initialize(global_configuration)
33
+ @global_configuration = global_configuration
34
+ @config = @global_configuration.client_configuration
35
+ @http_call_back = @config.http_callback
36
+ @api_call = ApiCall.new(@global_configuration)
37
+ end
38
+
39
+ # Creates a new instance of the request builder.
40
+ # @param [String] http_method The HTTP method to use in the request.
41
+ # @param [String] path The endpoint path to use in the request.
42
+ # @param [String] server The server to extract the base uri for the request.
43
+ # @return [RequestBuilder] The instance of RequestBuilder.
44
+ def new_request_builder(http_method, path, server)
45
+ RequestBuilder.new
46
+ .http_method(http_method)
47
+ .path(path)
48
+ .server(server)
49
+ end
50
+
51
+ # Creates a new instance of the response handler.
52
+ # @return [ResponseHandler] The instance of ResponseHandler.
53
+ def new_response_handler
54
+ ResponseHandler.new
55
+ end
56
+
57
+ # Creates a new instance of the parameter.
58
+ # @param [String|optional] key The key of the parameter.
59
+ # @param [Object] value The value of the parameter.
60
+ # @return [Parameter] The instance of Parameter.
61
+ def new_parameter(value, key: nil)
62
+ Parameter.new
63
+ .key(key)
64
+ .value(value)
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,51 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioApIs
7
+ # ChatV3ChannelApi
8
+ class ChatV3ChannelApi < BaseApi
9
+ # Update a specific Channel.
10
+ # @param [String] service_sid Required parameter: The unique SID identifier
11
+ # of the Service.
12
+ # @param [String] sid Required parameter: A 34 character string that
13
+ # uniquely identifies this Channel.
14
+ # @param [ChannelWebhookEnabledType] x_twilio_webhook_enabled Optional
15
+ # parameter: The X-Twilio-Webhook-Enabled HTTP request header
16
+ # @param [ChannelChannelType] type Optional parameter: The visibility of the
17
+ # channel. Can be: `public` or `private`.
18
+ # @param [String] messaging_service_sid Optional parameter: The unique ID of
19
+ # the [Messaging
20
+ # Service](https://www.twilio.com/docs/messaging/api/service-resource) this
21
+ # channel belongs to.
22
+ # @return [ApiResponse] Complete http response with raw body and status code.
23
+ def update_channel(service_sid,
24
+ sid,
25
+ x_twilio_webhook_enabled: nil,
26
+ type: nil,
27
+ messaging_service_sid: nil)
28
+ @api_call
29
+ .request(new_request_builder(HttpMethodEnum::POST,
30
+ '/v3/Services/{ServiceSid}/Channels/{Sid}',
31
+ Server::DEFAULT1)
32
+ .template_param(new_parameter(service_sid, key: 'ServiceSid')
33
+ .is_required(true)
34
+ .should_encode(true))
35
+ .template_param(new_parameter(sid, key: 'Sid')
36
+ .is_required(true)
37
+ .should_encode(true))
38
+ .header_param(new_parameter(x_twilio_webhook_enabled, key: 'X-Twilio-Webhook-Enabled'))
39
+ .form_param(new_parameter(type, key: 'Type'))
40
+ .form_param(new_parameter(messaging_service_sid, key: 'MessagingServiceSid'))
41
+ .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
42
+ .header_param(new_parameter('application/json', key: 'accept'))
43
+ .auth(Single.new('accountSid_authToken')))
44
+ .response(new_response_handler
45
+ .deserializer(APIHelper.method(:custom_type_deserializer))
46
+ .deserialize_into(Channel.method(:from_hash))
47
+ .is_api_response(true))
48
+ .execute
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,218 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TwilioApIs
7
+ # ConversationsV1AddressConfigurationApi
8
+ class ConversationsV1AddressConfigurationApi < BaseApi
9
+ # Retrieve a list of address configurations for an account
10
+ # @param [String] type Optional parameter: Filter the address configurations
11
+ # by its type. This value can be one of: `whatsapp`, `sms`.
12
+ # @param [Integer] page_size Optional parameter: How many resources to
13
+ # return in each list page. The default is 50, and the maximum is 50.
14
+ # @param [Integer] page Optional parameter: The page index. This value is
15
+ # simply for client state.
16
+ # @param [String] page_token Optional parameter: The page token. This is
17
+ # provided by the API.
18
+ # @return [ApiResponse] Complete http response with raw body and status code.
19
+ def list_configuration_address(type: nil,
20
+ page_size: nil,
21
+ page: nil,
22
+ page_token: nil)
23
+ @api_call
24
+ .request(new_request_builder(HttpMethodEnum::GET,
25
+ '/v1/Configuration/Addresses',
26
+ Server::DEFAULT2)
27
+ .query_param(new_parameter(type, key: 'Type'))
28
+ .query_param(new_parameter(page_size, key: 'PageSize'))
29
+ .query_param(new_parameter(page, key: 'Page'))
30
+ .query_param(new_parameter(page_token, key: 'PageToken'))
31
+ .header_param(new_parameter('application/json', key: 'accept'))
32
+ .auth(Single.new('accountSid_authToken')))
33
+ .response(new_response_handler
34
+ .deserializer(APIHelper.method(:custom_type_deserializer))
35
+ .deserialize_into(ListConfigurationAddressResponse.method(:from_hash))
36
+ .is_api_response(true))
37
+ .execute
38
+ end
39
+
40
+ # Create a new address configuration
41
+ # @param [ConfigurationAddressType] type Required parameter: Type of
42
+ # Address, value can be `whatsapp` or `sms`.
43
+ # @param [String] address Required parameter: The unique address to be
44
+ # configured. The address can be a whatsapp address or phone number
45
+ # @param [String] friendly_name Optional parameter: The human-readable name
46
+ # of this configuration, limited to 256 characters. Optional.
47
+ # @param [TrueClass | FalseClass] auto_creation_enabled Optional parameter:
48
+ # Enable/Disable auto-creating conversations for messages to this address
49
+ # @param [ConfigurationAddressAutoCreationType] auto_creation_type Optional
50
+ # parameter: TODO: type description here
51
+ # @param [String] auto_creation_conversation_service_sid Optional parameter:
52
+ # Conversation Service for the auto-created conversation. If not set, the
53
+ # conversation is created in the default service.
54
+ # @param [String] auto_creation_webhook_url Optional parameter: For type
55
+ # `webhook`, the url for the webhook request.
56
+ # @param [ConfigurationAddressMethod] auto_creation_webhook_method Optional
57
+ # parameter: TODO: type description here
58
+ # @param [Array[String]] auto_creation_webhook_filters Optional parameter:
59
+ # The list of events, firing webhook event for this Conversation. Values can
60
+ # be any of the following: `onMessageAdded`, `onMessageUpdated`,
61
+ # `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`,
62
+ # `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`,
63
+ # `onParticipantRemoved`, `onDeliveryUpdated`
64
+ # @param [String] auto_creation_studio_flow_sid Optional parameter: For type
65
+ # `studio`, the studio flow SID where the webhook should be sent to.
66
+ # @param [Integer] auto_creation_studio_retry_count Optional parameter: For
67
+ # type `studio`, number of times to retry the webhook request
68
+ # @param [String] address_country Optional parameter: An ISO 3166-1 alpha-2n
69
+ # country code which the address belongs to. This is currently only
70
+ # applicable to short code addresses.
71
+ # @return [ApiResponse] Complete http response with raw body and status code.
72
+ def create_configuration_address(type,
73
+ address,
74
+ friendly_name: nil,
75
+ auto_creation_enabled: nil,
76
+ auto_creation_type: nil,
77
+ auto_creation_conversation_service_sid: nil,
78
+ auto_creation_webhook_url: nil,
79
+ auto_creation_webhook_method: nil,
80
+ auto_creation_webhook_filters: nil,
81
+ auto_creation_studio_flow_sid: nil,
82
+ auto_creation_studio_retry_count: nil,
83
+ address_country: nil)
84
+ @api_call
85
+ .request(new_request_builder(HttpMethodEnum::POST,
86
+ '/v1/Configuration/Addresses',
87
+ Server::DEFAULT2)
88
+ .form_param(new_parameter(type, key: 'Type')
89
+ .is_required(true))
90
+ .form_param(new_parameter(address, key: 'Address')
91
+ .is_required(true))
92
+ .form_param(new_parameter(friendly_name, key: 'FriendlyName'))
93
+ .form_param(new_parameter(auto_creation_enabled, key: 'AutoCreation.Enabled'))
94
+ .form_param(new_parameter(auto_creation_type, key: 'AutoCreation.Type'))
95
+ .form_param(new_parameter(auto_creation_conversation_service_sid, key: 'AutoCreation.ConversationServiceSid'))
96
+ .form_param(new_parameter(auto_creation_webhook_url, key: 'AutoCreation.WebhookUrl'))
97
+ .form_param(new_parameter(auto_creation_webhook_method, key: 'AutoCreation.WebhookMethod'))
98
+ .form_param(new_parameter(auto_creation_webhook_filters, key: 'AutoCreation.WebhookFilters'))
99
+ .form_param(new_parameter(auto_creation_studio_flow_sid, key: 'AutoCreation.StudioFlowSid'))
100
+ .form_param(new_parameter(auto_creation_studio_retry_count, key: 'AutoCreation.StudioRetryCount'))
101
+ .form_param(new_parameter(address_country, key: 'AddressCountry'))
102
+ .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
103
+ .header_param(new_parameter('application/json', key: 'accept'))
104
+ .auth(Single.new('accountSid_authToken')))
105
+ .response(new_response_handler
106
+ .deserializer(APIHelper.method(:custom_type_deserializer))
107
+ .deserialize_into(ConfigurationAddress.method(:from_hash))
108
+ .is_api_response(true))
109
+ .execute
110
+ end
111
+
112
+ # Fetch an address configuration
113
+ # @param [String] sid Required parameter: The SID of the Address
114
+ # Configuration resource. This value can be either the `sid` or the
115
+ # `address` of the configuration
116
+ # @return [ApiResponse] Complete http response with raw body and status code.
117
+ def fetch_configuration_address(sid)
118
+ @api_call
119
+ .request(new_request_builder(HttpMethodEnum::GET,
120
+ '/v1/Configuration/Addresses/{Sid}',
121
+ Server::DEFAULT2)
122
+ .template_param(new_parameter(sid, key: 'Sid')
123
+ .is_required(true)
124
+ .should_encode(true))
125
+ .header_param(new_parameter('application/json', key: 'accept'))
126
+ .auth(Single.new('accountSid_authToken')))
127
+ .response(new_response_handler
128
+ .deserializer(APIHelper.method(:custom_type_deserializer))
129
+ .deserialize_into(ConfigurationAddress.method(:from_hash))
130
+ .is_api_response(true))
131
+ .execute
132
+ end
133
+
134
+ # Update an existing address configuration
135
+ # @param [String] sid Required parameter: The SID of the Address
136
+ # Configuration resource. This value can be either the `sid` or the
137
+ # `address` of the configuration
138
+ # @param [String] friendly_name Optional parameter: The human-readable name
139
+ # of this configuration, limited to 256 characters. Optional.
140
+ # @param [TrueClass | FalseClass] auto_creation_enabled Optional parameter:
141
+ # Enable/Disable auto-creating conversations for messages to this address
142
+ # @param [ConfigurationAddressAutoCreationType] auto_creation_type Optional
143
+ # parameter: TODO: type description here
144
+ # @param [String] auto_creation_conversation_service_sid Optional parameter:
145
+ # Conversation Service for the auto-created conversation. If not set, the
146
+ # conversation is created in the default service.
147
+ # @param [String] auto_creation_webhook_url Optional parameter: For type
148
+ # `webhook`, the url for the webhook request.
149
+ # @param [ConfigurationAddressMethod] auto_creation_webhook_method Optional
150
+ # parameter: TODO: type description here
151
+ # @param [Array[String]] auto_creation_webhook_filters Optional parameter:
152
+ # The list of events, firing webhook event for this Conversation. Values can
153
+ # be any of the following: `onMessageAdded`, `onMessageUpdated`,
154
+ # `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`,
155
+ # `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`,
156
+ # `onParticipantRemoved`, `onDeliveryUpdated`
157
+ # @param [String] auto_creation_studio_flow_sid Optional parameter: For type
158
+ # `studio`, the studio flow SID where the webhook should be sent to.
159
+ # @param [Integer] auto_creation_studio_retry_count Optional parameter: For
160
+ # type `studio`, number of times to retry the webhook request
161
+ # @return [ApiResponse] Complete http response with raw body and status code.
162
+ def update_configuration_address(sid,
163
+ friendly_name: nil,
164
+ auto_creation_enabled: nil,
165
+ auto_creation_type: nil,
166
+ auto_creation_conversation_service_sid: nil,
167
+ auto_creation_webhook_url: nil,
168
+ auto_creation_webhook_method: nil,
169
+ auto_creation_webhook_filters: nil,
170
+ auto_creation_studio_flow_sid: nil,
171
+ auto_creation_studio_retry_count: nil)
172
+ @api_call
173
+ .request(new_request_builder(HttpMethodEnum::POST,
174
+ '/v1/Configuration/Addresses/{Sid}',
175
+ Server::DEFAULT2)
176
+ .template_param(new_parameter(sid, key: 'Sid')
177
+ .is_required(true)
178
+ .should_encode(true))
179
+ .form_param(new_parameter(friendly_name, key: 'FriendlyName'))
180
+ .form_param(new_parameter(auto_creation_enabled, key: 'AutoCreation.Enabled'))
181
+ .form_param(new_parameter(auto_creation_type, key: 'AutoCreation.Type'))
182
+ .form_param(new_parameter(auto_creation_conversation_service_sid, key: 'AutoCreation.ConversationServiceSid'))
183
+ .form_param(new_parameter(auto_creation_webhook_url, key: 'AutoCreation.WebhookUrl'))
184
+ .form_param(new_parameter(auto_creation_webhook_method, key: 'AutoCreation.WebhookMethod'))
185
+ .form_param(new_parameter(auto_creation_webhook_filters, key: 'AutoCreation.WebhookFilters'))
186
+ .form_param(new_parameter(auto_creation_studio_flow_sid, key: 'AutoCreation.StudioFlowSid'))
187
+ .form_param(new_parameter(auto_creation_studio_retry_count, key: 'AutoCreation.StudioRetryCount'))
188
+ .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
189
+ .header_param(new_parameter('application/json', key: 'accept'))
190
+ .auth(Single.new('accountSid_authToken')))
191
+ .response(new_response_handler
192
+ .deserializer(APIHelper.method(:custom_type_deserializer))
193
+ .deserialize_into(ConfigurationAddress.method(:from_hash))
194
+ .is_api_response(true))
195
+ .execute
196
+ end
197
+
198
+ # Remove an existing address configuration
199
+ # @param [String] sid Required parameter: The SID of the Address
200
+ # Configuration resource. This value can be either the `sid` or the
201
+ # `address` of the configuration
202
+ # @return [ApiResponse] Complete http response with raw body and status code.
203
+ def delete_configuration_address(sid)
204
+ @api_call
205
+ .request(new_request_builder(HttpMethodEnum::DELETE,
206
+ '/v1/Configuration/Addresses/{Sid}',
207
+ Server::DEFAULT2)
208
+ .template_param(new_parameter(sid, key: 'Sid')
209
+ .is_required(true)
210
+ .should_encode(true))
211
+ .auth(Single.new('accountSid_authToken')))
212
+ .response(new_response_handler
213
+ .is_response_void(true)
214
+ .is_api_response(true))
215
+ .execute
216
+ end
217
+ end
218
+ end