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,240 @@
|
|
|
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
|
+
# ConversationParticipant Model.
|
|
9
|
+
class ConversationParticipant < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique ID of the
|
|
14
|
+
# [Account](https://www.twilio.com/docs/iam/api/account) responsible for
|
|
15
|
+
# this participant.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :account_sid
|
|
18
|
+
|
|
19
|
+
# The unique ID of the
|
|
20
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
21
|
+
# resource) for this participant.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :conversation_sid
|
|
24
|
+
|
|
25
|
+
# A 34 character string that uniquely identifies this resource.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :sid
|
|
28
|
+
|
|
29
|
+
# A unique string identifier for the conversation participant as
|
|
30
|
+
# [Conversation
|
|
31
|
+
# User](https://www.twilio.com/docs/conversations/api/user-resource). This
|
|
32
|
+
# parameter is non-null if (and only if) the participant is using the
|
|
33
|
+
# Conversations SDK to communicate. Limited to 256 characters.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :identity
|
|
36
|
+
|
|
37
|
+
# An optional string metadata field you can use to store any data you wish.
|
|
38
|
+
# The string value must contain structurally valid JSON if specified.
|
|
39
|
+
# **Note** that if the attributes are not set "{}" will be returned.
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :attributes
|
|
42
|
+
|
|
43
|
+
# Information about how this participant exchanges messages with the
|
|
44
|
+
# conversation. A JSON parameter consisting of type and address fields of
|
|
45
|
+
# the participant.
|
|
46
|
+
# @return [Object]
|
|
47
|
+
attr_accessor :messaging_binding
|
|
48
|
+
|
|
49
|
+
# The SID of a conversation-level
|
|
50
|
+
# [Role](https://www.twilio.com/docs/conversations/api/role-resource) to
|
|
51
|
+
# assign to the participant.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :role_sid
|
|
54
|
+
|
|
55
|
+
# The date that this resource was created.
|
|
56
|
+
# @return [DateTime]
|
|
57
|
+
attr_accessor :date_created
|
|
58
|
+
|
|
59
|
+
# The date that this resource was last updated.
|
|
60
|
+
# @return [DateTime]
|
|
61
|
+
attr_accessor :date_updated
|
|
62
|
+
|
|
63
|
+
# An absolute API resource URL for this participant.
|
|
64
|
+
# @return [String]
|
|
65
|
+
attr_accessor :url
|
|
66
|
+
|
|
67
|
+
# Index of last “read” message in the
|
|
68
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
69
|
+
# resource) for the Participant.
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
attr_accessor :last_read_message_index
|
|
72
|
+
|
|
73
|
+
# Timestamp of last “read” message in the
|
|
74
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
75
|
+
# resource) for the Participant.
|
|
76
|
+
# @return [String]
|
|
77
|
+
attr_accessor :last_read_timestamp
|
|
78
|
+
|
|
79
|
+
# A mapping from model property names to API property names.
|
|
80
|
+
def self.names
|
|
81
|
+
@_hash = {} if @_hash.nil?
|
|
82
|
+
@_hash['account_sid'] = 'account_sid'
|
|
83
|
+
@_hash['conversation_sid'] = 'conversation_sid'
|
|
84
|
+
@_hash['sid'] = 'sid'
|
|
85
|
+
@_hash['identity'] = 'identity'
|
|
86
|
+
@_hash['attributes'] = 'attributes'
|
|
87
|
+
@_hash['messaging_binding'] = 'messaging_binding'
|
|
88
|
+
@_hash['role_sid'] = 'role_sid'
|
|
89
|
+
@_hash['date_created'] = 'date_created'
|
|
90
|
+
@_hash['date_updated'] = 'date_updated'
|
|
91
|
+
@_hash['url'] = 'url'
|
|
92
|
+
@_hash['last_read_message_index'] = 'last_read_message_index'
|
|
93
|
+
@_hash['last_read_timestamp'] = 'last_read_timestamp'
|
|
94
|
+
@_hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# An array for optional fields
|
|
98
|
+
def self.optionals
|
|
99
|
+
%w[
|
|
100
|
+
account_sid
|
|
101
|
+
conversation_sid
|
|
102
|
+
sid
|
|
103
|
+
identity
|
|
104
|
+
attributes
|
|
105
|
+
messaging_binding
|
|
106
|
+
role_sid
|
|
107
|
+
date_created
|
|
108
|
+
date_updated
|
|
109
|
+
url
|
|
110
|
+
last_read_message_index
|
|
111
|
+
last_read_timestamp
|
|
112
|
+
]
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# An array for nullable fields
|
|
116
|
+
def self.nullables
|
|
117
|
+
%w[
|
|
118
|
+
account_sid
|
|
119
|
+
conversation_sid
|
|
120
|
+
sid
|
|
121
|
+
identity
|
|
122
|
+
attributes
|
|
123
|
+
messaging_binding
|
|
124
|
+
role_sid
|
|
125
|
+
date_created
|
|
126
|
+
date_updated
|
|
127
|
+
url
|
|
128
|
+
last_read_message_index
|
|
129
|
+
last_read_timestamp
|
|
130
|
+
]
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def initialize(account_sid: SKIP, conversation_sid: SKIP, sid: SKIP,
|
|
134
|
+
identity: SKIP, attributes: SKIP, messaging_binding: SKIP,
|
|
135
|
+
role_sid: SKIP, date_created: SKIP, date_updated: SKIP,
|
|
136
|
+
url: SKIP, last_read_message_index: SKIP,
|
|
137
|
+
last_read_timestamp: SKIP, additional_properties: nil)
|
|
138
|
+
# Add additional model properties to the instance
|
|
139
|
+
additional_properties = {} if additional_properties.nil?
|
|
140
|
+
|
|
141
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
142
|
+
@conversation_sid = conversation_sid unless conversation_sid == SKIP
|
|
143
|
+
@sid = sid unless sid == SKIP
|
|
144
|
+
@identity = identity unless identity == SKIP
|
|
145
|
+
@attributes = attributes unless attributes == SKIP
|
|
146
|
+
@messaging_binding = messaging_binding unless messaging_binding == SKIP
|
|
147
|
+
@role_sid = role_sid unless role_sid == SKIP
|
|
148
|
+
@date_created = date_created unless date_created == SKIP
|
|
149
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
150
|
+
@url = url unless url == SKIP
|
|
151
|
+
@last_read_message_index = last_read_message_index unless last_read_message_index == SKIP
|
|
152
|
+
@last_read_timestamp = last_read_timestamp unless last_read_timestamp == SKIP
|
|
153
|
+
@additional_properties = additional_properties
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Creates an instance of the object from a hash.
|
|
157
|
+
def self.from_hash(hash)
|
|
158
|
+
return nil unless hash
|
|
159
|
+
|
|
160
|
+
# Extract variables from the hash.
|
|
161
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
162
|
+
conversation_sid =
|
|
163
|
+
hash.key?('conversation_sid') ? hash['conversation_sid'] : SKIP
|
|
164
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
165
|
+
identity = hash.key?('identity') ? hash['identity'] : SKIP
|
|
166
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
167
|
+
messaging_binding =
|
|
168
|
+
hash.key?('messaging_binding') ? hash['messaging_binding'] : SKIP
|
|
169
|
+
role_sid = hash.key?('role_sid') ? hash['role_sid'] : SKIP
|
|
170
|
+
date_created = if hash.key?('date_created')
|
|
171
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
172
|
+
else
|
|
173
|
+
SKIP
|
|
174
|
+
end
|
|
175
|
+
date_updated = if hash.key?('date_updated')
|
|
176
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
177
|
+
else
|
|
178
|
+
SKIP
|
|
179
|
+
end
|
|
180
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
181
|
+
last_read_message_index =
|
|
182
|
+
hash.key?('last_read_message_index') ? hash['last_read_message_index'] : SKIP
|
|
183
|
+
last_read_timestamp =
|
|
184
|
+
hash.key?('last_read_timestamp') ? hash['last_read_timestamp'] : SKIP
|
|
185
|
+
|
|
186
|
+
# Create a new hash for additional properties, removing known properties.
|
|
187
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
188
|
+
|
|
189
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
190
|
+
new_hash, proc { |value| value }
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
# Create object from extracted values.
|
|
194
|
+
ConversationParticipant.new(account_sid: account_sid,
|
|
195
|
+
conversation_sid: conversation_sid,
|
|
196
|
+
sid: sid,
|
|
197
|
+
identity: identity,
|
|
198
|
+
attributes: attributes,
|
|
199
|
+
messaging_binding: messaging_binding,
|
|
200
|
+
role_sid: role_sid,
|
|
201
|
+
date_created: date_created,
|
|
202
|
+
date_updated: date_updated,
|
|
203
|
+
url: url,
|
|
204
|
+
last_read_message_index: last_read_message_index,
|
|
205
|
+
last_read_timestamp: last_read_timestamp,
|
|
206
|
+
additional_properties: additional_properties)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
def to_custom_date_created
|
|
210
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
def to_custom_date_updated
|
|
214
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Provides a human-readable string representation of the object.
|
|
218
|
+
def to_s
|
|
219
|
+
class_name = self.class.name.split('::').last
|
|
220
|
+
"<#{class_name} account_sid: #{@account_sid}, conversation_sid: #{@conversation_sid}, sid:"\
|
|
221
|
+
" #{@sid}, identity: #{@identity}, attributes: #{@attributes}, messaging_binding:"\
|
|
222
|
+
" #{@messaging_binding}, role_sid: #{@role_sid}, date_created: #{@date_created},"\
|
|
223
|
+
" date_updated: #{@date_updated}, url: #{@url}, last_read_message_index:"\
|
|
224
|
+
" #{@last_read_message_index}, last_read_timestamp: #{@last_read_timestamp},"\
|
|
225
|
+
" additional_properties: #{@additional_properties}>"
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
229
|
+
def inspect
|
|
230
|
+
class_name = self.class.name.split('::').last
|
|
231
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, conversation_sid:"\
|
|
232
|
+
" #{@conversation_sid.inspect}, sid: #{@sid.inspect}, identity: #{@identity.inspect},"\
|
|
233
|
+
" attributes: #{@attributes.inspect}, messaging_binding: #{@messaging_binding.inspect},"\
|
|
234
|
+
" role_sid: #{@role_sid.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
235
|
+
" #{@date_updated.inspect}, url: #{@url.inspect}, last_read_message_index:"\
|
|
236
|
+
" #{@last_read_message_index.inspect}, last_read_timestamp: #{@last_read_timestamp.inspect},"\
|
|
237
|
+
" additional_properties: #{@additional_properties}>"
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
+
# ConversationScopedWebhook Model.
|
|
9
|
+
class ConversationScopedWebhook < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# A 34 character string that uniquely identifies this resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The unique ID of the
|
|
18
|
+
# [Account](https://www.twilio.com/docs/iam/api/account) responsible for
|
|
19
|
+
# this conversation.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :account_sid
|
|
22
|
+
|
|
23
|
+
# The unique ID of the
|
|
24
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
25
|
+
# resource) for this webhook.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :conversation_sid
|
|
28
|
+
|
|
29
|
+
# The target of this webhook: `webhook`, `studio`, `trigger`
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :target
|
|
32
|
+
|
|
33
|
+
# An absolute API resource URL for this webhook.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :url
|
|
36
|
+
|
|
37
|
+
# The configuration of this webhook. Is defined based on target.
|
|
38
|
+
# @return [Object]
|
|
39
|
+
attr_accessor :configuration
|
|
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
|
+
# A mapping from model property names to API property names.
|
|
50
|
+
def self.names
|
|
51
|
+
@_hash = {} if @_hash.nil?
|
|
52
|
+
@_hash['sid'] = 'sid'
|
|
53
|
+
@_hash['account_sid'] = 'account_sid'
|
|
54
|
+
@_hash['conversation_sid'] = 'conversation_sid'
|
|
55
|
+
@_hash['target'] = 'target'
|
|
56
|
+
@_hash['url'] = 'url'
|
|
57
|
+
@_hash['configuration'] = 'configuration'
|
|
58
|
+
@_hash['date_created'] = 'date_created'
|
|
59
|
+
@_hash['date_updated'] = 'date_updated'
|
|
60
|
+
@_hash
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# An array for optional fields
|
|
64
|
+
def self.optionals
|
|
65
|
+
%w[
|
|
66
|
+
sid
|
|
67
|
+
account_sid
|
|
68
|
+
conversation_sid
|
|
69
|
+
target
|
|
70
|
+
url
|
|
71
|
+
configuration
|
|
72
|
+
date_created
|
|
73
|
+
date_updated
|
|
74
|
+
]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# An array for nullable fields
|
|
78
|
+
def self.nullables
|
|
79
|
+
%w[
|
|
80
|
+
sid
|
|
81
|
+
account_sid
|
|
82
|
+
conversation_sid
|
|
83
|
+
target
|
|
84
|
+
url
|
|
85
|
+
configuration
|
|
86
|
+
date_created
|
|
87
|
+
date_updated
|
|
88
|
+
]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def initialize(sid: SKIP, account_sid: SKIP, conversation_sid: SKIP,
|
|
92
|
+
target: SKIP, url: SKIP, configuration: SKIP,
|
|
93
|
+
date_created: SKIP, date_updated: SKIP,
|
|
94
|
+
additional_properties: nil)
|
|
95
|
+
# Add additional model properties to the instance
|
|
96
|
+
additional_properties = {} if additional_properties.nil?
|
|
97
|
+
|
|
98
|
+
@sid = sid unless sid == SKIP
|
|
99
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
100
|
+
@conversation_sid = conversation_sid unless conversation_sid == SKIP
|
|
101
|
+
@target = target unless target == SKIP
|
|
102
|
+
@url = url unless url == SKIP
|
|
103
|
+
@configuration = configuration unless configuration == SKIP
|
|
104
|
+
@date_created = date_created unless date_created == SKIP
|
|
105
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
106
|
+
@additional_properties = additional_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Creates an instance of the object from a hash.
|
|
110
|
+
def self.from_hash(hash)
|
|
111
|
+
return nil unless hash
|
|
112
|
+
|
|
113
|
+
# Extract variables from the hash.
|
|
114
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
115
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
116
|
+
conversation_sid =
|
|
117
|
+
hash.key?('conversation_sid') ? hash['conversation_sid'] : SKIP
|
|
118
|
+
target = hash.key?('target') ? hash['target'] : SKIP
|
|
119
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
120
|
+
configuration = hash.key?('configuration') ? hash['configuration'] : SKIP
|
|
121
|
+
date_created = if hash.key?('date_created')
|
|
122
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
123
|
+
else
|
|
124
|
+
SKIP
|
|
125
|
+
end
|
|
126
|
+
date_updated = if hash.key?('date_updated')
|
|
127
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
128
|
+
else
|
|
129
|
+
SKIP
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Create a new hash for additional properties, removing known properties.
|
|
133
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
134
|
+
|
|
135
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
136
|
+
new_hash, proc { |value| value }
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
# Create object from extracted values.
|
|
140
|
+
ConversationScopedWebhook.new(sid: sid,
|
|
141
|
+
account_sid: account_sid,
|
|
142
|
+
conversation_sid: conversation_sid,
|
|
143
|
+
target: target,
|
|
144
|
+
url: url,
|
|
145
|
+
configuration: configuration,
|
|
146
|
+
date_created: date_created,
|
|
147
|
+
date_updated: date_updated,
|
|
148
|
+
additional_properties: additional_properties)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def to_custom_date_created
|
|
152
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def to_custom_date_updated
|
|
156
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Provides a human-readable string representation of the object.
|
|
160
|
+
def to_s
|
|
161
|
+
class_name = self.class.name.split('::').last
|
|
162
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, conversation_sid:"\
|
|
163
|
+
" #{@conversation_sid}, target: #{@target}, url: #{@url}, configuration: #{@configuration},"\
|
|
164
|
+
" date_created: #{@date_created}, date_updated: #{@date_updated}, additional_properties:"\
|
|
165
|
+
" #{@additional_properties}>"
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
169
|
+
def inspect
|
|
170
|
+
class_name = self.class.name.split('::').last
|
|
171
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect},"\
|
|
172
|
+
" conversation_sid: #{@conversation_sid.inspect}, target: #{@target.inspect}, url:"\
|
|
173
|
+
" #{@url.inspect}, configuration: #{@configuration.inspect}, date_created:"\
|
|
174
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, additional_properties:"\
|
|
175
|
+
" #{@additional_properties}>"
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
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
|
+
# ConversationScopedWebhookMethod.
|
|
8
|
+
class ConversationScopedWebhookMethod
|
|
9
|
+
CONVERSATION_SCOPED_WEBHOOK_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
|
+
CONVERSATION_SCOPED_WEBHOOK_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,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
|
+
# The target of this webhook: `webhook`, `studio`, `trigger`
|
|
8
|
+
class ConversationScopedWebhookTarget
|
|
9
|
+
CONVERSATION_SCOPED_WEBHOOK_TARGET = [
|
|
10
|
+
# TODO: Write general description for WEBHOOK
|
|
11
|
+
WEBHOOK = 'webhook'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for TRIGGER
|
|
14
|
+
TRIGGER = 'trigger'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for STUDIO
|
|
17
|
+
STUDIO = 'studio'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
CONVERSATION_SCOPED_WEBHOOK_TARGET.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 'trigger' then TRIGGER
|
|
34
|
+
when 'studio' then STUDIO
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
# Current state of this conversation. Can be either `initializing`, `active`,
|
|
8
|
+
# `inactive` or `closed` and defaults to `active`
|
|
9
|
+
class ConversationState
|
|
10
|
+
CONVERSATION_STATE = [
|
|
11
|
+
# TODO: Write general description for INITIALIZING
|
|
12
|
+
INITIALIZING = 'initializing'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for INACTIVE
|
|
15
|
+
INACTIVE = 'inactive'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for ACTIVE
|
|
18
|
+
ACTIVE = 'active'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for CLOSED
|
|
21
|
+
CLOSED = 'closed'.freeze
|
|
22
|
+
].freeze
|
|
23
|
+
|
|
24
|
+
def self.validate(value)
|
|
25
|
+
return false if value.nil?
|
|
26
|
+
|
|
27
|
+
CONVERSATION_STATE.include?(value)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.from_value(value, default_value = INITIALIZING)
|
|
31
|
+
return default_value if value.nil?
|
|
32
|
+
|
|
33
|
+
str = value.to_s.strip
|
|
34
|
+
|
|
35
|
+
case str.downcase
|
|
36
|
+
when 'initializing' then INITIALIZING
|
|
37
|
+
when 'inactive' then INACTIVE
|
|
38
|
+
when 'active' then ACTIVE
|
|
39
|
+
when 'closed' then CLOSED
|
|
40
|
+
else
|
|
41
|
+
default_value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
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
|
+
# The HTTP method to be used when sending a webhook request.
|
|
8
|
+
class ConversationWebhookMethod
|
|
9
|
+
CONVERSATION_WEBHOOK_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
|
+
CONVERSATION_WEBHOOK_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,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 routing target of the webhook. Can be ordinary or route internally to
|
|
8
|
+
# Flex
|
|
9
|
+
class ConversationWebhookTarget
|
|
10
|
+
CONVERSATION_WEBHOOK_TARGET = [
|
|
11
|
+
# TODO: Write general description for WEBHOOK
|
|
12
|
+
WEBHOOK = 'webhook'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for FLEX
|
|
15
|
+
FLEX = 'flex'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
CONVERSATION_WEBHOOK_TARGET.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = WEBHOOK)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'webhook' then WEBHOOK
|
|
31
|
+
when 'flex' then FLEX
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|