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,268 @@
|
|
|
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
|
+
# ConversationMessage Model.
|
|
9
|
+
class ConversationMessage < 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 message.
|
|
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 message.
|
|
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
|
+
# The index of the message within the
|
|
30
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
31
|
+
# resource). Indices may skip numbers, but will always be in order of when
|
|
32
|
+
# the message was received.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :index
|
|
35
|
+
|
|
36
|
+
# The channel specific identifier of the message's author. Defaults to
|
|
37
|
+
# `system`.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :author
|
|
40
|
+
|
|
41
|
+
# The content of the message, can be up to 1,600 characters long.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :body
|
|
44
|
+
|
|
45
|
+
# An array of objects that describe the Message's media, if the message
|
|
46
|
+
# contains media. Each object contains these fields: `content_type` with the
|
|
47
|
+
# MIME type of the media, `filename` with the name of the media, `sid` with
|
|
48
|
+
# the SID of the Media resource, and `size` with the media object's file
|
|
49
|
+
# size in bytes. If the Message has no media, this value is `null`.
|
|
50
|
+
# @return [Array[Object]]
|
|
51
|
+
attr_accessor :media
|
|
52
|
+
|
|
53
|
+
# A string metadata field you can use to store any data you wish. The string
|
|
54
|
+
# value must contain structurally valid JSON if specified. **Note** that if
|
|
55
|
+
# the attributes are not set "{}" will be returned.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :attributes
|
|
58
|
+
|
|
59
|
+
# The unique ID of messages's author participant. Null in case of `system`
|
|
60
|
+
# sent message.
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_accessor :participant_sid
|
|
63
|
+
|
|
64
|
+
# The date that this resource was created.
|
|
65
|
+
# @return [DateTime]
|
|
66
|
+
attr_accessor :date_created
|
|
67
|
+
|
|
68
|
+
# The date that this resource was last updated. `null` if the message has
|
|
69
|
+
# not been edited.
|
|
70
|
+
# @return [DateTime]
|
|
71
|
+
attr_accessor :date_updated
|
|
72
|
+
|
|
73
|
+
# An absolute API resource API URL for this message.
|
|
74
|
+
# @return [String]
|
|
75
|
+
attr_accessor :url
|
|
76
|
+
|
|
77
|
+
# An object that contains the summary of delivery statuses for the message
|
|
78
|
+
# to non-chat participants.
|
|
79
|
+
# @return [Object]
|
|
80
|
+
attr_accessor :delivery
|
|
81
|
+
|
|
82
|
+
# Contains an absolute API resource URL to access the delivery & read
|
|
83
|
+
# receipts of this message.
|
|
84
|
+
# @return [Object]
|
|
85
|
+
attr_accessor :links
|
|
86
|
+
|
|
87
|
+
# The unique ID of the multi-channel [Rich
|
|
88
|
+
# Content](https://www.twilio.com/docs/content) template.
|
|
89
|
+
# @return [String]
|
|
90
|
+
attr_accessor :content_sid
|
|
91
|
+
|
|
92
|
+
# A mapping from model property names to API property names.
|
|
93
|
+
def self.names
|
|
94
|
+
@_hash = {} if @_hash.nil?
|
|
95
|
+
@_hash['account_sid'] = 'account_sid'
|
|
96
|
+
@_hash['conversation_sid'] = 'conversation_sid'
|
|
97
|
+
@_hash['sid'] = 'sid'
|
|
98
|
+
@_hash['index'] = 'index'
|
|
99
|
+
@_hash['author'] = 'author'
|
|
100
|
+
@_hash['body'] = 'body'
|
|
101
|
+
@_hash['media'] = 'media'
|
|
102
|
+
@_hash['attributes'] = 'attributes'
|
|
103
|
+
@_hash['participant_sid'] = 'participant_sid'
|
|
104
|
+
@_hash['date_created'] = 'date_created'
|
|
105
|
+
@_hash['date_updated'] = 'date_updated'
|
|
106
|
+
@_hash['url'] = 'url'
|
|
107
|
+
@_hash['delivery'] = 'delivery'
|
|
108
|
+
@_hash['links'] = 'links'
|
|
109
|
+
@_hash['content_sid'] = 'content_sid'
|
|
110
|
+
@_hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# An array for optional fields
|
|
114
|
+
def self.optionals
|
|
115
|
+
%w[
|
|
116
|
+
account_sid
|
|
117
|
+
conversation_sid
|
|
118
|
+
sid
|
|
119
|
+
index
|
|
120
|
+
author
|
|
121
|
+
body
|
|
122
|
+
media
|
|
123
|
+
attributes
|
|
124
|
+
participant_sid
|
|
125
|
+
date_created
|
|
126
|
+
date_updated
|
|
127
|
+
url
|
|
128
|
+
delivery
|
|
129
|
+
links
|
|
130
|
+
content_sid
|
|
131
|
+
]
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# An array for nullable fields
|
|
135
|
+
def self.nullables
|
|
136
|
+
%w[
|
|
137
|
+
account_sid
|
|
138
|
+
conversation_sid
|
|
139
|
+
sid
|
|
140
|
+
author
|
|
141
|
+
body
|
|
142
|
+
media
|
|
143
|
+
attributes
|
|
144
|
+
participant_sid
|
|
145
|
+
date_created
|
|
146
|
+
date_updated
|
|
147
|
+
url
|
|
148
|
+
delivery
|
|
149
|
+
links
|
|
150
|
+
content_sid
|
|
151
|
+
]
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def initialize(account_sid: SKIP, conversation_sid: SKIP, sid: SKIP,
|
|
155
|
+
index: 0, author: SKIP, body: SKIP, media: SKIP,
|
|
156
|
+
attributes: SKIP, participant_sid: SKIP, date_created: SKIP,
|
|
157
|
+
date_updated: SKIP, url: SKIP, delivery: SKIP, links: SKIP,
|
|
158
|
+
content_sid: SKIP, additional_properties: nil)
|
|
159
|
+
# Add additional model properties to the instance
|
|
160
|
+
additional_properties = {} if additional_properties.nil?
|
|
161
|
+
|
|
162
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
163
|
+
@conversation_sid = conversation_sid unless conversation_sid == SKIP
|
|
164
|
+
@sid = sid unless sid == SKIP
|
|
165
|
+
@index = index unless index == SKIP
|
|
166
|
+
@author = author unless author == SKIP
|
|
167
|
+
@body = body unless body == SKIP
|
|
168
|
+
@media = media unless media == SKIP
|
|
169
|
+
@attributes = attributes unless attributes == SKIP
|
|
170
|
+
@participant_sid = participant_sid unless participant_sid == SKIP
|
|
171
|
+
@date_created = date_created unless date_created == SKIP
|
|
172
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
173
|
+
@url = url unless url == SKIP
|
|
174
|
+
@delivery = delivery unless delivery == SKIP
|
|
175
|
+
@links = links unless links == SKIP
|
|
176
|
+
@content_sid = content_sid unless content_sid == SKIP
|
|
177
|
+
@additional_properties = additional_properties
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Creates an instance of the object from a hash.
|
|
181
|
+
def self.from_hash(hash)
|
|
182
|
+
return nil unless hash
|
|
183
|
+
|
|
184
|
+
# Extract variables from the hash.
|
|
185
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
186
|
+
conversation_sid =
|
|
187
|
+
hash.key?('conversation_sid') ? hash['conversation_sid'] : SKIP
|
|
188
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
189
|
+
index = hash['index'] ||= 0
|
|
190
|
+
author = hash.key?('author') ? hash['author'] : SKIP
|
|
191
|
+
body = hash.key?('body') ? hash['body'] : SKIP
|
|
192
|
+
media = hash.key?('media') ? hash['media'] : SKIP
|
|
193
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
194
|
+
participant_sid =
|
|
195
|
+
hash.key?('participant_sid') ? hash['participant_sid'] : SKIP
|
|
196
|
+
date_created = if hash.key?('date_created')
|
|
197
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
198
|
+
else
|
|
199
|
+
SKIP
|
|
200
|
+
end
|
|
201
|
+
date_updated = if hash.key?('date_updated')
|
|
202
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
203
|
+
else
|
|
204
|
+
SKIP
|
|
205
|
+
end
|
|
206
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
207
|
+
delivery = hash.key?('delivery') ? hash['delivery'] : SKIP
|
|
208
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
209
|
+
content_sid = hash.key?('content_sid') ? hash['content_sid'] : SKIP
|
|
210
|
+
|
|
211
|
+
# Create a new hash for additional properties, removing known properties.
|
|
212
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
213
|
+
|
|
214
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
215
|
+
new_hash, proc { |value| value }
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
# Create object from extracted values.
|
|
219
|
+
ConversationMessage.new(account_sid: account_sid,
|
|
220
|
+
conversation_sid: conversation_sid,
|
|
221
|
+
sid: sid,
|
|
222
|
+
index: index,
|
|
223
|
+
author: author,
|
|
224
|
+
body: body,
|
|
225
|
+
media: media,
|
|
226
|
+
attributes: attributes,
|
|
227
|
+
participant_sid: participant_sid,
|
|
228
|
+
date_created: date_created,
|
|
229
|
+
date_updated: date_updated,
|
|
230
|
+
url: url,
|
|
231
|
+
delivery: delivery,
|
|
232
|
+
links: links,
|
|
233
|
+
content_sid: content_sid,
|
|
234
|
+
additional_properties: additional_properties)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def to_custom_date_created
|
|
238
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
def to_custom_date_updated
|
|
242
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Provides a human-readable string representation of the object.
|
|
246
|
+
def to_s
|
|
247
|
+
class_name = self.class.name.split('::').last
|
|
248
|
+
"<#{class_name} account_sid: #{@account_sid}, conversation_sid: #{@conversation_sid}, sid:"\
|
|
249
|
+
" #{@sid}, index: #{@index}, author: #{@author}, body: #{@body}, media: #{@media},"\
|
|
250
|
+
" attributes: #{@attributes}, participant_sid: #{@participant_sid}, date_created:"\
|
|
251
|
+
" #{@date_created}, date_updated: #{@date_updated}, url: #{@url}, delivery: #{@delivery},"\
|
|
252
|
+
" links: #{@links}, content_sid: #{@content_sid}, additional_properties:"\
|
|
253
|
+
" #{@additional_properties}>"
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
257
|
+
def inspect
|
|
258
|
+
class_name = self.class.name.split('::').last
|
|
259
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, conversation_sid:"\
|
|
260
|
+
" #{@conversation_sid.inspect}, sid: #{@sid.inspect}, index: #{@index.inspect}, author:"\
|
|
261
|
+
" #{@author.inspect}, body: #{@body.inspect}, media: #{@media.inspect}, attributes:"\
|
|
262
|
+
" #{@attributes.inspect}, participant_sid: #{@participant_sid.inspect}, date_created:"\
|
|
263
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, url: #{@url.inspect},"\
|
|
264
|
+
" delivery: #{@delivery.inspect}, links: #{@links.inspect}, content_sid:"\
|
|
265
|
+
" #{@content_sid.inspect}, additional_properties: #{@additional_properties}>"
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
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
|
+
# ConversationMessageOrderType.
|
|
8
|
+
class ConversationMessageOrderType
|
|
9
|
+
CONVERSATION_MESSAGE_ORDER_TYPE = [
|
|
10
|
+
# TODO: Write general description for ASC
|
|
11
|
+
ASC = 'asc'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for DESC
|
|
14
|
+
DESC = 'desc'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
CONVERSATION_MESSAGE_ORDER_TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ASC)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'asc' then ASC
|
|
30
|
+
when 'desc' then DESC
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module TwilioApIs
|
|
8
|
+
# ConversationMessageReceipt Model.
|
|
9
|
+
class ConversationMessageReceipt < 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 message.
|
|
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
|
+
# The SID of the message within a
|
|
30
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
31
|
+
# resource) the delivery receipt belongs to
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :message_sid
|
|
34
|
+
|
|
35
|
+
# A messaging channel-specific identifier for the message delivered to
|
|
36
|
+
# participant e.g. `SMxx` for SMS, `WAxx` for Whatsapp etc.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :channel_message_sid
|
|
39
|
+
|
|
40
|
+
# The unique ID of the participant the delivery receipt belongs to.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :participant_sid
|
|
43
|
+
|
|
44
|
+
# The message delivery status, can be `read`, `failed`, `delivered`,
|
|
45
|
+
# `undelivered`, `sent` or null.
|
|
46
|
+
# @return [ConversationMessageReceiptDeliveryStatus]
|
|
47
|
+
attr_accessor :status
|
|
48
|
+
|
|
49
|
+
# The message [delivery error
|
|
50
|
+
# code](https://www.twilio.com/docs/sms/api/message-resource#delivery-relate
|
|
51
|
+
# d-errors) for a `failed` status,
|
|
52
|
+
# @return [Integer]
|
|
53
|
+
attr_accessor :error_code
|
|
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. `null` if the delivery
|
|
60
|
+
# receipt has not been updated.
|
|
61
|
+
# @return [DateTime]
|
|
62
|
+
attr_accessor :date_updated
|
|
63
|
+
|
|
64
|
+
# An absolute API resource URL for this delivery receipt.
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :url
|
|
67
|
+
|
|
68
|
+
# A mapping from model property names to API property names.
|
|
69
|
+
def self.names
|
|
70
|
+
@_hash = {} if @_hash.nil?
|
|
71
|
+
@_hash['account_sid'] = 'account_sid'
|
|
72
|
+
@_hash['conversation_sid'] = 'conversation_sid'
|
|
73
|
+
@_hash['sid'] = 'sid'
|
|
74
|
+
@_hash['message_sid'] = 'message_sid'
|
|
75
|
+
@_hash['channel_message_sid'] = 'channel_message_sid'
|
|
76
|
+
@_hash['participant_sid'] = 'participant_sid'
|
|
77
|
+
@_hash['status'] = 'status'
|
|
78
|
+
@_hash['error_code'] = 'error_code'
|
|
79
|
+
@_hash['date_created'] = 'date_created'
|
|
80
|
+
@_hash['date_updated'] = 'date_updated'
|
|
81
|
+
@_hash['url'] = 'url'
|
|
82
|
+
@_hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# An array for optional fields
|
|
86
|
+
def self.optionals
|
|
87
|
+
%w[
|
|
88
|
+
account_sid
|
|
89
|
+
conversation_sid
|
|
90
|
+
sid
|
|
91
|
+
message_sid
|
|
92
|
+
channel_message_sid
|
|
93
|
+
participant_sid
|
|
94
|
+
status
|
|
95
|
+
error_code
|
|
96
|
+
date_created
|
|
97
|
+
date_updated
|
|
98
|
+
url
|
|
99
|
+
]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# An array for nullable fields
|
|
103
|
+
def self.nullables
|
|
104
|
+
%w[
|
|
105
|
+
account_sid
|
|
106
|
+
conversation_sid
|
|
107
|
+
sid
|
|
108
|
+
message_sid
|
|
109
|
+
channel_message_sid
|
|
110
|
+
participant_sid
|
|
111
|
+
date_created
|
|
112
|
+
date_updated
|
|
113
|
+
url
|
|
114
|
+
]
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def initialize(account_sid: SKIP, conversation_sid: SKIP, sid: SKIP,
|
|
118
|
+
message_sid: SKIP, channel_message_sid: SKIP,
|
|
119
|
+
participant_sid: SKIP, status: SKIP, error_code: 0,
|
|
120
|
+
date_created: SKIP, date_updated: SKIP, url: SKIP,
|
|
121
|
+
additional_properties: nil)
|
|
122
|
+
# Add additional model properties to the instance
|
|
123
|
+
additional_properties = {} if additional_properties.nil?
|
|
124
|
+
|
|
125
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
126
|
+
@conversation_sid = conversation_sid unless conversation_sid == SKIP
|
|
127
|
+
@sid = sid unless sid == SKIP
|
|
128
|
+
@message_sid = message_sid unless message_sid == SKIP
|
|
129
|
+
@channel_message_sid = channel_message_sid unless channel_message_sid == SKIP
|
|
130
|
+
@participant_sid = participant_sid unless participant_sid == SKIP
|
|
131
|
+
@status = status unless status == SKIP
|
|
132
|
+
@error_code = error_code unless error_code == SKIP
|
|
133
|
+
@date_created = date_created unless date_created == SKIP
|
|
134
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
135
|
+
@url = url unless url == SKIP
|
|
136
|
+
@additional_properties = additional_properties
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Creates an instance of the object from a hash.
|
|
140
|
+
def self.from_hash(hash)
|
|
141
|
+
return nil unless hash
|
|
142
|
+
|
|
143
|
+
# Extract variables from the hash.
|
|
144
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
145
|
+
conversation_sid =
|
|
146
|
+
hash.key?('conversation_sid') ? hash['conversation_sid'] : SKIP
|
|
147
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
148
|
+
message_sid = hash.key?('message_sid') ? hash['message_sid'] : SKIP
|
|
149
|
+
channel_message_sid =
|
|
150
|
+
hash.key?('channel_message_sid') ? hash['channel_message_sid'] : SKIP
|
|
151
|
+
participant_sid =
|
|
152
|
+
hash.key?('participant_sid') ? hash['participant_sid'] : SKIP
|
|
153
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
154
|
+
error_code = hash['error_code'] ||= 0
|
|
155
|
+
date_created = if hash.key?('date_created')
|
|
156
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
157
|
+
else
|
|
158
|
+
SKIP
|
|
159
|
+
end
|
|
160
|
+
date_updated = if hash.key?('date_updated')
|
|
161
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
162
|
+
else
|
|
163
|
+
SKIP
|
|
164
|
+
end
|
|
165
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
166
|
+
|
|
167
|
+
# Create a new hash for additional properties, removing known properties.
|
|
168
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
169
|
+
|
|
170
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
171
|
+
new_hash, proc { |value| value }
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
# Create object from extracted values.
|
|
175
|
+
ConversationMessageReceipt.new(account_sid: account_sid,
|
|
176
|
+
conversation_sid: conversation_sid,
|
|
177
|
+
sid: sid,
|
|
178
|
+
message_sid: message_sid,
|
|
179
|
+
channel_message_sid: channel_message_sid,
|
|
180
|
+
participant_sid: participant_sid,
|
|
181
|
+
status: status,
|
|
182
|
+
error_code: error_code,
|
|
183
|
+
date_created: date_created,
|
|
184
|
+
date_updated: date_updated,
|
|
185
|
+
url: url,
|
|
186
|
+
additional_properties: additional_properties)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
def to_custom_date_created
|
|
190
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
def to_custom_date_updated
|
|
194
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Provides a human-readable string representation of the object.
|
|
198
|
+
def to_s
|
|
199
|
+
class_name = self.class.name.split('::').last
|
|
200
|
+
"<#{class_name} account_sid: #{@account_sid}, conversation_sid: #{@conversation_sid}, sid:"\
|
|
201
|
+
" #{@sid}, message_sid: #{@message_sid}, channel_message_sid: #{@channel_message_sid},"\
|
|
202
|
+
" participant_sid: #{@participant_sid}, status: #{@status}, error_code: #{@error_code},"\
|
|
203
|
+
" date_created: #{@date_created}, date_updated: #{@date_updated}, url: #{@url},"\
|
|
204
|
+
" additional_properties: #{@additional_properties}>"
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
208
|
+
def inspect
|
|
209
|
+
class_name = self.class.name.split('::').last
|
|
210
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, conversation_sid:"\
|
|
211
|
+
" #{@conversation_sid.inspect}, sid: #{@sid.inspect}, message_sid: #{@message_sid.inspect},"\
|
|
212
|
+
" channel_message_sid: #{@channel_message_sid.inspect}, participant_sid:"\
|
|
213
|
+
" #{@participant_sid.inspect}, status: #{@status.inspect}, error_code:"\
|
|
214
|
+
" #{@error_code.inspect}, date_created: #{@date_created.inspect}, date_updated:"\
|
|
215
|
+
" #{@date_updated.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
216
|
+
" #{@additional_properties}>"
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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 message delivery status, can be `read`, `failed`, `delivered`,
|
|
8
|
+
# `undelivered`, `sent` or null.
|
|
9
|
+
class ConversationMessageReceiptDeliveryStatus
|
|
10
|
+
CONVERSATION_MESSAGE_RECEIPT_DELIVERY_STATUS = [
|
|
11
|
+
# TODO: Write general description for READ
|
|
12
|
+
READ = 'read'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for FAILED
|
|
15
|
+
FAILED = 'failed'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for DELIVERED
|
|
18
|
+
DELIVERED = 'delivered'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for UNDELIVERED
|
|
21
|
+
UNDELIVERED = 'undelivered'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for SENT
|
|
24
|
+
SENT = 'sent'.freeze
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
def self.validate(value)
|
|
28
|
+
return false if value.nil?
|
|
29
|
+
|
|
30
|
+
CONVERSATION_MESSAGE_RECEIPT_DELIVERY_STATUS.include?(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.from_value(value, default_value = READ)
|
|
34
|
+
return default_value if value.nil?
|
|
35
|
+
|
|
36
|
+
str = value.to_s.strip
|
|
37
|
+
|
|
38
|
+
case str.downcase
|
|
39
|
+
when 'read' then READ
|
|
40
|
+
when 'failed' then FAILED
|
|
41
|
+
when 'delivered' then DELIVERED
|
|
42
|
+
when 'undelivered' then UNDELIVERED
|
|
43
|
+
when 'sent' then SENT
|
|
44
|
+
else
|
|
45
|
+
default_value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|