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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +213 -0
- data/bin/console +15 -0
- data/lib/twilio_ap_is/api_helper.rb +10 -0
- data/lib/twilio_ap_is/apis/accounts_v1_auth_token_promotion_api.rb +27 -0
- data/lib/twilio_ap_is/apis/accounts_v1_aws_api.rb +137 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_consents_api.rb +41 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_contacts_api.rb +36 -0
- data/lib/twilio_ap_is/apis/accounts_v1_messaging_geopermissions_api.rb +54 -0
- data/lib/twilio_ap_is/apis/accounts_v1_public_key_api.rb +136 -0
- data/lib/twilio_ap_is/apis/accounts_v1_safelist_api.rb +69 -0
- data/lib/twilio_ap_is/apis/accounts_v1_secondary_auth_token_api.rb +39 -0
- data/lib/twilio_ap_is/apis/base_api.rb +67 -0
- data/lib/twilio_ap_is/apis/chat_v3_channel_api.rb +51 -0
- data/lib/twilio_ap_is/apis/conversations_v1_address_configuration_api.rb +218 -0
- data/lib/twilio_ap_is/apis/conversations_v1_binding_api.rb +116 -0
- data/lib/twilio_ap_is/apis/conversations_v1_configuration_api.rb +133 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_api.rb +550 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_with_participants_api.rb +182 -0
- data/lib/twilio_ap_is/apis/conversations_v1_credential_api.rb +189 -0
- data/lib/twilio_ap_is/apis/conversations_v1_delivery_receipt_api.rb +183 -0
- data/lib/twilio_ap_is/apis/conversations_v1_message_api.rb +497 -0
- data/lib/twilio_ap_is/apis/conversations_v1_notification_api.rb +124 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_api.rb +546 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_conversation_api.rb +99 -0
- data/lib/twilio_ap_is/apis/conversations_v1_role_api.rb +325 -0
- data/lib/twilio_ap_is/apis/conversations_v1_service_api.rb +98 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_api.rb +364 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_conversation_api.rb +335 -0
- data/lib/twilio_ap_is/apis/conversations_v1_webhook_api.rb +561 -0
- data/lib/twilio_ap_is/apis/notify_v1_binding_api.rb +186 -0
- data/lib/twilio_ap_is/apis/notify_v1_credential_api.rb +183 -0
- data/lib/twilio_ap_is/apis/notify_v1_notification_api.rb +174 -0
- data/lib/twilio_ap_is/apis/notify_v1_service_api.rb +262 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_activity_api.rb +177 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_event_api.rb +125 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_api.rb +310 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_channel_api.rb +173 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_bulk_real_time_statistics_api.rb +36 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_cumulative_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queues_statistics_api.rb +72 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_reservation_api.rb +396 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_channel_api.rb +126 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_reservation_api.rb +385 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_statistics_api.rb +57 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_cumulative_statistics_api.rb +51 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_api.rb +213 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_cumulative_statistics_api.rb +68 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_statistics_api.rb +67 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_api.rb +225 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_cumulative_statistics_api.rb +62 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_statistics_api.rb +61 -0
- data/lib/twilio_ap_is/apis/verify_v2_service_api.rb +178 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_api.rb +143 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_check_api.rb +61 -0
- data/lib/twilio_ap_is/client.rb +417 -0
- data/lib/twilio_ap_is/configuration.rb +187 -0
- data/lib/twilio_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/twilio_ap_is/exceptions/v2_services_verifications429_error_exception.rb +63 -0
- data/lib/twilio_ap_is/http/api_response.rb +19 -0
- data/lib/twilio_ap_is/http/auth/basic_auth.rb +62 -0
- data/lib/twilio_ap_is/http/http_call_back.rb +10 -0
- data/lib/twilio_ap_is/http/http_method_enum.rb +10 -0
- data/lib/twilio_ap_is/http/http_request.rb +10 -0
- data/lib/twilio_ap_is/http/http_response.rb +10 -0
- data/lib/twilio_ap_is/http/proxy_settings.rb +22 -0
- data/lib/twilio_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/twilio_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/twilio_ap_is/models/access_token.rb +188 -0
- data/lib/twilio_ap_is/models/access_token_enum_factor_types.rb +26 -0
- data/lib/twilio_ap_is/models/activity.rb +189 -0
- data/lib/twilio_ap_is/models/auth_token_promotion.rb +142 -0
- data/lib/twilio_ap_is/models/base_model.rb +110 -0
- data/lib/twilio_ap_is/models/binding.rb +269 -0
- data/lib/twilio_ap_is/models/binding_binding_type.rb +53 -0
- data/lib/twilio_ap_is/models/bucket.rb +186 -0
- data/lib/twilio_ap_is/models/bulk_consents.rb +83 -0
- data/lib/twilio_ap_is/models/bulk_contacts.rb +83 -0
- data/lib/twilio_ap_is/models/challenge.rb +317 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_reasons.rb +41 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_statuses.rb +45 -0
- data/lib/twilio_ap_is/models/challenge_enum_factor_types.rb +41 -0
- data/lib/twilio_ap_is/models/channel.rb +249 -0
- data/lib/twilio_ap_is/models/channel_channel_type.rb +36 -0
- data/lib/twilio_ap_is/models/channel_webhook_enabled_type.rb +36 -0
- data/lib/twilio_ap_is/models/configuration.rb +164 -0
- data/lib/twilio_ap_is/models/configuration_address.rb +199 -0
- data/lib/twilio_ap_is/models/configuration_address_auto_creation_type.rb +40 -0
- data/lib/twilio_ap_is/models/configuration_address_method.rb +36 -0
- data/lib/twilio_ap_is/models/configuration_address_type.rb +60 -0
- data/lib/twilio_ap_is/models/configuration_webhook.rb +154 -0
- data/lib/twilio_ap_is/models/configuration_webhook_method.rb +46 -0
- data/lib/twilio_ap_is/models/configuration_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_message.rb +268 -0
- data/lib/twilio_ap_is/models/conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt.rb +219 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/conversation_participant.rb +240 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook.rb +178 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/conversation_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/credential.rb +175 -0
- data/lib/twilio_ap_is/models/credential1.rb +174 -0
- data/lib/twilio_ap_is/models/credential_aws.rb +153 -0
- data/lib/twilio_ap_is/models/credential_public_key.rb +153 -0
- data/lib/twilio_ap_is/models/credential_push_type.rb +41 -0
- data/lib/twilio_ap_is/models/entity.rb +177 -0
- data/lib/twilio_ap_is/models/event.rb +270 -0
- data/lib/twilio_ap_is/models/factor.rb +235 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_type.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/form_enum_form_types.rb +26 -0
- data/lib/twilio_ap_is/models/list_activity_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_configuration_address_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_aws_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_public_key_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_event_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queue_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queues_statistics_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_task_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workflow_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workspace_response.rb +94 -0
- data/lib/twilio_ap_is/models/messaging_configuration.rb +170 -0
- data/lib/twilio_ap_is/models/meta.rb +140 -0
- data/lib/twilio_ap_is/models/msg_geopermissions.rb +86 -0
- data/lib/twilio_ap_is/models/new_factor.rb +277 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_types.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/notif_priority.rb +43 -0
- data/lib/twilio_ap_is/models/notification.rb +363 -0
- data/lib/twilio_ap_is/models/notification1.rb +181 -0
- data/lib/twilio_ap_is/models/participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/rate_limit.rb +189 -0
- data/lib/twilio_ap_is/models/role.rb +192 -0
- data/lib/twilio_ap_is/models/role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/safelist.rb +88 -0
- data/lib/twilio_ap_is/models/safelist1.rb +99 -0
- data/lib/twilio_ap_is/models/secondary_auth_token.rb +145 -0
- data/lib/twilio_ap_is/models/service.rb +164 -0
- data/lib/twilio_ap_is/models/service1.rb +380 -0
- data/lib/twilio_ap_is/models/service2.rb +350 -0
- data/lib/twilio_ap_is/models/service_binding.rb +226 -0
- data/lib/twilio_ap_is/models/service_binding_binding_type.rb +47 -0
- data/lib/twilio_ap_is/models/service_configuration.rb +180 -0
- data/lib/twilio_ap_is/models/service_conversation.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_message.rb +282 -0
- data/lib/twilio_ap_is/models/service_conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt.rb +233 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/service_conversation_participant.rb +256 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook.rb +191 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/service_conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_notification.rb +155 -0
- data/lib/twilio_ap_is/models/service_participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/service_participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_role.rb +192 -0
- data/lib/twilio_ap_is/models/service_role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/service_stats_conversations_rate_limiting_errors_source.rb +36 -0
- data/lib/twilio_ap_is/models/service_user.rb +250 -0
- data/lib/twilio_ap_is/models/service_user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/service_user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/service_user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration.rb +160 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration_method.rb +37 -0
- data/lib/twilio_ap_is/models/stats_twilsock_rate_limiting_errors_source.rb +26 -0
- data/lib/twilio_ap_is/models/task_channel.rb +204 -0
- data/lib/twilio_ap_is/models/task_queue.rb +278 -0
- data/lib/twilio_ap_is/models/task_queue_bulk_real_time_statistics.rb +141 -0
- data/lib/twilio_ap_is/models/task_queue_cumulative.rb +356 -0
- data/lib/twilio_ap_is/models/task_queue_real_time_statistics.rb +250 -0
- data/lib/twilio_ap_is/models/task_queue_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/task_queue_task_order.rb +40 -0
- data/lib/twilio_ap_is/models/task_queues_stats.rb +124 -0
- data/lib/twilio_ap_is/models/task_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/task_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/task_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/task_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/task_reservation_supervisor_mode.rb +40 -0
- data/lib/twilio_ap_is/models/task_router_task.rb +394 -0
- data/lib/twilio_ap_is/models/task_status.rb +53 -0
- data/lib/twilio_ap_is/models/user.rb +250 -0
- data/lib/twilio_ap_is/models/user_binding_binding_type.rb +52 -0
- data/lib/twilio_ap_is/models/user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/v2_form.rb +112 -0
- data/lib/twilio_ap_is/models/verification.rb +262 -0
- data/lib/twilio_ap_is/models/verification_attempt.rb +219 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_attempt_status.rb +40 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_call_status.rb +60 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_channels.rb +49 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_conversion_status.rb +38 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_message_status.rb +80 -0
- data/lib/twilio_ap_is/models/verification_attempts.rb +129 -0
- data/lib/twilio_ap_is/models/verification_attempts_summary_enum_channels.rb +48 -0
- data/lib/twilio_ap_is/models/verification_check.rb +231 -0
- data/lib/twilio_ap_is/models/verification_check_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_risk_check.rb +39 -0
- data/lib/twilio_ap_is/models/verification_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/verification_template.rb +126 -0
- data/lib/twilio_ap_is/models/webhook.rb +222 -0
- data/lib/twilio_ap_is/models/webhook_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/webhook_enum_version.rb +37 -0
- data/lib/twilio_ap_is/models/worker.rb +247 -0
- data/lib/twilio_ap_is/models/worker_channel.rb +244 -0
- data/lib/twilio_ap_is/models/worker_instance_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/worker_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/worker_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/worker_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/worker_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/worker_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/workers_cumulative_statistics.rb +221 -0
- data/lib/twilio_ap_is/models/workers_real_time_statistics.rb +124 -0
- data/lib/twilio_ap_is/models/workflow.rb +247 -0
- data/lib/twilio_ap_is/models/workflow_cumulative_statistics.rb +347 -0
- data/lib/twilio_ap_is/models/workflow_real_time_statistics.rb +173 -0
- data/lib/twilio_ap_is/models/workflow_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/workspace.rb +285 -0
- data/lib/twilio_ap_is/models/workspace_cumulative_statistics.rb +334 -0
- data/lib/twilio_ap_is/models/workspace_queue_order.rb +40 -0
- data/lib/twilio_ap_is/models/workspace_real_time_statistics.rb +185 -0
- data/lib/twilio_ap_is/models/workspace_statistics.rb +122 -0
- data/lib/twilio_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/twilio_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/twilio_ap_is.rb +326 -0
- metadata +361 -0
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
# A string specifying the communication channel used for the verification
|
|
8
|
+
# attempt.
|
|
9
|
+
class VerificationAttemptEnumChannels
|
|
10
|
+
VERIFICATION_ATTEMPT_ENUM_CHANNELS = [
|
|
11
|
+
# TODO: Write general description for SMS
|
|
12
|
+
SMS = 'sms'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for CALL
|
|
15
|
+
CALL = 'call'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for EMAIL
|
|
18
|
+
EMAIL = 'email'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for WHATSAPP
|
|
21
|
+
WHATSAPP = 'whatsapp'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for RBM
|
|
24
|
+
RBM = 'rbm'.freeze
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
def self.validate(value)
|
|
28
|
+
return false if value.nil?
|
|
29
|
+
|
|
30
|
+
VERIFICATION_ATTEMPT_ENUM_CHANNELS.include?(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.from_value(value, default_value = SMS)
|
|
34
|
+
return default_value if value.nil?
|
|
35
|
+
|
|
36
|
+
str = value.to_s.strip
|
|
37
|
+
|
|
38
|
+
case str.downcase
|
|
39
|
+
when 'sms' then SMS
|
|
40
|
+
when 'call' then CALL
|
|
41
|
+
when 'email' then EMAIL
|
|
42
|
+
when 'whatsapp' then WHATSAPP
|
|
43
|
+
when 'rbm' then RBM
|
|
44
|
+
else
|
|
45
|
+
default_value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
# A string specifying the conversion status of the verification. A conversion
|
|
8
|
+
# happens when the user is able to provide the correct code. Possible values
|
|
9
|
+
# are `CONVERTED` and `UNCONVERTED`.
|
|
10
|
+
class VerificationAttemptEnumConversionStatus
|
|
11
|
+
VERIFICATION_ATTEMPT_ENUM_CONVERSION_STATUS = [
|
|
12
|
+
# TODO: Write general description for CONVERTED
|
|
13
|
+
CONVERTED = 'converted'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for UNCONVERTED
|
|
16
|
+
UNCONVERTED = 'unconverted'.freeze
|
|
17
|
+
].freeze
|
|
18
|
+
|
|
19
|
+
def self.validate(value)
|
|
20
|
+
return false if value.nil?
|
|
21
|
+
|
|
22
|
+
VERIFICATION_ATTEMPT_ENUM_CONVERSION_STATUS.include?(value)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.from_value(value, default_value = CONVERTED)
|
|
26
|
+
return default_value if value.nil?
|
|
27
|
+
|
|
28
|
+
str = value.to_s.strip
|
|
29
|
+
|
|
30
|
+
case str.downcase
|
|
31
|
+
when 'converted' then CONVERTED
|
|
32
|
+
when 'unconverted' then UNCONVERTED
|
|
33
|
+
else
|
|
34
|
+
default_value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# VerificationAttemptEnumMessageStatus.
|
|
8
|
+
class VerificationAttemptEnumMessageStatus
|
|
9
|
+
VERIFICATION_ATTEMPT_ENUM_MESSAGE_STATUS = [
|
|
10
|
+
# TODO: Write general description for QUEUED
|
|
11
|
+
QUEUED = 'queued'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SENDING
|
|
14
|
+
SENDING = 'sending'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for SENT
|
|
17
|
+
SENT = 'sent'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for FAILED
|
|
20
|
+
FAILED = 'failed'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for DELIVERED
|
|
23
|
+
DELIVERED = 'delivered'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for UNDELIVERED
|
|
26
|
+
UNDELIVERED = 'undelivered'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for RECEIVING
|
|
29
|
+
RECEIVING = 'receiving'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for RECEIVED
|
|
32
|
+
RECEIVED = 'received'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for ACCEPTED
|
|
35
|
+
ACCEPTED = 'accepted'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for SCHEDULED
|
|
38
|
+
SCHEDULED = 'scheduled'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for READ
|
|
41
|
+
READ = 'read'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for PARTIALLY_DELIVERED
|
|
44
|
+
PARTIALLY_DELIVERED = 'partially_delivered'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for CANCELED
|
|
47
|
+
CANCELED = 'canceled'.freeze
|
|
48
|
+
].freeze
|
|
49
|
+
|
|
50
|
+
def self.validate(value)
|
|
51
|
+
return false if value.nil?
|
|
52
|
+
|
|
53
|
+
VERIFICATION_ATTEMPT_ENUM_MESSAGE_STATUS.include?(value)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.from_value(value, default_value = QUEUED)
|
|
57
|
+
return default_value if value.nil?
|
|
58
|
+
|
|
59
|
+
str = value.to_s.strip
|
|
60
|
+
|
|
61
|
+
case str.downcase
|
|
62
|
+
when 'queued' then QUEUED
|
|
63
|
+
when 'sending' then SENDING
|
|
64
|
+
when 'sent' then SENT
|
|
65
|
+
when 'failed' then FAILED
|
|
66
|
+
when 'delivered' then DELIVERED
|
|
67
|
+
when 'undelivered' then UNDELIVERED
|
|
68
|
+
when 'receiving' then RECEIVING
|
|
69
|
+
when 'received' then RECEIVED
|
|
70
|
+
when 'accepted' then ACCEPTED
|
|
71
|
+
when 'scheduled' then SCHEDULED
|
|
72
|
+
when 'read' then READ
|
|
73
|
+
when 'partially_delivered' then PARTIALLY_DELIVERED
|
|
74
|
+
when 'canceled' then CANCELED
|
|
75
|
+
else
|
|
76
|
+
default_value
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
# VerificationAttempts Model.
|
|
8
|
+
class VerificationAttempts < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Total of attempts made according to the provided filters
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :total_attempts
|
|
15
|
+
|
|
16
|
+
# Total of attempts made that were confirmed by the end user, according to
|
|
17
|
+
# the provided filters.
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :total_converted
|
|
20
|
+
|
|
21
|
+
# Total of attempts made that were not confirmed by the end user, according
|
|
22
|
+
# to the provided filters.
|
|
23
|
+
# @return [Integer]
|
|
24
|
+
attr_accessor :total_unconverted
|
|
25
|
+
|
|
26
|
+
# Percentage of the confirmed messages over the total, defined by
|
|
27
|
+
# (total_converted/total_attempts)*100.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :conversion_rate_percentage
|
|
30
|
+
|
|
31
|
+
# Percentage of the confirmed messages over the total, defined by
|
|
32
|
+
# (total_converted/total_attempts)*100.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :url
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['total_attempts'] = 'total_attempts'
|
|
40
|
+
@_hash['total_converted'] = 'total_converted'
|
|
41
|
+
@_hash['total_unconverted'] = 'total_unconverted'
|
|
42
|
+
@_hash['conversion_rate_percentage'] = 'conversion_rate_percentage'
|
|
43
|
+
@_hash['url'] = 'url'
|
|
44
|
+
@_hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for optional fields
|
|
48
|
+
def self.optionals
|
|
49
|
+
%w[
|
|
50
|
+
total_attempts
|
|
51
|
+
total_converted
|
|
52
|
+
total_unconverted
|
|
53
|
+
conversion_rate_percentage
|
|
54
|
+
url
|
|
55
|
+
]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for nullable fields
|
|
59
|
+
def self.nullables
|
|
60
|
+
%w[
|
|
61
|
+
conversion_rate_percentage
|
|
62
|
+
url
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(total_attempts: 0, total_converted: 0, total_unconverted: 0,
|
|
67
|
+
conversion_rate_percentage: SKIP, url: SKIP,
|
|
68
|
+
additional_properties: nil)
|
|
69
|
+
# Add additional model properties to the instance
|
|
70
|
+
additional_properties = {} if additional_properties.nil?
|
|
71
|
+
|
|
72
|
+
@total_attempts = total_attempts unless total_attempts == SKIP
|
|
73
|
+
@total_converted = total_converted unless total_converted == SKIP
|
|
74
|
+
@total_unconverted = total_unconverted unless total_unconverted == SKIP
|
|
75
|
+
unless conversion_rate_percentage == SKIP
|
|
76
|
+
@conversion_rate_percentage =
|
|
77
|
+
conversion_rate_percentage
|
|
78
|
+
end
|
|
79
|
+
@url = url unless url == SKIP
|
|
80
|
+
@additional_properties = additional_properties
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Creates an instance of the object from a hash.
|
|
84
|
+
def self.from_hash(hash)
|
|
85
|
+
return nil unless hash
|
|
86
|
+
|
|
87
|
+
# Extract variables from the hash.
|
|
88
|
+
total_attempts = hash['total_attempts'] ||= 0
|
|
89
|
+
total_converted = hash['total_converted'] ||= 0
|
|
90
|
+
total_unconverted = hash['total_unconverted'] ||= 0
|
|
91
|
+
conversion_rate_percentage =
|
|
92
|
+
hash.key?('conversion_rate_percentage') ? hash['conversion_rate_percentage'] : SKIP
|
|
93
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
94
|
+
|
|
95
|
+
# Create a new hash for additional properties, removing known properties.
|
|
96
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
97
|
+
|
|
98
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
99
|
+
new_hash, proc { |value| value }
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Create object from extracted values.
|
|
103
|
+
VerificationAttempts.new(total_attempts: total_attempts,
|
|
104
|
+
total_converted: total_converted,
|
|
105
|
+
total_unconverted: total_unconverted,
|
|
106
|
+
conversion_rate_percentage: conversion_rate_percentage,
|
|
107
|
+
url: url,
|
|
108
|
+
additional_properties: additional_properties)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Provides a human-readable string representation of the object.
|
|
112
|
+
def to_s
|
|
113
|
+
class_name = self.class.name.split('::').last
|
|
114
|
+
"<#{class_name} total_attempts: #{@total_attempts}, total_converted: #{@total_converted},"\
|
|
115
|
+
" total_unconverted: #{@total_unconverted}, conversion_rate_percentage:"\
|
|
116
|
+
" #{@conversion_rate_percentage}, url: #{@url}, additional_properties:"\
|
|
117
|
+
" #{@additional_properties}>"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
121
|
+
def inspect
|
|
122
|
+
class_name = self.class.name.split('::').last
|
|
123
|
+
"<#{class_name} total_attempts: #{@total_attempts.inspect}, total_converted:"\
|
|
124
|
+
" #{@total_converted.inspect}, total_unconverted: #{@total_unconverted.inspect},"\
|
|
125
|
+
" conversion_rate_percentage: #{@conversion_rate_percentage.inspect}, url: #{@url.inspect},"\
|
|
126
|
+
" additional_properties: #{@additional_properties}>"
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
# VerificationAttemptsSummaryEnumChannels.
|
|
8
|
+
class VerificationAttemptsSummaryEnumChannels
|
|
9
|
+
VERIFICATION_ATTEMPTS_SUMMARY_ENUM_CHANNELS = [
|
|
10
|
+
# TODO: Write general description for SMS
|
|
11
|
+
SMS = 'sms'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for CALL
|
|
14
|
+
CALL = 'call'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for EMAIL
|
|
17
|
+
EMAIL = 'email'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for WHATSAPP
|
|
20
|
+
WHATSAPP = 'whatsapp'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for RBM
|
|
23
|
+
RBM = 'rbm'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
VERIFICATION_ATTEMPTS_SUMMARY_ENUM_CHANNELS.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = SMS)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'sms' then SMS
|
|
39
|
+
when 'call' then CALL
|
|
40
|
+
when 'email' then EMAIL
|
|
41
|
+
when 'whatsapp' then WHATSAPP
|
|
42
|
+
when 'rbm' then RBM
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,231 @@
|
|
|
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
|
+
# VerificationCheck Model.
|
|
9
|
+
class VerificationCheck < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the VerificationCheck
|
|
14
|
+
# resource.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :sid
|
|
17
|
+
|
|
18
|
+
# The SID of the [Service](https://www.twilio.com/docs/verify/api/service)
|
|
19
|
+
# the resource is associated with.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :service_sid
|
|
22
|
+
|
|
23
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
24
|
+
# created the VerificationCheck resource.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :account_sid
|
|
27
|
+
|
|
28
|
+
# The phone number or [email](https://www.twilio.com/docs/verify/email)
|
|
29
|
+
# being verified. Phone numbers must be in [E.164
|
|
30
|
+
# format](https://www.twilio.com/docs/glossary/what-e164).
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :to
|
|
33
|
+
|
|
34
|
+
# The verification method to use. One of:
|
|
35
|
+
# [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`,
|
|
36
|
+
# `call`, or `sna`.
|
|
37
|
+
# @return [VerificationCheckEnumChannel]
|
|
38
|
+
attr_accessor :channel
|
|
39
|
+
|
|
40
|
+
# The status of the verification. Can be: `pending`, `approved`, `canceled`,
|
|
41
|
+
# `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :status
|
|
44
|
+
|
|
45
|
+
# Use "status" instead. Legacy property indicating whether the verification
|
|
46
|
+
# was successful.
|
|
47
|
+
# @return [TrueClass | FalseClass]
|
|
48
|
+
attr_accessor :valid
|
|
49
|
+
|
|
50
|
+
# The amount of the associated PSD2 compliant transaction. Requires the PSD2
|
|
51
|
+
# Service flag enabled.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :amount
|
|
54
|
+
|
|
55
|
+
# The payee of the associated PSD2 compliant transaction. Requires the PSD2
|
|
56
|
+
# Service flag enabled.
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :payee
|
|
59
|
+
|
|
60
|
+
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in
|
|
61
|
+
# GMT when the Verification Check resource was created.
|
|
62
|
+
# @return [DateTime]
|
|
63
|
+
attr_accessor :date_created
|
|
64
|
+
|
|
65
|
+
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in
|
|
66
|
+
# GMT when the Verification Check resource was last updated.
|
|
67
|
+
# @return [DateTime]
|
|
68
|
+
attr_accessor :date_updated
|
|
69
|
+
|
|
70
|
+
# List of error codes as a result of attempting a verification using the
|
|
71
|
+
# `sna` channel. The error codes are chronologically ordered, from the first
|
|
72
|
+
# attempt to the latest attempt. This will be an empty list if no errors
|
|
73
|
+
# occured or `null` if the last channel used wasn't `sna`.
|
|
74
|
+
# @return [Array[Object]]
|
|
75
|
+
attr_accessor :sna_attempts_error_codes
|
|
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['service_sid'] = 'service_sid'
|
|
82
|
+
@_hash['account_sid'] = 'account_sid'
|
|
83
|
+
@_hash['to'] = 'to'
|
|
84
|
+
@_hash['channel'] = 'channel'
|
|
85
|
+
@_hash['status'] = 'status'
|
|
86
|
+
@_hash['valid'] = 'valid'
|
|
87
|
+
@_hash['amount'] = 'amount'
|
|
88
|
+
@_hash['payee'] = 'payee'
|
|
89
|
+
@_hash['date_created'] = 'date_created'
|
|
90
|
+
@_hash['date_updated'] = 'date_updated'
|
|
91
|
+
@_hash['sna_attempts_error_codes'] = 'sna_attempts_error_codes'
|
|
92
|
+
@_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# An array for optional fields
|
|
96
|
+
def self.optionals
|
|
97
|
+
%w[
|
|
98
|
+
sid
|
|
99
|
+
service_sid
|
|
100
|
+
account_sid
|
|
101
|
+
to
|
|
102
|
+
channel
|
|
103
|
+
status
|
|
104
|
+
valid
|
|
105
|
+
amount
|
|
106
|
+
payee
|
|
107
|
+
date_created
|
|
108
|
+
date_updated
|
|
109
|
+
sna_attempts_error_codes
|
|
110
|
+
]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# An array for nullable fields
|
|
114
|
+
def self.nullables
|
|
115
|
+
%w[
|
|
116
|
+
sid
|
|
117
|
+
service_sid
|
|
118
|
+
account_sid
|
|
119
|
+
to
|
|
120
|
+
status
|
|
121
|
+
valid
|
|
122
|
+
amount
|
|
123
|
+
payee
|
|
124
|
+
date_created
|
|
125
|
+
date_updated
|
|
126
|
+
sna_attempts_error_codes
|
|
127
|
+
]
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def initialize(sid: SKIP, service_sid: SKIP, account_sid: SKIP, to: SKIP,
|
|
131
|
+
channel: SKIP, status: SKIP, valid: SKIP, amount: SKIP,
|
|
132
|
+
payee: SKIP, date_created: SKIP, date_updated: SKIP,
|
|
133
|
+
sna_attempts_error_codes: SKIP, additional_properties: nil)
|
|
134
|
+
# Add additional model properties to the instance
|
|
135
|
+
additional_properties = {} if additional_properties.nil?
|
|
136
|
+
|
|
137
|
+
@sid = sid unless sid == SKIP
|
|
138
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
139
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
140
|
+
@to = to unless to == SKIP
|
|
141
|
+
@channel = channel unless channel == SKIP
|
|
142
|
+
@status = status unless status == SKIP
|
|
143
|
+
@valid = valid unless valid == SKIP
|
|
144
|
+
@amount = amount unless amount == SKIP
|
|
145
|
+
@payee = payee unless payee == SKIP
|
|
146
|
+
@date_created = date_created unless date_created == SKIP
|
|
147
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
148
|
+
@sna_attempts_error_codes = sna_attempts_error_codes unless sna_attempts_error_codes == SKIP
|
|
149
|
+
@additional_properties = additional_properties
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Creates an instance of the object from a hash.
|
|
153
|
+
def self.from_hash(hash)
|
|
154
|
+
return nil unless hash
|
|
155
|
+
|
|
156
|
+
# Extract variables from the hash.
|
|
157
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
158
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
159
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
160
|
+
to = hash.key?('to') ? hash['to'] : SKIP
|
|
161
|
+
channel = hash.key?('channel') ? hash['channel'] : SKIP
|
|
162
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
163
|
+
valid = hash.key?('valid') ? hash['valid'] : SKIP
|
|
164
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
165
|
+
payee = hash.key?('payee') ? hash['payee'] : SKIP
|
|
166
|
+
date_created = if hash.key?('date_created')
|
|
167
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
168
|
+
else
|
|
169
|
+
SKIP
|
|
170
|
+
end
|
|
171
|
+
date_updated = if hash.key?('date_updated')
|
|
172
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
173
|
+
else
|
|
174
|
+
SKIP
|
|
175
|
+
end
|
|
176
|
+
sna_attempts_error_codes =
|
|
177
|
+
hash.key?('sna_attempts_error_codes') ? hash['sna_attempts_error_codes'] : SKIP
|
|
178
|
+
|
|
179
|
+
# Create a new hash for additional properties, removing known properties.
|
|
180
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
181
|
+
|
|
182
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
183
|
+
new_hash, proc { |value| value }
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# Create object from extracted values.
|
|
187
|
+
VerificationCheck.new(sid: sid,
|
|
188
|
+
service_sid: service_sid,
|
|
189
|
+
account_sid: account_sid,
|
|
190
|
+
to: to,
|
|
191
|
+
channel: channel,
|
|
192
|
+
status: status,
|
|
193
|
+
valid: valid,
|
|
194
|
+
amount: amount,
|
|
195
|
+
payee: payee,
|
|
196
|
+
date_created: date_created,
|
|
197
|
+
date_updated: date_updated,
|
|
198
|
+
sna_attempts_error_codes: sna_attempts_error_codes,
|
|
199
|
+
additional_properties: additional_properties)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def to_custom_date_created
|
|
203
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
def to_custom_date_updated
|
|
207
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Provides a human-readable string representation of the object.
|
|
211
|
+
def to_s
|
|
212
|
+
class_name = self.class.name.split('::').last
|
|
213
|
+
"<#{class_name} sid: #{@sid}, service_sid: #{@service_sid}, account_sid: #{@account_sid},"\
|
|
214
|
+
" to: #{@to}, channel: #{@channel}, status: #{@status}, valid: #{@valid}, amount:"\
|
|
215
|
+
" #{@amount}, payee: #{@payee}, date_created: #{@date_created}, date_updated:"\
|
|
216
|
+
" #{@date_updated}, sna_attempts_error_codes: #{@sna_attempts_error_codes},"\
|
|
217
|
+
" additional_properties: #{@additional_properties}>"
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
221
|
+
def inspect
|
|
222
|
+
class_name = self.class.name.split('::').last
|
|
223
|
+
"<#{class_name} sid: #{@sid.inspect}, service_sid: #{@service_sid.inspect}, account_sid:"\
|
|
224
|
+
" #{@account_sid.inspect}, to: #{@to.inspect}, channel: #{@channel.inspect}, status:"\
|
|
225
|
+
" #{@status.inspect}, valid: #{@valid.inspect}, amount: #{@amount.inspect}, payee:"\
|
|
226
|
+
" #{@payee.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
227
|
+
" #{@date_updated.inspect}, sna_attempts_error_codes: #{@sna_attempts_error_codes.inspect},"\
|
|
228
|
+
" additional_properties: #{@additional_properties}>"
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
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 verification method to use. One of:
|
|
8
|
+
# [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`,
|
|
9
|
+
# `call`, or `sna`.
|
|
10
|
+
class VerificationCheckEnumChannel
|
|
11
|
+
VERIFICATION_CHECK_ENUM_CHANNEL = [
|
|
12
|
+
# TODO: Write general description for SMS
|
|
13
|
+
SMS = 'sms'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for CALL
|
|
16
|
+
CALL = 'call'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for EMAIL
|
|
19
|
+
EMAIL = 'email'.freeze,
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for WHATSAPP
|
|
22
|
+
WHATSAPP = 'whatsapp'.freeze,
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for SNA
|
|
25
|
+
SNA = 'sna'.freeze
|
|
26
|
+
].freeze
|
|
27
|
+
|
|
28
|
+
def self.validate(value)
|
|
29
|
+
return false if value.nil?
|
|
30
|
+
|
|
31
|
+
VERIFICATION_CHECK_ENUM_CHANNEL.include?(value)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.from_value(value, default_value = SMS)
|
|
35
|
+
return default_value if value.nil?
|
|
36
|
+
|
|
37
|
+
str = value.to_s.strip
|
|
38
|
+
|
|
39
|
+
case str.downcase
|
|
40
|
+
when 'sms' then SMS
|
|
41
|
+
when 'call' then CALL
|
|
42
|
+
when 'email' then EMAIL
|
|
43
|
+
when 'whatsapp' then WHATSAPP
|
|
44
|
+
when 'sna' then SNA
|
|
45
|
+
else
|
|
46
|
+
default_value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
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 verification method used. One of:
|
|
8
|
+
# [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`,
|
|
9
|
+
# `call`, `sna`, or `rcs`.
|
|
10
|
+
class VerificationEnumChannel
|
|
11
|
+
VERIFICATION_ENUM_CHANNEL = [
|
|
12
|
+
# TODO: Write general description for SMS
|
|
13
|
+
SMS = 'sms'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for CALL
|
|
16
|
+
CALL = 'call'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for EMAIL
|
|
19
|
+
EMAIL = 'email'.freeze,
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for WHATSAPP
|
|
22
|
+
WHATSAPP = 'whatsapp'.freeze,
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for SNA
|
|
25
|
+
SNA = 'sna'.freeze
|
|
26
|
+
].freeze
|
|
27
|
+
|
|
28
|
+
def self.validate(value)
|
|
29
|
+
return false if value.nil?
|
|
30
|
+
|
|
31
|
+
VERIFICATION_ENUM_CHANNEL.include?(value)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.from_value(value, default_value = SMS)
|
|
35
|
+
return default_value if value.nil?
|
|
36
|
+
|
|
37
|
+
str = value.to_s.strip
|
|
38
|
+
|
|
39
|
+
case str.downcase
|
|
40
|
+
when 'sms' then SMS
|
|
41
|
+
when 'call' then CALL
|
|
42
|
+
when 'email' then EMAIL
|
|
43
|
+
when 'whatsapp' then WHATSAPP
|
|
44
|
+
when 'sna' then SNA
|
|
45
|
+
else
|
|
46
|
+
default_value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|