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,250 @@
|
|
|
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
|
+
# ServiceUser Model.
|
|
9
|
+
class ServiceUser < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the User resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
18
|
+
# created the User resource.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :account_sid
|
|
21
|
+
|
|
22
|
+
# The SID of the [Conversation
|
|
23
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
24
|
+
# the User resource is associated with.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :chat_service_sid
|
|
27
|
+
|
|
28
|
+
# The SID of a service-level
|
|
29
|
+
# [Role](https://www.twilio.com/docs/conversations/api/role-resource)
|
|
30
|
+
# assigned to the user.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :role_sid
|
|
33
|
+
|
|
34
|
+
# The application-defined string that uniquely identifies the resource's
|
|
35
|
+
# User within the [Conversation
|
|
36
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource).
|
|
37
|
+
# This value is often a username or an email address, and is case-sensitive.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :identity
|
|
40
|
+
|
|
41
|
+
# The string that you assigned to describe the resource.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :friendly_name
|
|
44
|
+
|
|
45
|
+
# The JSON Object string that stores application-specific data. If
|
|
46
|
+
# attributes have not been set, `{}` is returned.
|
|
47
|
+
# @return [String]
|
|
48
|
+
attr_accessor :attributes
|
|
49
|
+
|
|
50
|
+
# Whether the User is actively connected to this Conversations Service and
|
|
51
|
+
# online. This value is only returned by Fetch actions that return a single
|
|
52
|
+
# resource and `null` is always returned by a Read action. This value is
|
|
53
|
+
# `null` if the Service's `reachability_enabled` is `false`, if the User has
|
|
54
|
+
# never been online for this Conversations Service, even if the Service's
|
|
55
|
+
# `reachability_enabled` is `true`.
|
|
56
|
+
# @return [TrueClass | FalseClass]
|
|
57
|
+
attr_accessor :is_online
|
|
58
|
+
|
|
59
|
+
# Whether the User has a potentially valid Push Notification registration
|
|
60
|
+
# (APN or GCM) for this Conversations Service. If at least one registration
|
|
61
|
+
# exists, `true`; otherwise `false`. This value is only returned by Fetch
|
|
62
|
+
# actions that return a single resource and `null` is always returned by a
|
|
63
|
+
# Read action. This value is `null` if the Service's `reachability_enabled`
|
|
64
|
+
# is `false`, and if the User has never had a notification registration,
|
|
65
|
+
# even if the Service's `reachability_enabled` is `true`.
|
|
66
|
+
# @return [TrueClass | FalseClass]
|
|
67
|
+
attr_accessor :is_notifiable
|
|
68
|
+
|
|
69
|
+
# The date and time in GMT when the resource was created specified in [ISO
|
|
70
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
71
|
+
# @return [DateTime]
|
|
72
|
+
attr_accessor :date_created
|
|
73
|
+
|
|
74
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
75
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
76
|
+
# @return [DateTime]
|
|
77
|
+
attr_accessor :date_updated
|
|
78
|
+
|
|
79
|
+
# An absolute API resource URL for this user.
|
|
80
|
+
# @return [String]
|
|
81
|
+
attr_accessor :url
|
|
82
|
+
|
|
83
|
+
# An absolute API resource URL for this user.
|
|
84
|
+
# @return [Object]
|
|
85
|
+
attr_accessor :links
|
|
86
|
+
|
|
87
|
+
# A mapping from model property names to API property names.
|
|
88
|
+
def self.names
|
|
89
|
+
@_hash = {} if @_hash.nil?
|
|
90
|
+
@_hash['sid'] = 'sid'
|
|
91
|
+
@_hash['account_sid'] = 'account_sid'
|
|
92
|
+
@_hash['chat_service_sid'] = 'chat_service_sid'
|
|
93
|
+
@_hash['role_sid'] = 'role_sid'
|
|
94
|
+
@_hash['identity'] = 'identity'
|
|
95
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
96
|
+
@_hash['attributes'] = 'attributes'
|
|
97
|
+
@_hash['is_online'] = 'is_online'
|
|
98
|
+
@_hash['is_notifiable'] = 'is_notifiable'
|
|
99
|
+
@_hash['date_created'] = 'date_created'
|
|
100
|
+
@_hash['date_updated'] = 'date_updated'
|
|
101
|
+
@_hash['url'] = 'url'
|
|
102
|
+
@_hash['links'] = 'links'
|
|
103
|
+
@_hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# An array for optional fields
|
|
107
|
+
def self.optionals
|
|
108
|
+
%w[
|
|
109
|
+
sid
|
|
110
|
+
account_sid
|
|
111
|
+
chat_service_sid
|
|
112
|
+
role_sid
|
|
113
|
+
identity
|
|
114
|
+
friendly_name
|
|
115
|
+
attributes
|
|
116
|
+
is_online
|
|
117
|
+
is_notifiable
|
|
118
|
+
date_created
|
|
119
|
+
date_updated
|
|
120
|
+
url
|
|
121
|
+
links
|
|
122
|
+
]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# An array for nullable fields
|
|
126
|
+
def self.nullables
|
|
127
|
+
%w[
|
|
128
|
+
sid
|
|
129
|
+
account_sid
|
|
130
|
+
chat_service_sid
|
|
131
|
+
role_sid
|
|
132
|
+
identity
|
|
133
|
+
friendly_name
|
|
134
|
+
attributes
|
|
135
|
+
is_online
|
|
136
|
+
is_notifiable
|
|
137
|
+
date_created
|
|
138
|
+
date_updated
|
|
139
|
+
url
|
|
140
|
+
links
|
|
141
|
+
]
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def initialize(sid: SKIP, account_sid: SKIP, chat_service_sid: SKIP,
|
|
145
|
+
role_sid: SKIP, identity: SKIP, friendly_name: SKIP,
|
|
146
|
+
attributes: SKIP, is_online: SKIP, is_notifiable: SKIP,
|
|
147
|
+
date_created: SKIP, date_updated: SKIP, url: SKIP,
|
|
148
|
+
links: SKIP, additional_properties: nil)
|
|
149
|
+
# Add additional model properties to the instance
|
|
150
|
+
additional_properties = {} if additional_properties.nil?
|
|
151
|
+
|
|
152
|
+
@sid = sid unless sid == SKIP
|
|
153
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
154
|
+
@chat_service_sid = chat_service_sid unless chat_service_sid == SKIP
|
|
155
|
+
@role_sid = role_sid unless role_sid == SKIP
|
|
156
|
+
@identity = identity unless identity == SKIP
|
|
157
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
158
|
+
@attributes = attributes unless attributes == SKIP
|
|
159
|
+
@is_online = is_online unless is_online == SKIP
|
|
160
|
+
@is_notifiable = is_notifiable unless is_notifiable == SKIP
|
|
161
|
+
@date_created = date_created unless date_created == SKIP
|
|
162
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
163
|
+
@url = url unless url == SKIP
|
|
164
|
+
@links = links unless links == SKIP
|
|
165
|
+
@additional_properties = additional_properties
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Creates an instance of the object from a hash.
|
|
169
|
+
def self.from_hash(hash)
|
|
170
|
+
return nil unless hash
|
|
171
|
+
|
|
172
|
+
# Extract variables from the hash.
|
|
173
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
174
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
175
|
+
chat_service_sid =
|
|
176
|
+
hash.key?('chat_service_sid') ? hash['chat_service_sid'] : SKIP
|
|
177
|
+
role_sid = hash.key?('role_sid') ? hash['role_sid'] : SKIP
|
|
178
|
+
identity = hash.key?('identity') ? hash['identity'] : SKIP
|
|
179
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
180
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
181
|
+
is_online = hash.key?('is_online') ? hash['is_online'] : SKIP
|
|
182
|
+
is_notifiable = hash.key?('is_notifiable') ? hash['is_notifiable'] : SKIP
|
|
183
|
+
date_created = if hash.key?('date_created')
|
|
184
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
185
|
+
else
|
|
186
|
+
SKIP
|
|
187
|
+
end
|
|
188
|
+
date_updated = if hash.key?('date_updated')
|
|
189
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
190
|
+
else
|
|
191
|
+
SKIP
|
|
192
|
+
end
|
|
193
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
194
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
195
|
+
|
|
196
|
+
# Create a new hash for additional properties, removing known properties.
|
|
197
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
198
|
+
|
|
199
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
200
|
+
new_hash, proc { |value| value }
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
# Create object from extracted values.
|
|
204
|
+
ServiceUser.new(sid: sid,
|
|
205
|
+
account_sid: account_sid,
|
|
206
|
+
chat_service_sid: chat_service_sid,
|
|
207
|
+
role_sid: role_sid,
|
|
208
|
+
identity: identity,
|
|
209
|
+
friendly_name: friendly_name,
|
|
210
|
+
attributes: attributes,
|
|
211
|
+
is_online: is_online,
|
|
212
|
+
is_notifiable: is_notifiable,
|
|
213
|
+
date_created: date_created,
|
|
214
|
+
date_updated: date_updated,
|
|
215
|
+
url: url,
|
|
216
|
+
links: links,
|
|
217
|
+
additional_properties: additional_properties)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
def to_custom_date_created
|
|
221
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
def to_custom_date_updated
|
|
225
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Provides a human-readable string representation of the object.
|
|
229
|
+
def to_s
|
|
230
|
+
class_name = self.class.name.split('::').last
|
|
231
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, chat_service_sid:"\
|
|
232
|
+
" #{@chat_service_sid}, role_sid: #{@role_sid}, identity: #{@identity}, friendly_name:"\
|
|
233
|
+
" #{@friendly_name}, attributes: #{@attributes}, is_online: #{@is_online}, is_notifiable:"\
|
|
234
|
+
" #{@is_notifiable}, date_created: #{@date_created}, date_updated: #{@date_updated}, url:"\
|
|
235
|
+
" #{@url}, links: #{@links}, additional_properties: #{@additional_properties}>"
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
239
|
+
def inspect
|
|
240
|
+
class_name = self.class.name.split('::').last
|
|
241
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect},"\
|
|
242
|
+
" chat_service_sid: #{@chat_service_sid.inspect}, role_sid: #{@role_sid.inspect}, identity:"\
|
|
243
|
+
" #{@identity.inspect}, friendly_name: #{@friendly_name.inspect}, attributes:"\
|
|
244
|
+
" #{@attributes.inspect}, is_online: #{@is_online.inspect}, is_notifiable:"\
|
|
245
|
+
" #{@is_notifiable.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
246
|
+
" #{@date_updated.inspect}, url: #{@url.inspect}, links: #{@links.inspect},"\
|
|
247
|
+
" additional_properties: #{@additional_properties}>"
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
@@ -0,0 +1,317 @@
|
|
|
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
|
+
# ServiceUserConversation Model.
|
|
9
|
+
class ServiceUserConversation < 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 conversation.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :account_sid
|
|
18
|
+
|
|
19
|
+
# The unique ID of the [Conversation
|
|
20
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
21
|
+
# this conversation belongs to.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :chat_service_sid
|
|
24
|
+
|
|
25
|
+
# The unique ID of the
|
|
26
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
27
|
+
# resource) for this User Conversation.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :conversation_sid
|
|
30
|
+
|
|
31
|
+
# The number of unread Messages in the Conversation for the Participant.
|
|
32
|
+
# @return [Integer]
|
|
33
|
+
attr_accessor :unread_messages_count
|
|
34
|
+
|
|
35
|
+
# The index of the last Message in the Conversation that the Participant has
|
|
36
|
+
# read.
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :last_read_message_index
|
|
39
|
+
|
|
40
|
+
# The unique ID of the
|
|
41
|
+
# [participant](https://www.twilio.com/docs/conversations/api/conversation-p
|
|
42
|
+
# articipant-resource) the user conversation belongs to.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :participant_sid
|
|
45
|
+
|
|
46
|
+
# The unique string that identifies the [User
|
|
47
|
+
# resource](https://www.twilio.com/docs/conversations/api/user-resource).
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :user_sid
|
|
50
|
+
|
|
51
|
+
# The human-readable name of this conversation, limited to 256 characters.
|
|
52
|
+
# Optional.
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :friendly_name
|
|
55
|
+
|
|
56
|
+
# The current state of this User Conversation. One of `inactive`, `active`
|
|
57
|
+
# or `closed`.
|
|
58
|
+
# @return [ServiceUserConversationState]
|
|
59
|
+
attr_accessor :conversation_state
|
|
60
|
+
|
|
61
|
+
# Timer date values representing state update for this conversation.
|
|
62
|
+
# @return [Object]
|
|
63
|
+
attr_accessor :timers
|
|
64
|
+
|
|
65
|
+
# An optional string metadata field you can use to store any data you wish.
|
|
66
|
+
# The string value must contain structurally valid JSON if specified.
|
|
67
|
+
# **Note** that if the attributes are not set "{}" will be returned.
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :attributes
|
|
70
|
+
|
|
71
|
+
# The date that this conversation was created, given in ISO 8601 format.
|
|
72
|
+
# @return [DateTime]
|
|
73
|
+
attr_accessor :date_created
|
|
74
|
+
|
|
75
|
+
# The date that this conversation was last updated, given in ISO 8601
|
|
76
|
+
# format.
|
|
77
|
+
# @return [DateTime]
|
|
78
|
+
attr_accessor :date_updated
|
|
79
|
+
|
|
80
|
+
# Identity of the creator of this Conversation.
|
|
81
|
+
# @return [String]
|
|
82
|
+
attr_accessor :created_by
|
|
83
|
+
|
|
84
|
+
# The Notification Level of this User Conversation. One of `default` or
|
|
85
|
+
# `muted`.
|
|
86
|
+
# @return [ServiceUserConversationNotificationLevel]
|
|
87
|
+
attr_accessor :notification_level
|
|
88
|
+
|
|
89
|
+
# An application-defined string that uniquely identifies the Conversation
|
|
90
|
+
# resource. It can be used to address the resource in place of the
|
|
91
|
+
# resource's `conversation_sid` in the URL.
|
|
92
|
+
# @return [String]
|
|
93
|
+
attr_accessor :unique_name
|
|
94
|
+
|
|
95
|
+
# An application-defined string that uniquely identifies the Conversation
|
|
96
|
+
# resource. It can be used to address the resource in place of the
|
|
97
|
+
# resource's `conversation_sid` in the URL.
|
|
98
|
+
# @return [String]
|
|
99
|
+
attr_accessor :url
|
|
100
|
+
|
|
101
|
+
# Contains absolute URLs to access the
|
|
102
|
+
# [participant](https://www.twilio.com/docs/conversations/api/conversation-p
|
|
103
|
+
# articipant-resource) and
|
|
104
|
+
# [conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
105
|
+
# resource) of this conversation.
|
|
106
|
+
# @return [Object]
|
|
107
|
+
attr_accessor :links
|
|
108
|
+
|
|
109
|
+
# A mapping from model property names to API property names.
|
|
110
|
+
def self.names
|
|
111
|
+
@_hash = {} if @_hash.nil?
|
|
112
|
+
@_hash['account_sid'] = 'account_sid'
|
|
113
|
+
@_hash['chat_service_sid'] = 'chat_service_sid'
|
|
114
|
+
@_hash['conversation_sid'] = 'conversation_sid'
|
|
115
|
+
@_hash['unread_messages_count'] = 'unread_messages_count'
|
|
116
|
+
@_hash['last_read_message_index'] = 'last_read_message_index'
|
|
117
|
+
@_hash['participant_sid'] = 'participant_sid'
|
|
118
|
+
@_hash['user_sid'] = 'user_sid'
|
|
119
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
120
|
+
@_hash['conversation_state'] = 'conversation_state'
|
|
121
|
+
@_hash['timers'] = 'timers'
|
|
122
|
+
@_hash['attributes'] = 'attributes'
|
|
123
|
+
@_hash['date_created'] = 'date_created'
|
|
124
|
+
@_hash['date_updated'] = 'date_updated'
|
|
125
|
+
@_hash['created_by'] = 'created_by'
|
|
126
|
+
@_hash['notification_level'] = 'notification_level'
|
|
127
|
+
@_hash['unique_name'] = 'unique_name'
|
|
128
|
+
@_hash['url'] = 'url'
|
|
129
|
+
@_hash['links'] = 'links'
|
|
130
|
+
@_hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# An array for optional fields
|
|
134
|
+
def self.optionals
|
|
135
|
+
%w[
|
|
136
|
+
account_sid
|
|
137
|
+
chat_service_sid
|
|
138
|
+
conversation_sid
|
|
139
|
+
unread_messages_count
|
|
140
|
+
last_read_message_index
|
|
141
|
+
participant_sid
|
|
142
|
+
user_sid
|
|
143
|
+
friendly_name
|
|
144
|
+
conversation_state
|
|
145
|
+
timers
|
|
146
|
+
attributes
|
|
147
|
+
date_created
|
|
148
|
+
date_updated
|
|
149
|
+
created_by
|
|
150
|
+
notification_level
|
|
151
|
+
unique_name
|
|
152
|
+
url
|
|
153
|
+
links
|
|
154
|
+
]
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# An array for nullable fields
|
|
158
|
+
def self.nullables
|
|
159
|
+
%w[
|
|
160
|
+
account_sid
|
|
161
|
+
chat_service_sid
|
|
162
|
+
conversation_sid
|
|
163
|
+
unread_messages_count
|
|
164
|
+
last_read_message_index
|
|
165
|
+
participant_sid
|
|
166
|
+
user_sid
|
|
167
|
+
friendly_name
|
|
168
|
+
timers
|
|
169
|
+
attributes
|
|
170
|
+
date_created
|
|
171
|
+
date_updated
|
|
172
|
+
created_by
|
|
173
|
+
unique_name
|
|
174
|
+
url
|
|
175
|
+
links
|
|
176
|
+
]
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def initialize(account_sid: SKIP, chat_service_sid: SKIP,
|
|
180
|
+
conversation_sid: SKIP, unread_messages_count: SKIP,
|
|
181
|
+
last_read_message_index: SKIP, participant_sid: SKIP,
|
|
182
|
+
user_sid: SKIP, friendly_name: SKIP,
|
|
183
|
+
conversation_state: SKIP, timers: SKIP, attributes: SKIP,
|
|
184
|
+
date_created: SKIP, date_updated: SKIP, created_by: SKIP,
|
|
185
|
+
notification_level: SKIP, unique_name: SKIP, url: SKIP,
|
|
186
|
+
links: SKIP, additional_properties: nil)
|
|
187
|
+
# Add additional model properties to the instance
|
|
188
|
+
additional_properties = {} if additional_properties.nil?
|
|
189
|
+
|
|
190
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
191
|
+
@chat_service_sid = chat_service_sid unless chat_service_sid == SKIP
|
|
192
|
+
@conversation_sid = conversation_sid unless conversation_sid == SKIP
|
|
193
|
+
@unread_messages_count = unread_messages_count unless unread_messages_count == SKIP
|
|
194
|
+
@last_read_message_index = last_read_message_index unless last_read_message_index == SKIP
|
|
195
|
+
@participant_sid = participant_sid unless participant_sid == SKIP
|
|
196
|
+
@user_sid = user_sid unless user_sid == SKIP
|
|
197
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
198
|
+
@conversation_state = conversation_state unless conversation_state == SKIP
|
|
199
|
+
@timers = timers unless timers == SKIP
|
|
200
|
+
@attributes = attributes unless attributes == SKIP
|
|
201
|
+
@date_created = date_created unless date_created == SKIP
|
|
202
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
203
|
+
@created_by = created_by unless created_by == SKIP
|
|
204
|
+
@notification_level = notification_level unless notification_level == SKIP
|
|
205
|
+
@unique_name = unique_name unless unique_name == SKIP
|
|
206
|
+
@url = url unless url == SKIP
|
|
207
|
+
@links = links unless links == SKIP
|
|
208
|
+
@additional_properties = additional_properties
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Creates an instance of the object from a hash.
|
|
212
|
+
def self.from_hash(hash)
|
|
213
|
+
return nil unless hash
|
|
214
|
+
|
|
215
|
+
# Extract variables from the hash.
|
|
216
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
217
|
+
chat_service_sid =
|
|
218
|
+
hash.key?('chat_service_sid') ? hash['chat_service_sid'] : SKIP
|
|
219
|
+
conversation_sid =
|
|
220
|
+
hash.key?('conversation_sid') ? hash['conversation_sid'] : SKIP
|
|
221
|
+
unread_messages_count =
|
|
222
|
+
hash.key?('unread_messages_count') ? hash['unread_messages_count'] : SKIP
|
|
223
|
+
last_read_message_index =
|
|
224
|
+
hash.key?('last_read_message_index') ? hash['last_read_message_index'] : SKIP
|
|
225
|
+
participant_sid =
|
|
226
|
+
hash.key?('participant_sid') ? hash['participant_sid'] : SKIP
|
|
227
|
+
user_sid = hash.key?('user_sid') ? hash['user_sid'] : SKIP
|
|
228
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
229
|
+
conversation_state =
|
|
230
|
+
hash.key?('conversation_state') ? hash['conversation_state'] : SKIP
|
|
231
|
+
timers = hash.key?('timers') ? hash['timers'] : SKIP
|
|
232
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
233
|
+
date_created = if hash.key?('date_created')
|
|
234
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
235
|
+
else
|
|
236
|
+
SKIP
|
|
237
|
+
end
|
|
238
|
+
date_updated = if hash.key?('date_updated')
|
|
239
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
240
|
+
else
|
|
241
|
+
SKIP
|
|
242
|
+
end
|
|
243
|
+
created_by = hash.key?('created_by') ? hash['created_by'] : SKIP
|
|
244
|
+
notification_level =
|
|
245
|
+
hash.key?('notification_level') ? hash['notification_level'] : SKIP
|
|
246
|
+
unique_name = hash.key?('unique_name') ? hash['unique_name'] : SKIP
|
|
247
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
248
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
249
|
+
|
|
250
|
+
# Create a new hash for additional properties, removing known properties.
|
|
251
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
252
|
+
|
|
253
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
254
|
+
new_hash, proc { |value| value }
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
# Create object from extracted values.
|
|
258
|
+
ServiceUserConversation.new(account_sid: account_sid,
|
|
259
|
+
chat_service_sid: chat_service_sid,
|
|
260
|
+
conversation_sid: conversation_sid,
|
|
261
|
+
unread_messages_count: unread_messages_count,
|
|
262
|
+
last_read_message_index: last_read_message_index,
|
|
263
|
+
participant_sid: participant_sid,
|
|
264
|
+
user_sid: user_sid,
|
|
265
|
+
friendly_name: friendly_name,
|
|
266
|
+
conversation_state: conversation_state,
|
|
267
|
+
timers: timers,
|
|
268
|
+
attributes: attributes,
|
|
269
|
+
date_created: date_created,
|
|
270
|
+
date_updated: date_updated,
|
|
271
|
+
created_by: created_by,
|
|
272
|
+
notification_level: notification_level,
|
|
273
|
+
unique_name: unique_name,
|
|
274
|
+
url: url,
|
|
275
|
+
links: links,
|
|
276
|
+
additional_properties: additional_properties)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
def to_custom_date_created
|
|
280
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
def to_custom_date_updated
|
|
284
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Provides a human-readable string representation of the object.
|
|
288
|
+
def to_s
|
|
289
|
+
class_name = self.class.name.split('::').last
|
|
290
|
+
"<#{class_name} account_sid: #{@account_sid}, chat_service_sid: #{@chat_service_sid},"\
|
|
291
|
+
" conversation_sid: #{@conversation_sid}, unread_messages_count: #{@unread_messages_count},"\
|
|
292
|
+
" last_read_message_index: #{@last_read_message_index}, participant_sid:"\
|
|
293
|
+
" #{@participant_sid}, user_sid: #{@user_sid}, friendly_name: #{@friendly_name},"\
|
|
294
|
+
" conversation_state: #{@conversation_state}, timers: #{@timers}, attributes:"\
|
|
295
|
+
" #{@attributes}, date_created: #{@date_created}, date_updated: #{@date_updated},"\
|
|
296
|
+
" created_by: #{@created_by}, notification_level: #{@notification_level}, unique_name:"\
|
|
297
|
+
" #{@unique_name}, url: #{@url}, links: #{@links}, additional_properties:"\
|
|
298
|
+
" #{@additional_properties}>"
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
302
|
+
def inspect
|
|
303
|
+
class_name = self.class.name.split('::').last
|
|
304
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, chat_service_sid:"\
|
|
305
|
+
" #{@chat_service_sid.inspect}, conversation_sid: #{@conversation_sid.inspect},"\
|
|
306
|
+
" unread_messages_count: #{@unread_messages_count.inspect}, last_read_message_index:"\
|
|
307
|
+
" #{@last_read_message_index.inspect}, participant_sid: #{@participant_sid.inspect},"\
|
|
308
|
+
" user_sid: #{@user_sid.inspect}, friendly_name: #{@friendly_name.inspect},"\
|
|
309
|
+
" conversation_state: #{@conversation_state.inspect}, timers: #{@timers.inspect},"\
|
|
310
|
+
" attributes: #{@attributes.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
311
|
+
" #{@date_updated.inspect}, created_by: #{@created_by.inspect}, notification_level:"\
|
|
312
|
+
" #{@notification_level.inspect}, unique_name: #{@unique_name.inspect}, url:"\
|
|
313
|
+
" #{@url.inspect}, links: #{@links.inspect}, additional_properties:"\
|
|
314
|
+
" #{@additional_properties}>"
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
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 Notification Level of this User Conversation. One of `default` or
|
|
8
|
+
# `muted`.
|
|
9
|
+
class ServiceUserConversationNotificationLevel
|
|
10
|
+
SERVICE_USER_CONVERSATION_NOTIFICATION_LEVEL = [
|
|
11
|
+
# TODO: Write general description for DEFAULT
|
|
12
|
+
DEFAULT = 'default'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for MUTED
|
|
15
|
+
MUTED = 'muted'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
SERVICE_USER_CONVERSATION_NOTIFICATION_LEVEL.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = DEFAULT)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'default' then DEFAULT
|
|
31
|
+
when 'muted' then MUTED
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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 current state of this User Conversation. One of `inactive`, `active` or
|
|
8
|
+
# `closed`.
|
|
9
|
+
class ServiceUserConversationState
|
|
10
|
+
SERVICE_USER_CONVERSATION_STATE = [
|
|
11
|
+
# TODO: Write general description for INACTIVE
|
|
12
|
+
INACTIVE = 'inactive'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for ACTIVE
|
|
15
|
+
ACTIVE = 'active'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for CLOSED
|
|
18
|
+
CLOSED = 'closed'.freeze
|
|
19
|
+
].freeze
|
|
20
|
+
|
|
21
|
+
def self.validate(value)
|
|
22
|
+
return false if value.nil?
|
|
23
|
+
|
|
24
|
+
SERVICE_USER_CONVERSATION_STATE.include?(value)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_value(value, default_value = INACTIVE)
|
|
28
|
+
return default_value if value.nil?
|
|
29
|
+
|
|
30
|
+
str = value.to_s.strip
|
|
31
|
+
|
|
32
|
+
case str.downcase
|
|
33
|
+
when 'inactive' then INACTIVE
|
|
34
|
+
when 'active' then ACTIVE
|
|
35
|
+
when 'closed' then CLOSED
|
|
36
|
+
else
|
|
37
|
+
default_value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|