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,36 @@
|
|
|
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 visibility of the channel. Can be: `public` or `private`.
|
|
8
|
+
class ChannelChannelType
|
|
9
|
+
CHANNEL_CHANNEL_TYPE = [
|
|
10
|
+
# TODO: Write general description for PUBLIC
|
|
11
|
+
PUBLIC = 'public'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for PRIVATE
|
|
14
|
+
PRIVATE = 'private'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
CHANNEL_CHANNEL_TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = PUBLIC)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'public' then PUBLIC
|
|
30
|
+
when 'private' then PRIVATE
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# ChannelWebhookEnabledType.
|
|
8
|
+
class ChannelWebhookEnabledType
|
|
9
|
+
CHANNEL_WEBHOOK_ENABLED_TYPE = [
|
|
10
|
+
# TODO: Write general description for ENUM_TRUE
|
|
11
|
+
ENUM_TRUE = 'true'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ENUM_FALSE
|
|
14
|
+
ENUM_FALSE = 'false'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
CHANNEL_WEBHOOK_ENABLED_TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ENUM_TRUE)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'enum_true' then ENUM_TRUE
|
|
30
|
+
when 'enum_false' then ENUM_FALSE
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
# Configuration Model.
|
|
8
|
+
class Configuration < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account)
|
|
13
|
+
# responsible for this configuration.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_sid
|
|
16
|
+
|
|
17
|
+
# The SID of the default [Conversation
|
|
18
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
19
|
+
# used when creating a conversation.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :default_chat_service_sid
|
|
22
|
+
|
|
23
|
+
# The SID of the default [Messaging
|
|
24
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) used
|
|
25
|
+
# when creating a conversation.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :default_messaging_service_sid
|
|
28
|
+
|
|
29
|
+
# Default ISO8601 duration when conversation will be switched to `inactive`
|
|
30
|
+
# state. Minimum value for this timer is 1 minute.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :default_inactive_timer
|
|
33
|
+
|
|
34
|
+
# Default ISO8601 duration when conversation will be switched to `closed`
|
|
35
|
+
# state. Minimum value for this timer is 10 minutes.
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :default_closed_timer
|
|
38
|
+
|
|
39
|
+
# An absolute API resource URL for this global configuration.
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :url
|
|
42
|
+
|
|
43
|
+
# Contains absolute API resource URLs to access the webhook and default
|
|
44
|
+
# service configurations.
|
|
45
|
+
# @return [Object]
|
|
46
|
+
attr_accessor :links
|
|
47
|
+
|
|
48
|
+
# A mapping from model property names to API property names.
|
|
49
|
+
def self.names
|
|
50
|
+
@_hash = {} if @_hash.nil?
|
|
51
|
+
@_hash['account_sid'] = 'account_sid'
|
|
52
|
+
@_hash['default_chat_service_sid'] = 'default_chat_service_sid'
|
|
53
|
+
@_hash['default_messaging_service_sid'] =
|
|
54
|
+
'default_messaging_service_sid'
|
|
55
|
+
@_hash['default_inactive_timer'] = 'default_inactive_timer'
|
|
56
|
+
@_hash['default_closed_timer'] = 'default_closed_timer'
|
|
57
|
+
@_hash['url'] = 'url'
|
|
58
|
+
@_hash['links'] = 'links'
|
|
59
|
+
@_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for optional fields
|
|
63
|
+
def self.optionals
|
|
64
|
+
%w[
|
|
65
|
+
account_sid
|
|
66
|
+
default_chat_service_sid
|
|
67
|
+
default_messaging_service_sid
|
|
68
|
+
default_inactive_timer
|
|
69
|
+
default_closed_timer
|
|
70
|
+
url
|
|
71
|
+
links
|
|
72
|
+
]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# An array for nullable fields
|
|
76
|
+
def self.nullables
|
|
77
|
+
%w[
|
|
78
|
+
account_sid
|
|
79
|
+
default_chat_service_sid
|
|
80
|
+
default_messaging_service_sid
|
|
81
|
+
default_inactive_timer
|
|
82
|
+
default_closed_timer
|
|
83
|
+
url
|
|
84
|
+
links
|
|
85
|
+
]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def initialize(account_sid: SKIP, default_chat_service_sid: SKIP,
|
|
89
|
+
default_messaging_service_sid: SKIP,
|
|
90
|
+
default_inactive_timer: SKIP, default_closed_timer: SKIP,
|
|
91
|
+
url: SKIP, links: SKIP, additional_properties: nil)
|
|
92
|
+
# Add additional model properties to the instance
|
|
93
|
+
additional_properties = {} if additional_properties.nil?
|
|
94
|
+
|
|
95
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
96
|
+
@default_chat_service_sid = default_chat_service_sid unless default_chat_service_sid == SKIP
|
|
97
|
+
unless default_messaging_service_sid == SKIP
|
|
98
|
+
@default_messaging_service_sid =
|
|
99
|
+
default_messaging_service_sid
|
|
100
|
+
end
|
|
101
|
+
@default_inactive_timer = default_inactive_timer unless default_inactive_timer == SKIP
|
|
102
|
+
@default_closed_timer = default_closed_timer unless default_closed_timer == SKIP
|
|
103
|
+
@url = url unless url == SKIP
|
|
104
|
+
@links = links unless links == SKIP
|
|
105
|
+
@additional_properties = additional_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Creates an instance of the object from a hash.
|
|
109
|
+
def self.from_hash(hash)
|
|
110
|
+
return nil unless hash
|
|
111
|
+
|
|
112
|
+
# Extract variables from the hash.
|
|
113
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
114
|
+
default_chat_service_sid =
|
|
115
|
+
hash.key?('default_chat_service_sid') ? hash['default_chat_service_sid'] : SKIP
|
|
116
|
+
default_messaging_service_sid =
|
|
117
|
+
hash.key?('default_messaging_service_sid') ? hash['default_messaging_service_sid'] : SKIP
|
|
118
|
+
default_inactive_timer =
|
|
119
|
+
hash.key?('default_inactive_timer') ? hash['default_inactive_timer'] : SKIP
|
|
120
|
+
default_closed_timer =
|
|
121
|
+
hash.key?('default_closed_timer') ? hash['default_closed_timer'] : SKIP
|
|
122
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
123
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
124
|
+
|
|
125
|
+
# Create a new hash for additional properties, removing known properties.
|
|
126
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
127
|
+
|
|
128
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
129
|
+
new_hash, proc { |value| value }
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
# Create object from extracted values.
|
|
133
|
+
Configuration.new(account_sid: account_sid,
|
|
134
|
+
default_chat_service_sid: default_chat_service_sid,
|
|
135
|
+
default_messaging_service_sid: default_messaging_service_sid,
|
|
136
|
+
default_inactive_timer: default_inactive_timer,
|
|
137
|
+
default_closed_timer: default_closed_timer,
|
|
138
|
+
url: url,
|
|
139
|
+
links: links,
|
|
140
|
+
additional_properties: additional_properties)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Provides a human-readable string representation of the object.
|
|
144
|
+
def to_s
|
|
145
|
+
class_name = self.class.name.split('::').last
|
|
146
|
+
"<#{class_name} account_sid: #{@account_sid}, default_chat_service_sid:"\
|
|
147
|
+
" #{@default_chat_service_sid}, default_messaging_service_sid:"\
|
|
148
|
+
" #{@default_messaging_service_sid}, default_inactive_timer: #{@default_inactive_timer},"\
|
|
149
|
+
" default_closed_timer: #{@default_closed_timer}, url: #{@url}, links: #{@links},"\
|
|
150
|
+
" additional_properties: #{@additional_properties}>"
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
154
|
+
def inspect
|
|
155
|
+
class_name = self.class.name.split('::').last
|
|
156
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, default_chat_service_sid:"\
|
|
157
|
+
" #{@default_chat_service_sid.inspect}, default_messaging_service_sid:"\
|
|
158
|
+
" #{@default_messaging_service_sid.inspect}, default_inactive_timer:"\
|
|
159
|
+
" #{@default_inactive_timer.inspect}, default_closed_timer:"\
|
|
160
|
+
" #{@default_closed_timer.inspect}, url: #{@url.inspect}, links: #{@links.inspect},"\
|
|
161
|
+
" additional_properties: #{@additional_properties}>"
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
# ConfigurationAddress Model.
|
|
9
|
+
class ConfigurationAddress < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# A 34 character string that uniquely identifies this resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The unique ID of the
|
|
18
|
+
# [Account](https://www.twilio.com/docs/iam/api/account) the address belongs
|
|
19
|
+
# to
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :account_sid
|
|
22
|
+
|
|
23
|
+
# Type of Address, value can be `whatsapp` or `sms`.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :type
|
|
26
|
+
|
|
27
|
+
# The unique address to be configured. The address can be a whatsapp address
|
|
28
|
+
# or phone number
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :address
|
|
31
|
+
|
|
32
|
+
# The human-readable name of this configuration, limited to 256 characters.
|
|
33
|
+
# Optional.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :friendly_name
|
|
36
|
+
|
|
37
|
+
# Auto Creation configuration for the address.
|
|
38
|
+
# @return [Object]
|
|
39
|
+
attr_accessor :auto_creation
|
|
40
|
+
|
|
41
|
+
# The date that this resource was created.
|
|
42
|
+
# @return [DateTime]
|
|
43
|
+
attr_accessor :date_created
|
|
44
|
+
|
|
45
|
+
# The date that this resource was last updated.
|
|
46
|
+
# @return [DateTime]
|
|
47
|
+
attr_accessor :date_updated
|
|
48
|
+
|
|
49
|
+
# An absolute API resource URL for this address configuration.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :url
|
|
52
|
+
|
|
53
|
+
# An ISO 3166-1 alpha-2n country code which the address belongs to. This is
|
|
54
|
+
# currently only applicable to short code addresses.
|
|
55
|
+
# @return [String]
|
|
56
|
+
attr_accessor :address_country
|
|
57
|
+
|
|
58
|
+
# A mapping from model property names to API property names.
|
|
59
|
+
def self.names
|
|
60
|
+
@_hash = {} if @_hash.nil?
|
|
61
|
+
@_hash['sid'] = 'sid'
|
|
62
|
+
@_hash['account_sid'] = 'account_sid'
|
|
63
|
+
@_hash['type'] = 'type'
|
|
64
|
+
@_hash['address'] = 'address'
|
|
65
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
66
|
+
@_hash['auto_creation'] = 'auto_creation'
|
|
67
|
+
@_hash['date_created'] = 'date_created'
|
|
68
|
+
@_hash['date_updated'] = 'date_updated'
|
|
69
|
+
@_hash['url'] = 'url'
|
|
70
|
+
@_hash['address_country'] = 'address_country'
|
|
71
|
+
@_hash
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# An array for optional fields
|
|
75
|
+
def self.optionals
|
|
76
|
+
%w[
|
|
77
|
+
sid
|
|
78
|
+
account_sid
|
|
79
|
+
type
|
|
80
|
+
address
|
|
81
|
+
friendly_name
|
|
82
|
+
auto_creation
|
|
83
|
+
date_created
|
|
84
|
+
date_updated
|
|
85
|
+
url
|
|
86
|
+
address_country
|
|
87
|
+
]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# An array for nullable fields
|
|
91
|
+
def self.nullables
|
|
92
|
+
%w[
|
|
93
|
+
sid
|
|
94
|
+
account_sid
|
|
95
|
+
type
|
|
96
|
+
address
|
|
97
|
+
friendly_name
|
|
98
|
+
auto_creation
|
|
99
|
+
date_created
|
|
100
|
+
date_updated
|
|
101
|
+
url
|
|
102
|
+
address_country
|
|
103
|
+
]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def initialize(sid: SKIP, account_sid: SKIP, type: SKIP, address: SKIP,
|
|
107
|
+
friendly_name: SKIP, auto_creation: SKIP, date_created: SKIP,
|
|
108
|
+
date_updated: SKIP, url: SKIP, address_country: SKIP,
|
|
109
|
+
additional_properties: nil)
|
|
110
|
+
# Add additional model properties to the instance
|
|
111
|
+
additional_properties = {} if additional_properties.nil?
|
|
112
|
+
|
|
113
|
+
@sid = sid unless sid == SKIP
|
|
114
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
115
|
+
@type = type unless type == SKIP
|
|
116
|
+
@address = address unless address == SKIP
|
|
117
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
118
|
+
@auto_creation = auto_creation unless auto_creation == SKIP
|
|
119
|
+
@date_created = date_created unless date_created == SKIP
|
|
120
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
121
|
+
@url = url unless url == SKIP
|
|
122
|
+
@address_country = address_country unless address_country == SKIP
|
|
123
|
+
@additional_properties = additional_properties
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Creates an instance of the object from a hash.
|
|
127
|
+
def self.from_hash(hash)
|
|
128
|
+
return nil unless hash
|
|
129
|
+
|
|
130
|
+
# Extract variables from the hash.
|
|
131
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
132
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
133
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
134
|
+
address = hash.key?('address') ? hash['address'] : SKIP
|
|
135
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
136
|
+
auto_creation = hash.key?('auto_creation') ? hash['auto_creation'] : SKIP
|
|
137
|
+
date_created = if hash.key?('date_created')
|
|
138
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
139
|
+
else
|
|
140
|
+
SKIP
|
|
141
|
+
end
|
|
142
|
+
date_updated = if hash.key?('date_updated')
|
|
143
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
144
|
+
else
|
|
145
|
+
SKIP
|
|
146
|
+
end
|
|
147
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
148
|
+
address_country =
|
|
149
|
+
hash.key?('address_country') ? hash['address_country'] : SKIP
|
|
150
|
+
|
|
151
|
+
# Create a new hash for additional properties, removing known properties.
|
|
152
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
153
|
+
|
|
154
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
155
|
+
new_hash, proc { |value| value }
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
# Create object from extracted values.
|
|
159
|
+
ConfigurationAddress.new(sid: sid,
|
|
160
|
+
account_sid: account_sid,
|
|
161
|
+
type: type,
|
|
162
|
+
address: address,
|
|
163
|
+
friendly_name: friendly_name,
|
|
164
|
+
auto_creation: auto_creation,
|
|
165
|
+
date_created: date_created,
|
|
166
|
+
date_updated: date_updated,
|
|
167
|
+
url: url,
|
|
168
|
+
address_country: address_country,
|
|
169
|
+
additional_properties: additional_properties)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def to_custom_date_created
|
|
173
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def to_custom_date_updated
|
|
177
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Provides a human-readable string representation of the object.
|
|
181
|
+
def to_s
|
|
182
|
+
class_name = self.class.name.split('::').last
|
|
183
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, type: #{@type}, address:"\
|
|
184
|
+
" #{@address}, friendly_name: #{@friendly_name}, auto_creation: #{@auto_creation},"\
|
|
185
|
+
" date_created: #{@date_created}, date_updated: #{@date_updated}, url: #{@url},"\
|
|
186
|
+
" address_country: #{@address_country}, additional_properties: #{@additional_properties}>"
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
190
|
+
def inspect
|
|
191
|
+
class_name = self.class.name.split('::').last
|
|
192
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, type:"\
|
|
193
|
+
" #{@type.inspect}, address: #{@address.inspect}, friendly_name: #{@friendly_name.inspect},"\
|
|
194
|
+
" auto_creation: #{@auto_creation.inspect}, date_created: #{@date_created.inspect},"\
|
|
195
|
+
" date_updated: #{@date_updated.inspect}, url: #{@url.inspect}, address_country:"\
|
|
196
|
+
" #{@address_country.inspect}, additional_properties: #{@additional_properties}>"
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
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
|
+
# ConfigurationAddressAutoCreationType.
|
|
8
|
+
class ConfigurationAddressAutoCreationType
|
|
9
|
+
CONFIGURATION_ADDRESS_AUTO_CREATION_TYPE = [
|
|
10
|
+
# TODO: Write general description for WEBHOOK
|
|
11
|
+
WEBHOOK = 'webhook'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for STUDIO
|
|
14
|
+
STUDIO = 'studio'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for DEFAULT
|
|
17
|
+
DEFAULT = 'default'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
CONFIGURATION_ADDRESS_AUTO_CREATION_TYPE.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = WEBHOOK)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'webhook' then WEBHOOK
|
|
33
|
+
when 'studio' then STUDIO
|
|
34
|
+
when 'default' then DEFAULT
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# ConfigurationAddressMethod.
|
|
8
|
+
class ConfigurationAddressMethod
|
|
9
|
+
CONFIGURATION_ADDRESS_METHOD = [
|
|
10
|
+
# TODO: Write general description for GET
|
|
11
|
+
GET = 'get'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for POST
|
|
14
|
+
POST = 'post'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
CONFIGURATION_ADDRESS_METHOD.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = GET)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'get' then GET
|
|
30
|
+
when 'post' then POST
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
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
|
+
# Type of Address, value can be `whatsapp` or `sms`.
|
|
8
|
+
class ConfigurationAddressType
|
|
9
|
+
CONFIGURATION_ADDRESS_TYPE = [
|
|
10
|
+
# TODO: Write general description for SMS
|
|
11
|
+
SMS = 'sms'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for WHATSAPP
|
|
14
|
+
WHATSAPP = 'whatsapp'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for MESSENGER
|
|
17
|
+
MESSENGER = 'messenger'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for GBM
|
|
20
|
+
GBM = 'gbm'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for EMAIL
|
|
23
|
+
EMAIL = 'email'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for RCS
|
|
26
|
+
RCS = 'rcs'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for APPLE
|
|
29
|
+
APPLE = 'apple'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for CHAT
|
|
32
|
+
CHAT = 'chat'.freeze
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def self.validate(value)
|
|
36
|
+
return false if value.nil?
|
|
37
|
+
|
|
38
|
+
CONFIGURATION_ADDRESS_TYPE.include?(value)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_value(value, default_value = SMS)
|
|
42
|
+
return default_value if value.nil?
|
|
43
|
+
|
|
44
|
+
str = value.to_s.strip
|
|
45
|
+
|
|
46
|
+
case str.downcase
|
|
47
|
+
when 'sms' then SMS
|
|
48
|
+
when 'whatsapp' then WHATSAPP
|
|
49
|
+
when 'messenger' then MESSENGER
|
|
50
|
+
when 'gbm' then GBM
|
|
51
|
+
when 'email' then EMAIL
|
|
52
|
+
when 'rcs' then RCS
|
|
53
|
+
when 'apple' then APPLE
|
|
54
|
+
when 'chat' then CHAT
|
|
55
|
+
else
|
|
56
|
+
default_value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|