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,350 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module TwilioApIs
8
+ # Service2 Model.
9
+ class Service2 < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # The unique string that we created to identify the Service resource.
14
+ # @return [String]
15
+ attr_accessor :sid
16
+
17
+ # The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
18
+ # created the Service resource.
19
+ # @return [String]
20
+ attr_accessor :account_sid
21
+
22
+ # The name that appears in the body of your verification messages. It can be
23
+ # up to 30 characters long and can include letters, numbers, spaces, dashes,
24
+ # underscores. Phone numbers, special characters or links are NOT allowed.
25
+ # It cannot contain more than 4 (consecutive or non-consecutive) digits.
26
+ # **This value should not contain PII.**
27
+ # @return [String]
28
+ attr_accessor :friendly_name
29
+
30
+ # The length of the verification code to generate.
31
+ # @return [Integer]
32
+ attr_accessor :code_length
33
+
34
+ # Whether to perform a lookup with each verification started and return info
35
+ # about the phone number.
36
+ # @return [TrueClass | FalseClass]
37
+ attr_accessor :lookup_enabled
38
+
39
+ # Whether to pass PSD2 transaction parameters when starting a verification.
40
+ # @return [TrueClass | FalseClass]
41
+ attr_accessor :psd2_enabled
42
+
43
+ # Whether to skip sending SMS verifications to landlines. Requires
44
+ # `lookup_enabled`.
45
+ # @return [TrueClass | FalseClass]
46
+ attr_accessor :skip_sms_to_landlines
47
+
48
+ # Whether to ask the user to press a number before delivering the verify
49
+ # code in a phone call.
50
+ # @return [TrueClass | FalseClass]
51
+ attr_accessor :dtmf_input_required
52
+
53
+ # The name of an alternative text-to-speech service to use in phone calls.
54
+ # Applies only to TTS languages.
55
+ # @return [String]
56
+ attr_accessor :tts_name
57
+
58
+ # Whether to add a security warning at the end of an SMS verification body.
59
+ # Disabled by default and applies only to SMS. Example SMS body: `Your
60
+ # AppName verification code is: 1234. Don’t share this code with anyone; our
61
+ # employees will never ask for the code`
62
+ # @return [TrueClass | FalseClass]
63
+ attr_accessor :do_not_share_warning_enabled
64
+
65
+ # Whether to allow sending verifications with a custom code instead of a
66
+ # randomly generated one.
67
+ # @return [TrueClass | FalseClass]
68
+ attr_accessor :custom_code_enabled
69
+
70
+ # Configurations for the Push factors (channel) created under this Service.
71
+ # @return [Object]
72
+ attr_accessor :push
73
+
74
+ # Configurations for the TOTP factors (channel) created under this Service.
75
+ # @return [Object]
76
+ attr_accessor :totp
77
+
78
+ # Configurations for the TOTP factors (channel) created under this Service.
79
+ # @return [String]
80
+ attr_accessor :default_template_sid
81
+
82
+ # Configurations for the TOTP factors (channel) created under this Service.
83
+ # @return [Object]
84
+ attr_accessor :whatsapp
85
+
86
+ # Configurations for the TOTP factors (channel) created under this Service.
87
+ # @return [Object]
88
+ attr_accessor :passkeys
89
+
90
+ # Whether to allow verifications from the service to reach the stream-events
91
+ # sinks if configured
92
+ # @return [TrueClass | FalseClass]
93
+ attr_accessor :verify_event_subscription_enabled
94
+
95
+ # The date and time in GMT when the resource was created specified in [RFC
96
+ # 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
97
+ # @return [DateTime]
98
+ attr_accessor :date_created
99
+
100
+ # The date and time in GMT when the resource was last updated specified in
101
+ # [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
102
+ # @return [DateTime]
103
+ attr_accessor :date_updated
104
+
105
+ # The absolute URL of the resource.
106
+ # @return [String]
107
+ attr_accessor :url
108
+
109
+ # The URLs of related resources.
110
+ # @return [Object]
111
+ attr_accessor :links
112
+
113
+ # A mapping from model property names to API property names.
114
+ def self.names
115
+ @_hash = {} if @_hash.nil?
116
+ @_hash['sid'] = 'sid'
117
+ @_hash['account_sid'] = 'account_sid'
118
+ @_hash['friendly_name'] = 'friendly_name'
119
+ @_hash['code_length'] = 'code_length'
120
+ @_hash['lookup_enabled'] = 'lookup_enabled'
121
+ @_hash['psd2_enabled'] = 'psd2_enabled'
122
+ @_hash['skip_sms_to_landlines'] = 'skip_sms_to_landlines'
123
+ @_hash['dtmf_input_required'] = 'dtmf_input_required'
124
+ @_hash['tts_name'] = 'tts_name'
125
+ @_hash['do_not_share_warning_enabled'] = 'do_not_share_warning_enabled'
126
+ @_hash['custom_code_enabled'] = 'custom_code_enabled'
127
+ @_hash['push'] = 'push'
128
+ @_hash['totp'] = 'totp'
129
+ @_hash['default_template_sid'] = 'default_template_sid'
130
+ @_hash['whatsapp'] = 'whatsapp'
131
+ @_hash['passkeys'] = 'passkeys'
132
+ @_hash['verify_event_subscription_enabled'] =
133
+ 'verify_event_subscription_enabled'
134
+ @_hash['date_created'] = 'date_created'
135
+ @_hash['date_updated'] = 'date_updated'
136
+ @_hash['url'] = 'url'
137
+ @_hash['links'] = 'links'
138
+ @_hash
139
+ end
140
+
141
+ # An array for optional fields
142
+ def self.optionals
143
+ %w[
144
+ sid
145
+ account_sid
146
+ friendly_name
147
+ code_length
148
+ lookup_enabled
149
+ psd2_enabled
150
+ skip_sms_to_landlines
151
+ dtmf_input_required
152
+ tts_name
153
+ do_not_share_warning_enabled
154
+ custom_code_enabled
155
+ push
156
+ totp
157
+ default_template_sid
158
+ whatsapp
159
+ passkeys
160
+ verify_event_subscription_enabled
161
+ date_created
162
+ date_updated
163
+ url
164
+ links
165
+ ]
166
+ end
167
+
168
+ # An array for nullable fields
169
+ def self.nullables
170
+ %w[
171
+ sid
172
+ account_sid
173
+ friendly_name
174
+ lookup_enabled
175
+ psd2_enabled
176
+ skip_sms_to_landlines
177
+ dtmf_input_required
178
+ tts_name
179
+ do_not_share_warning_enabled
180
+ custom_code_enabled
181
+ push
182
+ totp
183
+ default_template_sid
184
+ whatsapp
185
+ passkeys
186
+ verify_event_subscription_enabled
187
+ date_created
188
+ date_updated
189
+ url
190
+ links
191
+ ]
192
+ end
193
+
194
+ def initialize(sid: SKIP, account_sid: SKIP, friendly_name: SKIP,
195
+ code_length: 0, lookup_enabled: SKIP, psd2_enabled: SKIP,
196
+ skip_sms_to_landlines: SKIP, dtmf_input_required: SKIP,
197
+ tts_name: SKIP, do_not_share_warning_enabled: SKIP,
198
+ custom_code_enabled: SKIP, push: SKIP, totp: SKIP,
199
+ default_template_sid: SKIP, whatsapp: SKIP, passkeys: SKIP,
200
+ verify_event_subscription_enabled: SKIP, date_created: SKIP,
201
+ date_updated: SKIP, url: SKIP, links: SKIP,
202
+ additional_properties: nil)
203
+ # Add additional model properties to the instance
204
+ additional_properties = {} if additional_properties.nil?
205
+
206
+ @sid = sid unless sid == SKIP
207
+ @account_sid = account_sid unless account_sid == SKIP
208
+ @friendly_name = friendly_name unless friendly_name == SKIP
209
+ @code_length = code_length unless code_length == SKIP
210
+ @lookup_enabled = lookup_enabled unless lookup_enabled == SKIP
211
+ @psd2_enabled = psd2_enabled unless psd2_enabled == SKIP
212
+ @skip_sms_to_landlines = skip_sms_to_landlines unless skip_sms_to_landlines == SKIP
213
+ @dtmf_input_required = dtmf_input_required unless dtmf_input_required == SKIP
214
+ @tts_name = tts_name unless tts_name == SKIP
215
+ unless do_not_share_warning_enabled == SKIP
216
+ @do_not_share_warning_enabled =
217
+ do_not_share_warning_enabled
218
+ end
219
+ @custom_code_enabled = custom_code_enabled unless custom_code_enabled == SKIP
220
+ @push = push unless push == SKIP
221
+ @totp = totp unless totp == SKIP
222
+ @default_template_sid = default_template_sid unless default_template_sid == SKIP
223
+ @whatsapp = whatsapp unless whatsapp == SKIP
224
+ @passkeys = passkeys unless passkeys == SKIP
225
+ unless verify_event_subscription_enabled == SKIP
226
+ @verify_event_subscription_enabled =
227
+ verify_event_subscription_enabled
228
+ end
229
+ @date_created = date_created unless date_created == SKIP
230
+ @date_updated = date_updated unless date_updated == SKIP
231
+ @url = url unless url == SKIP
232
+ @links = links unless links == SKIP
233
+ @additional_properties = additional_properties
234
+ end
235
+
236
+ # Creates an instance of the object from a hash.
237
+ def self.from_hash(hash)
238
+ return nil unless hash
239
+
240
+ # Extract variables from the hash.
241
+ sid = hash.key?('sid') ? hash['sid'] : SKIP
242
+ account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
243
+ friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
244
+ code_length = hash['code_length'] ||= 0
245
+ lookup_enabled =
246
+ hash.key?('lookup_enabled') ? hash['lookup_enabled'] : SKIP
247
+ psd2_enabled = hash.key?('psd2_enabled') ? hash['psd2_enabled'] : SKIP
248
+ skip_sms_to_landlines =
249
+ hash.key?('skip_sms_to_landlines') ? hash['skip_sms_to_landlines'] : SKIP
250
+ dtmf_input_required =
251
+ hash.key?('dtmf_input_required') ? hash['dtmf_input_required'] : SKIP
252
+ tts_name = hash.key?('tts_name') ? hash['tts_name'] : SKIP
253
+ do_not_share_warning_enabled =
254
+ hash.key?('do_not_share_warning_enabled') ? hash['do_not_share_warning_enabled'] : SKIP
255
+ custom_code_enabled =
256
+ hash.key?('custom_code_enabled') ? hash['custom_code_enabled'] : SKIP
257
+ push = hash.key?('push') ? hash['push'] : SKIP
258
+ totp = hash.key?('totp') ? hash['totp'] : SKIP
259
+ default_template_sid =
260
+ hash.key?('default_template_sid') ? hash['default_template_sid'] : SKIP
261
+ whatsapp = hash.key?('whatsapp') ? hash['whatsapp'] : SKIP
262
+ passkeys = hash.key?('passkeys') ? hash['passkeys'] : SKIP
263
+ verify_event_subscription_enabled =
264
+ hash.key?('verify_event_subscription_enabled') ? hash['verify_event_subscription_enabled'] : SKIP
265
+ date_created = if hash.key?('date_created')
266
+ (DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
267
+ else
268
+ SKIP
269
+ end
270
+ date_updated = if hash.key?('date_updated')
271
+ (DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
272
+ else
273
+ SKIP
274
+ end
275
+ url = hash.key?('url') ? hash['url'] : SKIP
276
+ links = hash.key?('links') ? hash['links'] : SKIP
277
+
278
+ # Create a new hash for additional properties, removing known properties.
279
+ new_hash = hash.reject { |k, _| names.value?(k) }
280
+
281
+ additional_properties = APIHelper.get_additional_properties(
282
+ new_hash, proc { |value| value }
283
+ )
284
+
285
+ # Create object from extracted values.
286
+ Service2.new(sid: sid,
287
+ account_sid: account_sid,
288
+ friendly_name: friendly_name,
289
+ code_length: code_length,
290
+ lookup_enabled: lookup_enabled,
291
+ psd2_enabled: psd2_enabled,
292
+ skip_sms_to_landlines: skip_sms_to_landlines,
293
+ dtmf_input_required: dtmf_input_required,
294
+ tts_name: tts_name,
295
+ do_not_share_warning_enabled: do_not_share_warning_enabled,
296
+ custom_code_enabled: custom_code_enabled,
297
+ push: push,
298
+ totp: totp,
299
+ default_template_sid: default_template_sid,
300
+ whatsapp: whatsapp,
301
+ passkeys: passkeys,
302
+ verify_event_subscription_enabled: verify_event_subscription_enabled,
303
+ date_created: date_created,
304
+ date_updated: date_updated,
305
+ url: url,
306
+ links: links,
307
+ additional_properties: additional_properties)
308
+ end
309
+
310
+ def to_custom_date_created
311
+ DateTimeHelper.to_rfc3339(date_created)
312
+ end
313
+
314
+ def to_custom_date_updated
315
+ DateTimeHelper.to_rfc3339(date_updated)
316
+ end
317
+
318
+ # Provides a human-readable string representation of the object.
319
+ def to_s
320
+ class_name = self.class.name.split('::').last
321
+ "<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, friendly_name:"\
322
+ " #{@friendly_name}, code_length: #{@code_length}, lookup_enabled: #{@lookup_enabled},"\
323
+ " psd2_enabled: #{@psd2_enabled}, skip_sms_to_landlines: #{@skip_sms_to_landlines},"\
324
+ " dtmf_input_required: #{@dtmf_input_required}, tts_name: #{@tts_name},"\
325
+ " do_not_share_warning_enabled: #{@do_not_share_warning_enabled}, custom_code_enabled:"\
326
+ " #{@custom_code_enabled}, push: #{@push}, totp: #{@totp}, default_template_sid:"\
327
+ " #{@default_template_sid}, whatsapp: #{@whatsapp}, passkeys: #{@passkeys},"\
328
+ " verify_event_subscription_enabled: #{@verify_event_subscription_enabled}, date_created:"\
329
+ " #{@date_created}, date_updated: #{@date_updated}, url: #{@url}, links: #{@links},"\
330
+ " additional_properties: #{@additional_properties}>"
331
+ end
332
+
333
+ # Provides a debugging-friendly string with detailed object information.
334
+ def inspect
335
+ class_name = self.class.name.split('::').last
336
+ "<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, friendly_name:"\
337
+ " #{@friendly_name.inspect}, code_length: #{@code_length.inspect}, lookup_enabled:"\
338
+ " #{@lookup_enabled.inspect}, psd2_enabled: #{@psd2_enabled.inspect}, skip_sms_to_landlines:"\
339
+ " #{@skip_sms_to_landlines.inspect}, dtmf_input_required: #{@dtmf_input_required.inspect},"\
340
+ " tts_name: #{@tts_name.inspect}, do_not_share_warning_enabled:"\
341
+ " #{@do_not_share_warning_enabled.inspect}, custom_code_enabled:"\
342
+ " #{@custom_code_enabled.inspect}, push: #{@push.inspect}, totp: #{@totp.inspect},"\
343
+ " default_template_sid: #{@default_template_sid.inspect}, whatsapp: #{@whatsapp.inspect},"\
344
+ " passkeys: #{@passkeys.inspect}, verify_event_subscription_enabled:"\
345
+ " #{@verify_event_subscription_enabled.inspect}, date_created: #{@date_created.inspect},"\
346
+ " date_updated: #{@date_updated.inspect}, url: #{@url.inspect}, links: #{@links.inspect},"\
347
+ " additional_properties: #{@additional_properties}>"
348
+ end
349
+ end
350
+ end
@@ -0,0 +1,226 @@
1
+ # twilio_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module TwilioApIs
8
+ # ServiceBinding Model.
9
+ class ServiceBinding < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # A 34 character string that uniquely identifies this resource.
14
+ # @return [String]
15
+ attr_accessor :sid
16
+
17
+ # The unique ID of the
18
+ # [Account](https://www.twilio.com/docs/iam/api/account) responsible for
19
+ # this binding.
20
+ # @return [String]
21
+ attr_accessor :account_sid
22
+
23
+ # The SID of the [Conversation
24
+ # Service](https://www.twilio.com/docs/conversations/api/service-resource)
25
+ # the Binding resource is associated with.
26
+ # @return [String]
27
+ attr_accessor :chat_service_sid
28
+
29
+ # The SID of the
30
+ # [Credential](https://www.twilio.com/docs/conversations/api/credential-reso
31
+ # urce) for the binding. See [push notification
32
+ # configuration](https://www.twilio.com/docs/chat/push-notification-configur
33
+ # ation) for more info.
34
+ # @return [String]
35
+ attr_accessor :credential_sid
36
+
37
+ # The date that this resource was created.
38
+ # @return [DateTime]
39
+ attr_accessor :date_created
40
+
41
+ # The date that this resource was last updated.
42
+ # @return [DateTime]
43
+ attr_accessor :date_updated
44
+
45
+ # The unique endpoint identifier for the Binding. The format of this value
46
+ # depends on the `binding_type`.
47
+ # @return [String]
48
+ attr_accessor :endpoint
49
+
50
+ # The application-defined string that uniquely identifies the [Conversation
51
+ # User](https://www.twilio.com/docs/conversations/api/user-resource) within
52
+ # the [Conversation
53
+ # Service](https://www.twilio.com/docs/conversations/api/service-resource).
54
+ # See [access
55
+ # tokens](https://www.twilio.com/docs/conversations/create-tokens) for more
56
+ # info.
57
+ # @return [String]
58
+ attr_accessor :identity
59
+
60
+ # The push technology to use for the Binding. Can be: `apn`, `gcm`, `fcm`,
61
+ # or `twilsock`. See [push notification
62
+ # configuration](https://www.twilio.com/docs/chat/push-notification-configur
63
+ # ation) for more info.
64
+ # @return [ServiceBindingBindingType]
65
+ attr_accessor :binding_type
66
+
67
+ # The [Conversation message
68
+ # types](https://www.twilio.com/docs/chat/push-notification-configuration#pu
69
+ # sh-types) the binding is subscribed to.
70
+ # @return [Array[String]]
71
+ attr_accessor :message_types
72
+
73
+ # An absolute API resource URL for this binding.
74
+ # @return [String]
75
+ attr_accessor :url
76
+
77
+ # A mapping from model property names to API property names.
78
+ def self.names
79
+ @_hash = {} if @_hash.nil?
80
+ @_hash['sid'] = 'sid'
81
+ @_hash['account_sid'] = 'account_sid'
82
+ @_hash['chat_service_sid'] = 'chat_service_sid'
83
+ @_hash['credential_sid'] = 'credential_sid'
84
+ @_hash['date_created'] = 'date_created'
85
+ @_hash['date_updated'] = 'date_updated'
86
+ @_hash['endpoint'] = 'endpoint'
87
+ @_hash['identity'] = 'identity'
88
+ @_hash['binding_type'] = 'binding_type'
89
+ @_hash['message_types'] = 'message_types'
90
+ @_hash['url'] = 'url'
91
+ @_hash
92
+ end
93
+
94
+ # An array for optional fields
95
+ def self.optionals
96
+ %w[
97
+ sid
98
+ account_sid
99
+ chat_service_sid
100
+ credential_sid
101
+ date_created
102
+ date_updated
103
+ endpoint
104
+ identity
105
+ binding_type
106
+ message_types
107
+ url
108
+ ]
109
+ end
110
+
111
+ # An array for nullable fields
112
+ def self.nullables
113
+ %w[
114
+ sid
115
+ account_sid
116
+ chat_service_sid
117
+ credential_sid
118
+ date_created
119
+ date_updated
120
+ endpoint
121
+ identity
122
+ message_types
123
+ url
124
+ ]
125
+ end
126
+
127
+ def initialize(sid: SKIP, account_sid: SKIP, chat_service_sid: SKIP,
128
+ credential_sid: SKIP, date_created: SKIP, date_updated: SKIP,
129
+ endpoint: SKIP, identity: SKIP, binding_type: SKIP,
130
+ message_types: SKIP, url: SKIP, additional_properties: nil)
131
+ # Add additional model properties to the instance
132
+ additional_properties = {} if additional_properties.nil?
133
+
134
+ @sid = sid unless sid == SKIP
135
+ @account_sid = account_sid unless account_sid == SKIP
136
+ @chat_service_sid = chat_service_sid unless chat_service_sid == SKIP
137
+ @credential_sid = credential_sid unless credential_sid == SKIP
138
+ @date_created = date_created unless date_created == SKIP
139
+ @date_updated = date_updated unless date_updated == SKIP
140
+ @endpoint = endpoint unless endpoint == SKIP
141
+ @identity = identity unless identity == SKIP
142
+ @binding_type = binding_type unless binding_type == SKIP
143
+ @message_types = message_types unless message_types == SKIP
144
+ @url = url unless url == SKIP
145
+ @additional_properties = additional_properties
146
+ end
147
+
148
+ # Creates an instance of the object from a hash.
149
+ def self.from_hash(hash)
150
+ return nil unless hash
151
+
152
+ # Extract variables from the hash.
153
+ sid = hash.key?('sid') ? hash['sid'] : SKIP
154
+ account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
155
+ chat_service_sid =
156
+ hash.key?('chat_service_sid') ? hash['chat_service_sid'] : SKIP
157
+ credential_sid =
158
+ hash.key?('credential_sid') ? hash['credential_sid'] : SKIP
159
+ date_created = if hash.key?('date_created')
160
+ (DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
161
+ else
162
+ SKIP
163
+ end
164
+ date_updated = if hash.key?('date_updated')
165
+ (DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
166
+ else
167
+ SKIP
168
+ end
169
+ endpoint = hash.key?('endpoint') ? hash['endpoint'] : SKIP
170
+ identity = hash.key?('identity') ? hash['identity'] : SKIP
171
+ binding_type = hash.key?('binding_type') ? hash['binding_type'] : SKIP
172
+ message_types = hash.key?('message_types') ? hash['message_types'] : SKIP
173
+ url = hash.key?('url') ? hash['url'] : SKIP
174
+
175
+ # Create a new hash for additional properties, removing known properties.
176
+ new_hash = hash.reject { |k, _| names.value?(k) }
177
+
178
+ additional_properties = APIHelper.get_additional_properties(
179
+ new_hash, proc { |value| value }
180
+ )
181
+
182
+ # Create object from extracted values.
183
+ ServiceBinding.new(sid: sid,
184
+ account_sid: account_sid,
185
+ chat_service_sid: chat_service_sid,
186
+ credential_sid: credential_sid,
187
+ date_created: date_created,
188
+ date_updated: date_updated,
189
+ endpoint: endpoint,
190
+ identity: identity,
191
+ binding_type: binding_type,
192
+ message_types: message_types,
193
+ url: url,
194
+ additional_properties: additional_properties)
195
+ end
196
+
197
+ def to_custom_date_created
198
+ DateTimeHelper.to_rfc3339(date_created)
199
+ end
200
+
201
+ def to_custom_date_updated
202
+ DateTimeHelper.to_rfc3339(date_updated)
203
+ end
204
+
205
+ # Provides a human-readable string representation of the object.
206
+ def to_s
207
+ class_name = self.class.name.split('::').last
208
+ "<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, chat_service_sid:"\
209
+ " #{@chat_service_sid}, credential_sid: #{@credential_sid}, date_created: #{@date_created},"\
210
+ " date_updated: #{@date_updated}, endpoint: #{@endpoint}, identity: #{@identity},"\
211
+ " binding_type: #{@binding_type}, message_types: #{@message_types}, url: #{@url},"\
212
+ " additional_properties: #{@additional_properties}>"
213
+ end
214
+
215
+ # Provides a debugging-friendly string with detailed object information.
216
+ def inspect
217
+ class_name = self.class.name.split('::').last
218
+ "<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect},"\
219
+ " chat_service_sid: #{@chat_service_sid.inspect}, credential_sid:"\
220
+ " #{@credential_sid.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
221
+ " #{@date_updated.inspect}, endpoint: #{@endpoint.inspect}, identity: #{@identity.inspect},"\
222
+ " binding_type: #{@binding_type.inspect}, message_types: #{@message_types.inspect}, url:"\
223
+ " #{@url.inspect}, additional_properties: #{@additional_properties}>"
224
+ end
225
+ end
226
+ end
@@ -0,0 +1,47 @@
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
+ # The push technology to use for the Binding. Can be: `apn`, `gcm`, `fcm`, or
8
+ # `twilsock`. See [push notification
9
+ # configuration](https://www.twilio.com/docs/chat/push-notification-configurat
10
+ # ion) for more info.
11
+ class ServiceBindingBindingType
12
+ SERVICE_BINDING_BINDING_TYPE = [
13
+ # TODO: Write general description for APN
14
+ APN = 'apn'.freeze,
15
+
16
+ # TODO: Write general description for GCM
17
+ GCM = 'gcm'.freeze,
18
+
19
+ # TODO: Write general description for FCM
20
+ FCM = 'fcm'.freeze,
21
+
22
+ # TODO: Write general description for TWILSOCK
23
+ TWILSOCK = 'twilsock'.freeze
24
+ ].freeze
25
+
26
+ def self.validate(value)
27
+ return false if value.nil?
28
+
29
+ SERVICE_BINDING_BINDING_TYPE.include?(value)
30
+ end
31
+
32
+ def self.from_value(value, default_value = APN)
33
+ return default_value if value.nil?
34
+
35
+ str = value.to_s.strip
36
+
37
+ case str.downcase
38
+ when 'apn' then APN
39
+ when 'gcm' then GCM
40
+ when 'fcm' then FCM
41
+ when 'twilsock' then TWILSOCK
42
+ else
43
+ default_value
44
+ end
45
+ end
46
+ end
47
+ end