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,112 @@
|
|
|
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
|
+
# V2Form Model.
|
|
8
|
+
class V2Form < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The Type of this Form. Currently only `form-push` is supported.
|
|
13
|
+
# @return [FormEnumFormTypes]
|
|
14
|
+
attr_accessor :form_type
|
|
15
|
+
|
|
16
|
+
# Object that contains the available forms for this type. This available
|
|
17
|
+
# forms are given in the standard [JSON Schema](https://json-schema.org/)
|
|
18
|
+
# format
|
|
19
|
+
# @return [Object]
|
|
20
|
+
attr_accessor :forms
|
|
21
|
+
|
|
22
|
+
# Additional information for the available forms for this type. E.g. The
|
|
23
|
+
# separator string used for `binding` in a Factor push.
|
|
24
|
+
# @return [Object]
|
|
25
|
+
attr_accessor :form_meta
|
|
26
|
+
|
|
27
|
+
# The URL to access the forms for this type.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :url
|
|
30
|
+
|
|
31
|
+
# A mapping from model property names to API property names.
|
|
32
|
+
def self.names
|
|
33
|
+
@_hash = {} if @_hash.nil?
|
|
34
|
+
@_hash['form_type'] = 'form_type'
|
|
35
|
+
@_hash['forms'] = 'forms'
|
|
36
|
+
@_hash['form_meta'] = 'form_meta'
|
|
37
|
+
@_hash['url'] = 'url'
|
|
38
|
+
@_hash
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# An array for optional fields
|
|
42
|
+
def self.optionals
|
|
43
|
+
%w[
|
|
44
|
+
form_type
|
|
45
|
+
forms
|
|
46
|
+
form_meta
|
|
47
|
+
url
|
|
48
|
+
]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# An array for nullable fields
|
|
52
|
+
def self.nullables
|
|
53
|
+
%w[
|
|
54
|
+
forms
|
|
55
|
+
form_meta
|
|
56
|
+
url
|
|
57
|
+
]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def initialize(form_type: SKIP, forms: SKIP, form_meta: SKIP, url: SKIP,
|
|
61
|
+
additional_properties: nil)
|
|
62
|
+
# Add additional model properties to the instance
|
|
63
|
+
additional_properties = {} if additional_properties.nil?
|
|
64
|
+
|
|
65
|
+
@form_type = form_type unless form_type == SKIP
|
|
66
|
+
@forms = forms unless forms == SKIP
|
|
67
|
+
@form_meta = form_meta unless form_meta == SKIP
|
|
68
|
+
@url = url unless url == SKIP
|
|
69
|
+
@additional_properties = additional_properties
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Creates an instance of the object from a hash.
|
|
73
|
+
def self.from_hash(hash)
|
|
74
|
+
return nil unless hash
|
|
75
|
+
|
|
76
|
+
# Extract variables from the hash.
|
|
77
|
+
form_type = hash.key?('form_type') ? hash['form_type'] : SKIP
|
|
78
|
+
forms = hash.key?('forms') ? hash['forms'] : SKIP
|
|
79
|
+
form_meta = hash.key?('form_meta') ? hash['form_meta'] : SKIP
|
|
80
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
81
|
+
|
|
82
|
+
# Create a new hash for additional properties, removing known properties.
|
|
83
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
84
|
+
|
|
85
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
86
|
+
new_hash, proc { |value| value }
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
# Create object from extracted values.
|
|
90
|
+
V2Form.new(form_type: form_type,
|
|
91
|
+
forms: forms,
|
|
92
|
+
form_meta: form_meta,
|
|
93
|
+
url: url,
|
|
94
|
+
additional_properties: additional_properties)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Provides a human-readable string representation of the object.
|
|
98
|
+
def to_s
|
|
99
|
+
class_name = self.class.name.split('::').last
|
|
100
|
+
"<#{class_name} form_type: #{@form_type}, forms: #{@forms}, form_meta: #{@form_meta}, url:"\
|
|
101
|
+
" #{@url}, additional_properties: #{@additional_properties}>"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
105
|
+
def inspect
|
|
106
|
+
class_name = self.class.name.split('::').last
|
|
107
|
+
"<#{class_name} form_type: #{@form_type.inspect}, forms: #{@forms.inspect}, form_meta:"\
|
|
108
|
+
" #{@form_meta.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
109
|
+
" #{@additional_properties}>"
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,262 @@
|
|
|
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
|
+
# Verification Model.
|
|
9
|
+
class Verification < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the Verification resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The SID of the [Service](https://www.twilio.com/docs/verify/api/service)
|
|
18
|
+
# the resource is associated with.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :service_sid
|
|
21
|
+
|
|
22
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
23
|
+
# created the Verification resource.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :account_sid
|
|
26
|
+
|
|
27
|
+
# The phone number or [email](https://www.twilio.com/docs/verify/email)
|
|
28
|
+
# being verified. Phone numbers must be in [E.164
|
|
29
|
+
# format](https://www.twilio.com/docs/glossary/what-e164).
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :to
|
|
32
|
+
|
|
33
|
+
# The verification method used. One of:
|
|
34
|
+
# [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`,
|
|
35
|
+
# `call`, `sna`, or `rcs`.
|
|
36
|
+
# @return [VerificationEnumChannel]
|
|
37
|
+
attr_accessor :channel
|
|
38
|
+
|
|
39
|
+
# The status of the verification. Can be: `pending`, `approved`, `canceled`,
|
|
40
|
+
# `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :status
|
|
43
|
+
|
|
44
|
+
# Use "status" instead. Legacy property indicating whether the verification
|
|
45
|
+
# was successful.
|
|
46
|
+
# @return [TrueClass | FalseClass]
|
|
47
|
+
attr_accessor :valid
|
|
48
|
+
|
|
49
|
+
# Information about the phone number being verified.
|
|
50
|
+
# @return [Object]
|
|
51
|
+
attr_accessor :lookup
|
|
52
|
+
|
|
53
|
+
# The amount of the associated PSD2 compliant transaction. Requires the PSD2
|
|
54
|
+
# Service flag enabled.
|
|
55
|
+
# @return [String]
|
|
56
|
+
attr_accessor :amount
|
|
57
|
+
|
|
58
|
+
# The payee of the associated PSD2 compliant transaction. Requires the PSD2
|
|
59
|
+
# Service flag enabled.
|
|
60
|
+
# @return [String]
|
|
61
|
+
attr_accessor :payee
|
|
62
|
+
|
|
63
|
+
# An array of verification attempt objects containing the channel attempted
|
|
64
|
+
# and the channel-specific transaction SID.
|
|
65
|
+
# @return [Array[Object]]
|
|
66
|
+
attr_accessor :send_code_attempts
|
|
67
|
+
|
|
68
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
69
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
70
|
+
# @return [DateTime]
|
|
71
|
+
attr_accessor :date_created
|
|
72
|
+
|
|
73
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
74
|
+
# [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
75
|
+
# @return [DateTime]
|
|
76
|
+
attr_accessor :date_updated
|
|
77
|
+
|
|
78
|
+
# The set of fields used for a silent network auth (`sna`) verification.
|
|
79
|
+
# Contains a single field with the URL to be invoked to verify the phone
|
|
80
|
+
# number.
|
|
81
|
+
# @return [Object]
|
|
82
|
+
attr_accessor :sna
|
|
83
|
+
|
|
84
|
+
# The absolute URL of the Verification resource.
|
|
85
|
+
# @return [String]
|
|
86
|
+
attr_accessor :url
|
|
87
|
+
|
|
88
|
+
# A mapping from model property names to API property names.
|
|
89
|
+
def self.names
|
|
90
|
+
@_hash = {} if @_hash.nil?
|
|
91
|
+
@_hash['sid'] = 'sid'
|
|
92
|
+
@_hash['service_sid'] = 'service_sid'
|
|
93
|
+
@_hash['account_sid'] = 'account_sid'
|
|
94
|
+
@_hash['to'] = 'to'
|
|
95
|
+
@_hash['channel'] = 'channel'
|
|
96
|
+
@_hash['status'] = 'status'
|
|
97
|
+
@_hash['valid'] = 'valid'
|
|
98
|
+
@_hash['lookup'] = 'lookup'
|
|
99
|
+
@_hash['amount'] = 'amount'
|
|
100
|
+
@_hash['payee'] = 'payee'
|
|
101
|
+
@_hash['send_code_attempts'] = 'send_code_attempts'
|
|
102
|
+
@_hash['date_created'] = 'date_created'
|
|
103
|
+
@_hash['date_updated'] = 'date_updated'
|
|
104
|
+
@_hash['sna'] = 'sna'
|
|
105
|
+
@_hash['url'] = 'url'
|
|
106
|
+
@_hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# An array for optional fields
|
|
110
|
+
def self.optionals
|
|
111
|
+
%w[
|
|
112
|
+
sid
|
|
113
|
+
service_sid
|
|
114
|
+
account_sid
|
|
115
|
+
to
|
|
116
|
+
channel
|
|
117
|
+
status
|
|
118
|
+
valid
|
|
119
|
+
lookup
|
|
120
|
+
amount
|
|
121
|
+
payee
|
|
122
|
+
send_code_attempts
|
|
123
|
+
date_created
|
|
124
|
+
date_updated
|
|
125
|
+
sna
|
|
126
|
+
url
|
|
127
|
+
]
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# An array for nullable fields
|
|
131
|
+
def self.nullables
|
|
132
|
+
%w[
|
|
133
|
+
sid
|
|
134
|
+
service_sid
|
|
135
|
+
account_sid
|
|
136
|
+
to
|
|
137
|
+
status
|
|
138
|
+
valid
|
|
139
|
+
lookup
|
|
140
|
+
amount
|
|
141
|
+
payee
|
|
142
|
+
send_code_attempts
|
|
143
|
+
date_created
|
|
144
|
+
date_updated
|
|
145
|
+
sna
|
|
146
|
+
url
|
|
147
|
+
]
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def initialize(sid: SKIP, service_sid: SKIP, account_sid: SKIP, to: SKIP,
|
|
151
|
+
channel: SKIP, status: SKIP, valid: SKIP, lookup: SKIP,
|
|
152
|
+
amount: SKIP, payee: SKIP, send_code_attempts: SKIP,
|
|
153
|
+
date_created: SKIP, date_updated: SKIP, sna: SKIP, url: SKIP,
|
|
154
|
+
additional_properties: nil)
|
|
155
|
+
# Add additional model properties to the instance
|
|
156
|
+
additional_properties = {} if additional_properties.nil?
|
|
157
|
+
|
|
158
|
+
@sid = sid unless sid == SKIP
|
|
159
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
160
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
161
|
+
@to = to unless to == SKIP
|
|
162
|
+
@channel = channel unless channel == SKIP
|
|
163
|
+
@status = status unless status == SKIP
|
|
164
|
+
@valid = valid unless valid == SKIP
|
|
165
|
+
@lookup = lookup unless lookup == SKIP
|
|
166
|
+
@amount = amount unless amount == SKIP
|
|
167
|
+
@payee = payee unless payee == SKIP
|
|
168
|
+
@send_code_attempts = send_code_attempts unless send_code_attempts == SKIP
|
|
169
|
+
@date_created = date_created unless date_created == SKIP
|
|
170
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
171
|
+
@sna = sna unless sna == SKIP
|
|
172
|
+
@url = url unless url == SKIP
|
|
173
|
+
@additional_properties = additional_properties
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Creates an instance of the object from a hash.
|
|
177
|
+
def self.from_hash(hash)
|
|
178
|
+
return nil unless hash
|
|
179
|
+
|
|
180
|
+
# Extract variables from the hash.
|
|
181
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
182
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
183
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
184
|
+
to = hash.key?('to') ? hash['to'] : SKIP
|
|
185
|
+
channel = hash.key?('channel') ? hash['channel'] : SKIP
|
|
186
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
187
|
+
valid = hash.key?('valid') ? hash['valid'] : SKIP
|
|
188
|
+
lookup = hash.key?('lookup') ? hash['lookup'] : SKIP
|
|
189
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
190
|
+
payee = hash.key?('payee') ? hash['payee'] : SKIP
|
|
191
|
+
send_code_attempts =
|
|
192
|
+
hash.key?('send_code_attempts') ? hash['send_code_attempts'] : SKIP
|
|
193
|
+
date_created = if hash.key?('date_created')
|
|
194
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
195
|
+
else
|
|
196
|
+
SKIP
|
|
197
|
+
end
|
|
198
|
+
date_updated = if hash.key?('date_updated')
|
|
199
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
200
|
+
else
|
|
201
|
+
SKIP
|
|
202
|
+
end
|
|
203
|
+
sna = hash.key?('sna') ? hash['sna'] : SKIP
|
|
204
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
205
|
+
|
|
206
|
+
# Create a new hash for additional properties, removing known properties.
|
|
207
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
208
|
+
|
|
209
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
210
|
+
new_hash, proc { |value| value }
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
# Create object from extracted values.
|
|
214
|
+
Verification.new(sid: sid,
|
|
215
|
+
service_sid: service_sid,
|
|
216
|
+
account_sid: account_sid,
|
|
217
|
+
to: to,
|
|
218
|
+
channel: channel,
|
|
219
|
+
status: status,
|
|
220
|
+
valid: valid,
|
|
221
|
+
lookup: lookup,
|
|
222
|
+
amount: amount,
|
|
223
|
+
payee: payee,
|
|
224
|
+
send_code_attempts: send_code_attempts,
|
|
225
|
+
date_created: date_created,
|
|
226
|
+
date_updated: date_updated,
|
|
227
|
+
sna: sna,
|
|
228
|
+
url: url,
|
|
229
|
+
additional_properties: additional_properties)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
def to_custom_date_created
|
|
233
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
def to_custom_date_updated
|
|
237
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Provides a human-readable string representation of the object.
|
|
241
|
+
def to_s
|
|
242
|
+
class_name = self.class.name.split('::').last
|
|
243
|
+
"<#{class_name} sid: #{@sid}, service_sid: #{@service_sid}, account_sid: #{@account_sid},"\
|
|
244
|
+
" to: #{@to}, channel: #{@channel}, status: #{@status}, valid: #{@valid}, lookup:"\
|
|
245
|
+
" #{@lookup}, amount: #{@amount}, payee: #{@payee}, send_code_attempts:"\
|
|
246
|
+
" #{@send_code_attempts}, date_created: #{@date_created}, date_updated: #{@date_updated},"\
|
|
247
|
+
" sna: #{@sna}, url: #{@url}, additional_properties: #{@additional_properties}>"
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
251
|
+
def inspect
|
|
252
|
+
class_name = self.class.name.split('::').last
|
|
253
|
+
"<#{class_name} sid: #{@sid.inspect}, service_sid: #{@service_sid.inspect}, account_sid:"\
|
|
254
|
+
" #{@account_sid.inspect}, to: #{@to.inspect}, channel: #{@channel.inspect}, status:"\
|
|
255
|
+
" #{@status.inspect}, valid: #{@valid.inspect}, lookup: #{@lookup.inspect}, amount:"\
|
|
256
|
+
" #{@amount.inspect}, payee: #{@payee.inspect}, send_code_attempts:"\
|
|
257
|
+
" #{@send_code_attempts.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
258
|
+
" #{@date_updated.inspect}, sna: #{@sna.inspect}, url: #{@url.inspect},"\
|
|
259
|
+
" additional_properties: #{@additional_properties}>"
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
@@ -0,0 +1,219 @@
|
|
|
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
|
+
# VerificationAttempt Model.
|
|
9
|
+
class VerificationAttempt < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The SID that uniquely identifies the verification attempt 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 Verification resource.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :account_sid
|
|
21
|
+
|
|
22
|
+
# The SID of the [Service](https://www.twilio.com/docs/verify/api/service)
|
|
23
|
+
# used to generate the attempt.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :service_sid
|
|
26
|
+
|
|
27
|
+
# The SID of the
|
|
28
|
+
# [Verification](https://www.twilio.com/docs/verify/api/verification) that
|
|
29
|
+
# generated the attempt.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :verification_sid
|
|
32
|
+
|
|
33
|
+
# The date that this Attempt was created, given in [ISO
|
|
34
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
35
|
+
# @return [DateTime]
|
|
36
|
+
attr_accessor :date_created
|
|
37
|
+
|
|
38
|
+
# The date that this Attempt was updated, given in [ISO
|
|
39
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
40
|
+
# @return [DateTime]
|
|
41
|
+
attr_accessor :date_updated
|
|
42
|
+
|
|
43
|
+
# A string specifying the conversion status of the verification. A
|
|
44
|
+
# conversion happens when the user is able to provide the correct code.
|
|
45
|
+
# Possible values are `CONVERTED` and `UNCONVERTED`.
|
|
46
|
+
# @return [VerificationAttemptEnumConversionStatus]
|
|
47
|
+
attr_accessor :conversion_status
|
|
48
|
+
|
|
49
|
+
# A string specifying the communication channel used for the verification
|
|
50
|
+
# attempt.
|
|
51
|
+
# @return [VerificationAttemptEnumChannels]
|
|
52
|
+
attr_accessor :channel
|
|
53
|
+
|
|
54
|
+
# An object containing the charge for this verification attempt related to
|
|
55
|
+
# the channel costs and the currency used. The costs related to the
|
|
56
|
+
# succeeded verifications are not included. May not be immediately
|
|
57
|
+
# available. More information on pricing is available
|
|
58
|
+
# [here](https://www.twilio.com/en-us/verify/pricing).
|
|
59
|
+
# @return [Object]
|
|
60
|
+
attr_accessor :price
|
|
61
|
+
|
|
62
|
+
# An object containing the channel specific information for an attempt.
|
|
63
|
+
# @return [Object]
|
|
64
|
+
attr_accessor :channel_data
|
|
65
|
+
|
|
66
|
+
# An object containing the channel specific information for an attempt.
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :url
|
|
69
|
+
|
|
70
|
+
# A mapping from model property names to API property names.
|
|
71
|
+
def self.names
|
|
72
|
+
@_hash = {} if @_hash.nil?
|
|
73
|
+
@_hash['sid'] = 'sid'
|
|
74
|
+
@_hash['account_sid'] = 'account_sid'
|
|
75
|
+
@_hash['service_sid'] = 'service_sid'
|
|
76
|
+
@_hash['verification_sid'] = 'verification_sid'
|
|
77
|
+
@_hash['date_created'] = 'date_created'
|
|
78
|
+
@_hash['date_updated'] = 'date_updated'
|
|
79
|
+
@_hash['conversion_status'] = 'conversion_status'
|
|
80
|
+
@_hash['channel'] = 'channel'
|
|
81
|
+
@_hash['price'] = 'price'
|
|
82
|
+
@_hash['channel_data'] = 'channel_data'
|
|
83
|
+
@_hash['url'] = 'url'
|
|
84
|
+
@_hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# An array for optional fields
|
|
88
|
+
def self.optionals
|
|
89
|
+
%w[
|
|
90
|
+
sid
|
|
91
|
+
account_sid
|
|
92
|
+
service_sid
|
|
93
|
+
verification_sid
|
|
94
|
+
date_created
|
|
95
|
+
date_updated
|
|
96
|
+
conversion_status
|
|
97
|
+
channel
|
|
98
|
+
price
|
|
99
|
+
channel_data
|
|
100
|
+
url
|
|
101
|
+
]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# An array for nullable fields
|
|
105
|
+
def self.nullables
|
|
106
|
+
%w[
|
|
107
|
+
sid
|
|
108
|
+
account_sid
|
|
109
|
+
service_sid
|
|
110
|
+
verification_sid
|
|
111
|
+
date_created
|
|
112
|
+
date_updated
|
|
113
|
+
price
|
|
114
|
+
channel_data
|
|
115
|
+
url
|
|
116
|
+
]
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def initialize(sid: SKIP, account_sid: SKIP, service_sid: SKIP,
|
|
120
|
+
verification_sid: SKIP, date_created: SKIP,
|
|
121
|
+
date_updated: SKIP, conversion_status: SKIP, channel: SKIP,
|
|
122
|
+
price: SKIP, channel_data: SKIP, url: SKIP,
|
|
123
|
+
additional_properties: nil)
|
|
124
|
+
# Add additional model properties to the instance
|
|
125
|
+
additional_properties = {} if additional_properties.nil?
|
|
126
|
+
|
|
127
|
+
@sid = sid unless sid == SKIP
|
|
128
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
129
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
130
|
+
@verification_sid = verification_sid unless verification_sid == SKIP
|
|
131
|
+
@date_created = date_created unless date_created == SKIP
|
|
132
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
133
|
+
@conversion_status = conversion_status unless conversion_status == SKIP
|
|
134
|
+
@channel = channel unless channel == SKIP
|
|
135
|
+
@price = price unless price == SKIP
|
|
136
|
+
@channel_data = channel_data unless channel_data == SKIP
|
|
137
|
+
@url = url unless url == SKIP
|
|
138
|
+
@additional_properties = additional_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Creates an instance of the object from a hash.
|
|
142
|
+
def self.from_hash(hash)
|
|
143
|
+
return nil unless hash
|
|
144
|
+
|
|
145
|
+
# Extract variables from the hash.
|
|
146
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
147
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
148
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
149
|
+
verification_sid =
|
|
150
|
+
hash.key?('verification_sid') ? hash['verification_sid'] : SKIP
|
|
151
|
+
date_created = if hash.key?('date_created')
|
|
152
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
153
|
+
else
|
|
154
|
+
SKIP
|
|
155
|
+
end
|
|
156
|
+
date_updated = if hash.key?('date_updated')
|
|
157
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
158
|
+
else
|
|
159
|
+
SKIP
|
|
160
|
+
end
|
|
161
|
+
conversion_status =
|
|
162
|
+
hash.key?('conversion_status') ? hash['conversion_status'] : SKIP
|
|
163
|
+
channel = hash.key?('channel') ? hash['channel'] : SKIP
|
|
164
|
+
price = hash.key?('price') ? hash['price'] : SKIP
|
|
165
|
+
channel_data = hash.key?('channel_data') ? hash['channel_data'] : SKIP
|
|
166
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
167
|
+
|
|
168
|
+
# Create a new hash for additional properties, removing known properties.
|
|
169
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
170
|
+
|
|
171
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
172
|
+
new_hash, proc { |value| value }
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
# Create object from extracted values.
|
|
176
|
+
VerificationAttempt.new(sid: sid,
|
|
177
|
+
account_sid: account_sid,
|
|
178
|
+
service_sid: service_sid,
|
|
179
|
+
verification_sid: verification_sid,
|
|
180
|
+
date_created: date_created,
|
|
181
|
+
date_updated: date_updated,
|
|
182
|
+
conversion_status: conversion_status,
|
|
183
|
+
channel: channel,
|
|
184
|
+
price: price,
|
|
185
|
+
channel_data: channel_data,
|
|
186
|
+
url: url,
|
|
187
|
+
additional_properties: additional_properties)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
def to_custom_date_created
|
|
191
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
def to_custom_date_updated
|
|
195
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Provides a human-readable string representation of the object.
|
|
199
|
+
def to_s
|
|
200
|
+
class_name = self.class.name.split('::').last
|
|
201
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, service_sid: #{@service_sid},"\
|
|
202
|
+
" verification_sid: #{@verification_sid}, date_created: #{@date_created}, date_updated:"\
|
|
203
|
+
" #{@date_updated}, conversion_status: #{@conversion_status}, channel: #{@channel}, price:"\
|
|
204
|
+
" #{@price}, channel_data: #{@channel_data}, url: #{@url}, additional_properties:"\
|
|
205
|
+
" #{@additional_properties}>"
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
209
|
+
def inspect
|
|
210
|
+
class_name = self.class.name.split('::').last
|
|
211
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, service_sid:"\
|
|
212
|
+
" #{@service_sid.inspect}, verification_sid: #{@verification_sid.inspect}, date_created:"\
|
|
213
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, conversion_status:"\
|
|
214
|
+
" #{@conversion_status.inspect}, channel: #{@channel.inspect}, price: #{@price.inspect},"\
|
|
215
|
+
" channel_data: #{@channel_data.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
216
|
+
" #{@additional_properties}>"
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
# VerificationAttemptEnumAttemptStatus.
|
|
8
|
+
class VerificationAttemptEnumAttemptStatus
|
|
9
|
+
VERIFICATION_ATTEMPT_ENUM_ATTEMPT_STATUS = [
|
|
10
|
+
# TODO: Write general description for CONFIRMED
|
|
11
|
+
CONFIRMED = 'confirmed'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for UNCONFIRMED
|
|
14
|
+
UNCONFIRMED = 'unconfirmed'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for EXPIRED
|
|
17
|
+
EXPIRED = 'expired'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
VERIFICATION_ATTEMPT_ENUM_ATTEMPT_STATUS.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = CONFIRMED)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'confirmed' then CONFIRMED
|
|
33
|
+
when 'unconfirmed' then UNCONFIRMED
|
|
34
|
+
when 'expired' then EXPIRED
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
# VerificationAttemptEnumCallStatus.
|
|
8
|
+
class VerificationAttemptEnumCallStatus
|
|
9
|
+
VERIFICATION_ATTEMPT_ENUM_CALL_STATUS = [
|
|
10
|
+
# TODO: Write general description for QUEUED
|
|
11
|
+
QUEUED = 'queued'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for INPROGRESS
|
|
14
|
+
INPROGRESS = 'in-progress'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for COMPLETED
|
|
17
|
+
COMPLETED = 'completed'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for BUSY
|
|
20
|
+
BUSY = 'busy'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for FAILED
|
|
23
|
+
FAILED = 'failed'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for NOANSWER
|
|
26
|
+
NOANSWER = 'no-answer'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for RINGING
|
|
29
|
+
RINGING = 'ringing'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for CANCELED
|
|
32
|
+
CANCELED = 'canceled'.freeze
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def self.validate(value)
|
|
36
|
+
return false if value.nil?
|
|
37
|
+
|
|
38
|
+
VERIFICATION_ATTEMPT_ENUM_CALL_STATUS.include?(value)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_value(value, default_value = QUEUED)
|
|
42
|
+
return default_value if value.nil?
|
|
43
|
+
|
|
44
|
+
str = value.to_s.strip
|
|
45
|
+
|
|
46
|
+
case str.downcase
|
|
47
|
+
when 'queued' then QUEUED
|
|
48
|
+
when 'inprogress' then INPROGRESS
|
|
49
|
+
when 'completed' then COMPLETED
|
|
50
|
+
when 'busy' then BUSY
|
|
51
|
+
when 'failed' then FAILED
|
|
52
|
+
when 'noanswer' then NOANSWER
|
|
53
|
+
when 'ringing' then RINGING
|
|
54
|
+
when 'canceled' then CANCELED
|
|
55
|
+
else
|
|
56
|
+
default_value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|