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