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,39 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# Risk_check overrides Fraud Prevention measures like Fraud Guard, Geo
|
|
8
|
+
# Permissions etc per verification attempt basis, allowing Verify to block
|
|
9
|
+
# traffic considered fraudulent if enabled or bypass active protections if
|
|
10
|
+
# disabled. Can be: `enable`(default) or `disable`. For SMS channel only.
|
|
11
|
+
class VerificationEnumRiskCheck
|
|
12
|
+
VERIFICATION_ENUM_RISK_CHECK = [
|
|
13
|
+
# TODO: Write general description for ENABLE
|
|
14
|
+
ENABLE = 'enable'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for DISABLE
|
|
17
|
+
DISABLE = 'disable'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
VERIFICATION_ENUM_RISK_CHECK.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = ENABLE)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'enable' then ENABLE
|
|
33
|
+
when 'disable' then DISABLE
|
|
34
|
+
else
|
|
35
|
+
default_value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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 status of the verification. Can be: `pending`, `approved`, `canceled`,
|
|
8
|
+
# `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
|
9
|
+
class VerificationEnumStatus
|
|
10
|
+
VERIFICATION_ENUM_STATUS = [
|
|
11
|
+
# TODO: Write general description for CANCELED
|
|
12
|
+
CANCELED = 'canceled'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for APPROVED
|
|
15
|
+
APPROVED = 'approved'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
VERIFICATION_ENUM_STATUS.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = CANCELED)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'canceled' then CANCELED
|
|
31
|
+
when 'approved' then APPROVED
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,126 @@
|
|
|
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
|
+
# VerificationTemplate Model.
|
|
8
|
+
class VerificationTemplate < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A 34 character string that uniquely identifies a Verification Template.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :sid
|
|
15
|
+
|
|
16
|
+
# The unique SID identifier of the Account.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :account_sid
|
|
19
|
+
|
|
20
|
+
# A descriptive string that you create to describe a Template. It can be up
|
|
21
|
+
# to 32 characters long.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :friendly_name
|
|
24
|
+
|
|
25
|
+
# A list of channels that support the Template. Can include: sms, voice.
|
|
26
|
+
# @return [Array[String]]
|
|
27
|
+
attr_accessor :channels
|
|
28
|
+
|
|
29
|
+
# An object that contains the different translations of the template. Every
|
|
30
|
+
# translation is identified by the language short name and contains its
|
|
31
|
+
# respective information as the approval status, text and created/modified
|
|
32
|
+
# date.
|
|
33
|
+
# @return [Object]
|
|
34
|
+
attr_accessor :translations
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['sid'] = 'sid'
|
|
40
|
+
@_hash['account_sid'] = 'account_sid'
|
|
41
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
42
|
+
@_hash['channels'] = 'channels'
|
|
43
|
+
@_hash['translations'] = 'translations'
|
|
44
|
+
@_hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for optional fields
|
|
48
|
+
def self.optionals
|
|
49
|
+
%w[
|
|
50
|
+
sid
|
|
51
|
+
account_sid
|
|
52
|
+
friendly_name
|
|
53
|
+
channels
|
|
54
|
+
translations
|
|
55
|
+
]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for nullable fields
|
|
59
|
+
def self.nullables
|
|
60
|
+
%w[
|
|
61
|
+
sid
|
|
62
|
+
account_sid
|
|
63
|
+
friendly_name
|
|
64
|
+
channels
|
|
65
|
+
translations
|
|
66
|
+
]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def initialize(sid: SKIP, account_sid: SKIP, friendly_name: SKIP,
|
|
70
|
+
channels: SKIP, translations: SKIP,
|
|
71
|
+
additional_properties: nil)
|
|
72
|
+
# Add additional model properties to the instance
|
|
73
|
+
additional_properties = {} if additional_properties.nil?
|
|
74
|
+
|
|
75
|
+
@sid = sid unless sid == SKIP
|
|
76
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
77
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
78
|
+
@channels = channels unless channels == SKIP
|
|
79
|
+
@translations = translations unless translations == 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
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
89
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
90
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
91
|
+
channels = hash.key?('channels') ? hash['channels'] : SKIP
|
|
92
|
+
translations = hash.key?('translations') ? hash['translations'] : SKIP
|
|
93
|
+
|
|
94
|
+
# Create a new hash for additional properties, removing known properties.
|
|
95
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
96
|
+
|
|
97
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
98
|
+
new_hash, proc { |value| value }
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# Create object from extracted values.
|
|
102
|
+
VerificationTemplate.new(sid: sid,
|
|
103
|
+
account_sid: account_sid,
|
|
104
|
+
friendly_name: friendly_name,
|
|
105
|
+
channels: channels,
|
|
106
|
+
translations: translations,
|
|
107
|
+
additional_properties: additional_properties)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, friendly_name:"\
|
|
114
|
+
" #{@friendly_name}, channels: #{@channels}, translations: #{@translations},"\
|
|
115
|
+
" additional_properties: #{@additional_properties}>"
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
119
|
+
def inspect
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, friendly_name:"\
|
|
122
|
+
" #{@friendly_name.inspect}, channels: #{@channels.inspect}, translations:"\
|
|
123
|
+
" #{@translations.inspect}, additional_properties: #{@additional_properties}>"
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
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
|
+
# Webhook Model.
|
|
9
|
+
class Webhook < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the Webhook resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The unique SID identifier of the Service.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :service_sid
|
|
20
|
+
|
|
21
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
22
|
+
# created the Service resource.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :account_sid
|
|
25
|
+
|
|
26
|
+
# The string that you assigned to describe the webhook. **This value should
|
|
27
|
+
# not contain PII.**
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :friendly_name
|
|
30
|
+
|
|
31
|
+
# The array of events that this Webhook is subscribed to. Possible event
|
|
32
|
+
# types: `*, factor.deleted, factor.created, factor.verified,
|
|
33
|
+
# challenge.approved, challenge.denied`
|
|
34
|
+
# @return [Array[String]]
|
|
35
|
+
attr_accessor :event_types
|
|
36
|
+
|
|
37
|
+
# The webhook status. Default value is `enabled`. One of: `enabled` or
|
|
38
|
+
# `disabled`
|
|
39
|
+
# @return [WebhookEnumStatus]
|
|
40
|
+
attr_accessor :status
|
|
41
|
+
|
|
42
|
+
# The webhook version. Default value is `v2` which includes all the latest
|
|
43
|
+
# fields. Version `v1` is legacy and may be removed in the future.
|
|
44
|
+
# @return [WebhookEnumVersion]
|
|
45
|
+
attr_accessor :version
|
|
46
|
+
|
|
47
|
+
# The URL associated with this Webhook.
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :webhook_url
|
|
50
|
+
|
|
51
|
+
# The method to be used when calling the webhook's URL.
|
|
52
|
+
# @return [ConfigurationWebhookMethod]
|
|
53
|
+
attr_accessor :webhook_method
|
|
54
|
+
|
|
55
|
+
# The date and time in GMT when the resource was created specified in [ISO
|
|
56
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
57
|
+
# @return [DateTime]
|
|
58
|
+
attr_accessor :date_created
|
|
59
|
+
|
|
60
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
61
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
62
|
+
# @return [DateTime]
|
|
63
|
+
attr_accessor :date_updated
|
|
64
|
+
|
|
65
|
+
# The absolute URL of the Webhook resource.
|
|
66
|
+
# @return [String]
|
|
67
|
+
attr_accessor :url
|
|
68
|
+
|
|
69
|
+
# A mapping from model property names to API property names.
|
|
70
|
+
def self.names
|
|
71
|
+
@_hash = {} if @_hash.nil?
|
|
72
|
+
@_hash['sid'] = 'sid'
|
|
73
|
+
@_hash['service_sid'] = 'service_sid'
|
|
74
|
+
@_hash['account_sid'] = 'account_sid'
|
|
75
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
76
|
+
@_hash['event_types'] = 'event_types'
|
|
77
|
+
@_hash['status'] = 'status'
|
|
78
|
+
@_hash['version'] = 'version'
|
|
79
|
+
@_hash['webhook_url'] = 'webhook_url'
|
|
80
|
+
@_hash['webhook_method'] = 'webhook_method'
|
|
81
|
+
@_hash['date_created'] = 'date_created'
|
|
82
|
+
@_hash['date_updated'] = 'date_updated'
|
|
83
|
+
@_hash['url'] = 'url'
|
|
84
|
+
@_hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# An array for optional fields
|
|
88
|
+
def self.optionals
|
|
89
|
+
%w[
|
|
90
|
+
sid
|
|
91
|
+
service_sid
|
|
92
|
+
account_sid
|
|
93
|
+
friendly_name
|
|
94
|
+
event_types
|
|
95
|
+
status
|
|
96
|
+
version
|
|
97
|
+
webhook_url
|
|
98
|
+
webhook_method
|
|
99
|
+
date_created
|
|
100
|
+
date_updated
|
|
101
|
+
url
|
|
102
|
+
]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# An array for nullable fields
|
|
106
|
+
def self.nullables
|
|
107
|
+
%w[
|
|
108
|
+
sid
|
|
109
|
+
service_sid
|
|
110
|
+
account_sid
|
|
111
|
+
friendly_name
|
|
112
|
+
event_types
|
|
113
|
+
webhook_url
|
|
114
|
+
date_created
|
|
115
|
+
date_updated
|
|
116
|
+
url
|
|
117
|
+
]
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def initialize(sid: SKIP, service_sid: SKIP, account_sid: SKIP,
|
|
121
|
+
friendly_name: SKIP, event_types: SKIP, status: SKIP,
|
|
122
|
+
version: SKIP, webhook_url: SKIP, webhook_method: SKIP,
|
|
123
|
+
date_created: SKIP, date_updated: SKIP, url: SKIP,
|
|
124
|
+
additional_properties: nil)
|
|
125
|
+
# Add additional model properties to the instance
|
|
126
|
+
additional_properties = {} if additional_properties.nil?
|
|
127
|
+
|
|
128
|
+
@sid = sid unless sid == SKIP
|
|
129
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
130
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
131
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
132
|
+
@event_types = event_types unless event_types == SKIP
|
|
133
|
+
@status = status unless status == SKIP
|
|
134
|
+
@version = version unless version == SKIP
|
|
135
|
+
@webhook_url = webhook_url unless webhook_url == SKIP
|
|
136
|
+
@webhook_method = webhook_method unless webhook_method == SKIP
|
|
137
|
+
@date_created = date_created unless date_created == SKIP
|
|
138
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
139
|
+
@url = url unless url == SKIP
|
|
140
|
+
@additional_properties = additional_properties
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Creates an instance of the object from a hash.
|
|
144
|
+
def self.from_hash(hash)
|
|
145
|
+
return nil unless hash
|
|
146
|
+
|
|
147
|
+
# Extract variables from the hash.
|
|
148
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
149
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
150
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
151
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
152
|
+
event_types = hash.key?('event_types') ? hash['event_types'] : SKIP
|
|
153
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
154
|
+
version = hash.key?('version') ? hash['version'] : SKIP
|
|
155
|
+
webhook_url = hash.key?('webhook_url') ? hash['webhook_url'] : SKIP
|
|
156
|
+
webhook_method =
|
|
157
|
+
hash.key?('webhook_method') ? hash['webhook_method'] : SKIP
|
|
158
|
+
date_created = if hash.key?('date_created')
|
|
159
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
160
|
+
else
|
|
161
|
+
SKIP
|
|
162
|
+
end
|
|
163
|
+
date_updated = if hash.key?('date_updated')
|
|
164
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
165
|
+
else
|
|
166
|
+
SKIP
|
|
167
|
+
end
|
|
168
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
169
|
+
|
|
170
|
+
# Create a new hash for additional properties, removing known properties.
|
|
171
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
172
|
+
|
|
173
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
174
|
+
new_hash, proc { |value| value }
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
# Create object from extracted values.
|
|
178
|
+
Webhook.new(sid: sid,
|
|
179
|
+
service_sid: service_sid,
|
|
180
|
+
account_sid: account_sid,
|
|
181
|
+
friendly_name: friendly_name,
|
|
182
|
+
event_types: event_types,
|
|
183
|
+
status: status,
|
|
184
|
+
version: version,
|
|
185
|
+
webhook_url: webhook_url,
|
|
186
|
+
webhook_method: webhook_method,
|
|
187
|
+
date_created: date_created,
|
|
188
|
+
date_updated: date_updated,
|
|
189
|
+
url: url,
|
|
190
|
+
additional_properties: additional_properties)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
def to_custom_date_created
|
|
194
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
def to_custom_date_updated
|
|
198
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Provides a human-readable string representation of the object.
|
|
202
|
+
def to_s
|
|
203
|
+
class_name = self.class.name.split('::').last
|
|
204
|
+
"<#{class_name} sid: #{@sid}, service_sid: #{@service_sid}, account_sid: #{@account_sid},"\
|
|
205
|
+
" friendly_name: #{@friendly_name}, event_types: #{@event_types}, status: #{@status},"\
|
|
206
|
+
" version: #{@version}, webhook_url: #{@webhook_url}, webhook_method: #{@webhook_method},"\
|
|
207
|
+
" date_created: #{@date_created}, date_updated: #{@date_updated}, url: #{@url},"\
|
|
208
|
+
" additional_properties: #{@additional_properties}>"
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
212
|
+
def inspect
|
|
213
|
+
class_name = self.class.name.split('::').last
|
|
214
|
+
"<#{class_name} sid: #{@sid.inspect}, service_sid: #{@service_sid.inspect}, account_sid:"\
|
|
215
|
+
" #{@account_sid.inspect}, friendly_name: #{@friendly_name.inspect}, event_types:"\
|
|
216
|
+
" #{@event_types.inspect}, status: #{@status.inspect}, version: #{@version.inspect},"\
|
|
217
|
+
" webhook_url: #{@webhook_url.inspect}, webhook_method: #{@webhook_method.inspect},"\
|
|
218
|
+
" date_created: #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, url:"\
|
|
219
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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 webhook status. Default value is `enabled`. One of: `enabled` or
|
|
8
|
+
# `disabled`
|
|
9
|
+
class WebhookEnumStatus
|
|
10
|
+
WEBHOOK_ENUM_STATUS = [
|
|
11
|
+
# TODO: Write general description for ENABLED
|
|
12
|
+
ENABLED = 'enabled'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for DISABLED
|
|
15
|
+
DISABLED = 'disabled'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
WEBHOOK_ENUM_STATUS.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = ENABLED)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'enabled' then ENABLED
|
|
31
|
+
when 'disabled' then DISABLED
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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 webhook version. Default value is `v2` which includes all the latest
|
|
8
|
+
# fields. Version `v1` is legacy and may be removed in the future.
|
|
9
|
+
class WebhookEnumVersion
|
|
10
|
+
WEBHOOK_ENUM_VERSION = [
|
|
11
|
+
# TODO: Write general description for V1
|
|
12
|
+
V1 = 'v1'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for V2
|
|
15
|
+
V2 = 'v2'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
WEBHOOK_ENUM_VERSION.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = V1)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'v1' then V1
|
|
31
|
+
when 'v2' then V2
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|