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,264 @@
|
|
|
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
|
+
# ConversationWithParticipants Model.
|
|
9
|
+
class ConversationWithParticipants < 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 [Messaging
|
|
26
|
+
# Service](https://www.twilio.com/docs/messaging/api/service-resource) this
|
|
27
|
+
# conversation belongs to.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :messaging_service_sid
|
|
30
|
+
|
|
31
|
+
# A 34 character string that uniquely identifies this resource.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :sid
|
|
34
|
+
|
|
35
|
+
# The human-readable name of this conversation, limited to 256 characters.
|
|
36
|
+
# Optional.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :friendly_name
|
|
39
|
+
|
|
40
|
+
# An application-defined string that uniquely identifies the resource. It
|
|
41
|
+
# can be used to address the resource in place of the resource's `sid` in
|
|
42
|
+
# the URL.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :unique_name
|
|
45
|
+
|
|
46
|
+
# An optional string metadata field you can use to store any data you wish.
|
|
47
|
+
# The string value must contain structurally valid JSON if specified.
|
|
48
|
+
# **Note** that if the attributes are not set "{}" will be returned.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :attributes
|
|
51
|
+
|
|
52
|
+
# Current state of this conversation. Can be either `initializing`,
|
|
53
|
+
# `active`, `inactive` or `closed` and defaults to `active`
|
|
54
|
+
# @return [ConversationWithParticipantsState]
|
|
55
|
+
attr_accessor :state
|
|
56
|
+
|
|
57
|
+
# The date that this resource was created.
|
|
58
|
+
# @return [DateTime]
|
|
59
|
+
attr_accessor :date_created
|
|
60
|
+
|
|
61
|
+
# The date that this resource was last updated.
|
|
62
|
+
# @return [DateTime]
|
|
63
|
+
attr_accessor :date_updated
|
|
64
|
+
|
|
65
|
+
# Timer date values representing state update for this conversation.
|
|
66
|
+
# @return [Object]
|
|
67
|
+
attr_accessor :timers
|
|
68
|
+
|
|
69
|
+
# Contains absolute URLs to access the
|
|
70
|
+
# [participants](https://www.twilio.com/docs/conversations/api/conversation-
|
|
71
|
+
# participant-resource),
|
|
72
|
+
# [messages](https://www.twilio.com/docs/conversations/api/conversation-mess
|
|
73
|
+
# age-resource) and
|
|
74
|
+
# [webhooks](https://www.twilio.com/docs/conversations/api/conversation-scop
|
|
75
|
+
# ed-webhook-resource) of this conversation.
|
|
76
|
+
# @return [Object]
|
|
77
|
+
attr_accessor :links
|
|
78
|
+
|
|
79
|
+
# Contains absolute URLs to access the
|
|
80
|
+
# [participants](https://www.twilio.com/docs/conversations/api/conversation-
|
|
81
|
+
# participant-resource),
|
|
82
|
+
# [messages](https://www.twilio.com/docs/conversations/api/conversation-mess
|
|
83
|
+
# age-resource) and
|
|
84
|
+
# [webhooks](https://www.twilio.com/docs/conversations/api/conversation-scop
|
|
85
|
+
# ed-webhook-resource) of this conversation.
|
|
86
|
+
# @return [Object]
|
|
87
|
+
attr_accessor :bindings
|
|
88
|
+
|
|
89
|
+
# An absolute API resource URL for this conversation.
|
|
90
|
+
# @return [String]
|
|
91
|
+
attr_accessor :url
|
|
92
|
+
|
|
93
|
+
# A mapping from model property names to API property names.
|
|
94
|
+
def self.names
|
|
95
|
+
@_hash = {} if @_hash.nil?
|
|
96
|
+
@_hash['account_sid'] = 'account_sid'
|
|
97
|
+
@_hash['chat_service_sid'] = 'chat_service_sid'
|
|
98
|
+
@_hash['messaging_service_sid'] = 'messaging_service_sid'
|
|
99
|
+
@_hash['sid'] = 'sid'
|
|
100
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
101
|
+
@_hash['unique_name'] = 'unique_name'
|
|
102
|
+
@_hash['attributes'] = 'attributes'
|
|
103
|
+
@_hash['state'] = 'state'
|
|
104
|
+
@_hash['date_created'] = 'date_created'
|
|
105
|
+
@_hash['date_updated'] = 'date_updated'
|
|
106
|
+
@_hash['timers'] = 'timers'
|
|
107
|
+
@_hash['links'] = 'links'
|
|
108
|
+
@_hash['bindings'] = 'bindings'
|
|
109
|
+
@_hash['url'] = 'url'
|
|
110
|
+
@_hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# An array for optional fields
|
|
114
|
+
def self.optionals
|
|
115
|
+
%w[
|
|
116
|
+
account_sid
|
|
117
|
+
chat_service_sid
|
|
118
|
+
messaging_service_sid
|
|
119
|
+
sid
|
|
120
|
+
friendly_name
|
|
121
|
+
unique_name
|
|
122
|
+
attributes
|
|
123
|
+
state
|
|
124
|
+
date_created
|
|
125
|
+
date_updated
|
|
126
|
+
timers
|
|
127
|
+
links
|
|
128
|
+
bindings
|
|
129
|
+
url
|
|
130
|
+
]
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# An array for nullable fields
|
|
134
|
+
def self.nullables
|
|
135
|
+
%w[
|
|
136
|
+
account_sid
|
|
137
|
+
chat_service_sid
|
|
138
|
+
messaging_service_sid
|
|
139
|
+
sid
|
|
140
|
+
friendly_name
|
|
141
|
+
unique_name
|
|
142
|
+
attributes
|
|
143
|
+
date_created
|
|
144
|
+
date_updated
|
|
145
|
+
timers
|
|
146
|
+
links
|
|
147
|
+
bindings
|
|
148
|
+
url
|
|
149
|
+
]
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def initialize(account_sid: SKIP, chat_service_sid: SKIP,
|
|
153
|
+
messaging_service_sid: SKIP, sid: SKIP, friendly_name: SKIP,
|
|
154
|
+
unique_name: SKIP, attributes: SKIP, state: SKIP,
|
|
155
|
+
date_created: SKIP, date_updated: SKIP, timers: SKIP,
|
|
156
|
+
links: SKIP, bindings: SKIP, url: SKIP,
|
|
157
|
+
additional_properties: nil)
|
|
158
|
+
# Add additional model properties to the instance
|
|
159
|
+
additional_properties = {} if additional_properties.nil?
|
|
160
|
+
|
|
161
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
162
|
+
@chat_service_sid = chat_service_sid unless chat_service_sid == SKIP
|
|
163
|
+
@messaging_service_sid = messaging_service_sid unless messaging_service_sid == SKIP
|
|
164
|
+
@sid = sid unless sid == SKIP
|
|
165
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
166
|
+
@unique_name = unique_name unless unique_name == SKIP
|
|
167
|
+
@attributes = attributes unless attributes == SKIP
|
|
168
|
+
@state = state unless state == SKIP
|
|
169
|
+
@date_created = date_created unless date_created == SKIP
|
|
170
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
171
|
+
@timers = timers unless timers == SKIP
|
|
172
|
+
@links = links unless links == SKIP
|
|
173
|
+
@bindings = bindings unless bindings == SKIP
|
|
174
|
+
@url = url unless url == SKIP
|
|
175
|
+
@additional_properties = additional_properties
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Creates an instance of the object from a hash.
|
|
179
|
+
def self.from_hash(hash)
|
|
180
|
+
return nil unless hash
|
|
181
|
+
|
|
182
|
+
# Extract variables from the hash.
|
|
183
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
184
|
+
chat_service_sid =
|
|
185
|
+
hash.key?('chat_service_sid') ? hash['chat_service_sid'] : SKIP
|
|
186
|
+
messaging_service_sid =
|
|
187
|
+
hash.key?('messaging_service_sid') ? hash['messaging_service_sid'] : SKIP
|
|
188
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
189
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
190
|
+
unique_name = hash.key?('unique_name') ? hash['unique_name'] : SKIP
|
|
191
|
+
attributes = hash.key?('attributes') ? hash['attributes'] : SKIP
|
|
192
|
+
state = hash.key?('state') ? hash['state'] : SKIP
|
|
193
|
+
date_created = if hash.key?('date_created')
|
|
194
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
195
|
+
else
|
|
196
|
+
SKIP
|
|
197
|
+
end
|
|
198
|
+
date_updated = if hash.key?('date_updated')
|
|
199
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
200
|
+
else
|
|
201
|
+
SKIP
|
|
202
|
+
end
|
|
203
|
+
timers = hash.key?('timers') ? hash['timers'] : SKIP
|
|
204
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
205
|
+
bindings = hash.key?('bindings') ? hash['bindings'] : SKIP
|
|
206
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
207
|
+
|
|
208
|
+
# Create a new hash for additional properties, removing known properties.
|
|
209
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
210
|
+
|
|
211
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
212
|
+
new_hash, proc { |value| value }
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
# Create object from extracted values.
|
|
216
|
+
ConversationWithParticipants.new(account_sid: account_sid,
|
|
217
|
+
chat_service_sid: chat_service_sid,
|
|
218
|
+
messaging_service_sid: messaging_service_sid,
|
|
219
|
+
sid: sid,
|
|
220
|
+
friendly_name: friendly_name,
|
|
221
|
+
unique_name: unique_name,
|
|
222
|
+
attributes: attributes,
|
|
223
|
+
state: state,
|
|
224
|
+
date_created: date_created,
|
|
225
|
+
date_updated: date_updated,
|
|
226
|
+
timers: timers,
|
|
227
|
+
links: links,
|
|
228
|
+
bindings: bindings,
|
|
229
|
+
url: url,
|
|
230
|
+
additional_properties: additional_properties)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def to_custom_date_created
|
|
234
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def to_custom_date_updated
|
|
238
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Provides a human-readable string representation of the object.
|
|
242
|
+
def to_s
|
|
243
|
+
class_name = self.class.name.split('::').last
|
|
244
|
+
"<#{class_name} account_sid: #{@account_sid}, chat_service_sid: #{@chat_service_sid},"\
|
|
245
|
+
" messaging_service_sid: #{@messaging_service_sid}, sid: #{@sid}, friendly_name:"\
|
|
246
|
+
" #{@friendly_name}, unique_name: #{@unique_name}, attributes: #{@attributes}, state:"\
|
|
247
|
+
" #{@state}, date_created: #{@date_created}, date_updated: #{@date_updated}, timers:"\
|
|
248
|
+
" #{@timers}, links: #{@links}, bindings: #{@bindings}, url: #{@url}, additional_properties:"\
|
|
249
|
+
" #{@additional_properties}>"
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
253
|
+
def inspect
|
|
254
|
+
class_name = self.class.name.split('::').last
|
|
255
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, chat_service_sid:"\
|
|
256
|
+
" #{@chat_service_sid.inspect}, messaging_service_sid: #{@messaging_service_sid.inspect},"\
|
|
257
|
+
" sid: #{@sid.inspect}, friendly_name: #{@friendly_name.inspect}, unique_name:"\
|
|
258
|
+
" #{@unique_name.inspect}, attributes: #{@attributes.inspect}, state: #{@state.inspect},"\
|
|
259
|
+
" date_created: #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, timers:"\
|
|
260
|
+
" #{@timers.inspect}, links: #{@links.inspect}, bindings: #{@bindings.inspect}, url:"\
|
|
261
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# Current state of this conversation. Can be either `initializing`, `active`,
|
|
8
|
+
# `inactive` or `closed` and defaults to `active`
|
|
9
|
+
class ConversationWithParticipantsState
|
|
10
|
+
CONVERSATION_WITH_PARTICIPANTS_STATE = [
|
|
11
|
+
# TODO: Write general description for INITIALIZING
|
|
12
|
+
INITIALIZING = 'initializing'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for INACTIVE
|
|
15
|
+
INACTIVE = 'inactive'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for ACTIVE
|
|
18
|
+
ACTIVE = 'active'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for CLOSED
|
|
21
|
+
CLOSED = 'closed'.freeze
|
|
22
|
+
].freeze
|
|
23
|
+
|
|
24
|
+
def self.validate(value)
|
|
25
|
+
return false if value.nil?
|
|
26
|
+
|
|
27
|
+
CONVERSATION_WITH_PARTICIPANTS_STATE.include?(value)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.from_value(value, default_value = INITIALIZING)
|
|
31
|
+
return default_value if value.nil?
|
|
32
|
+
|
|
33
|
+
str = value.to_s.strip
|
|
34
|
+
|
|
35
|
+
case str.downcase
|
|
36
|
+
when 'initializing' then INITIALIZING
|
|
37
|
+
when 'inactive' then INACTIVE
|
|
38
|
+
when 'active' then ACTIVE
|
|
39
|
+
when 'closed' then CLOSED
|
|
40
|
+
else
|
|
41
|
+
default_value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
# Credential Model.
|
|
9
|
+
class Credential < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# A 34 character string that uniquely identifies this resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The unique ID of the
|
|
18
|
+
# [Account](https://www.twilio.com/docs/iam/api/account) responsible for
|
|
19
|
+
# this credential.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :account_sid
|
|
22
|
+
|
|
23
|
+
# The human-readable name of this credential, limited to 64 characters.
|
|
24
|
+
# Optional.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :friendly_name
|
|
27
|
+
|
|
28
|
+
# The type of push-notification service the credential is for. Can be:
|
|
29
|
+
# `fcm`, `gcm`, or `apn`.
|
|
30
|
+
# @return [CredentialPushType]
|
|
31
|
+
attr_accessor :type
|
|
32
|
+
|
|
33
|
+
# [APN only] Whether to send the credential to sandbox APNs. Can be `true`
|
|
34
|
+
# to send to sandbox APNs or `false` to send to production.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :sandbox
|
|
37
|
+
|
|
38
|
+
# The date that this resource was created.
|
|
39
|
+
# @return [DateTime]
|
|
40
|
+
attr_accessor :date_created
|
|
41
|
+
|
|
42
|
+
# The date that this resource was last updated.
|
|
43
|
+
# @return [DateTime]
|
|
44
|
+
attr_accessor :date_updated
|
|
45
|
+
|
|
46
|
+
# An absolute API resource URL for this credential.
|
|
47
|
+
# @return [String]
|
|
48
|
+
attr_accessor :url
|
|
49
|
+
|
|
50
|
+
# A mapping from model property names to API property names.
|
|
51
|
+
def self.names
|
|
52
|
+
@_hash = {} if @_hash.nil?
|
|
53
|
+
@_hash['sid'] = 'sid'
|
|
54
|
+
@_hash['account_sid'] = 'account_sid'
|
|
55
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
56
|
+
@_hash['type'] = 'type'
|
|
57
|
+
@_hash['sandbox'] = 'sandbox'
|
|
58
|
+
@_hash['date_created'] = 'date_created'
|
|
59
|
+
@_hash['date_updated'] = 'date_updated'
|
|
60
|
+
@_hash['url'] = 'url'
|
|
61
|
+
@_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for optional fields
|
|
65
|
+
def self.optionals
|
|
66
|
+
%w[
|
|
67
|
+
sid
|
|
68
|
+
account_sid
|
|
69
|
+
friendly_name
|
|
70
|
+
type
|
|
71
|
+
sandbox
|
|
72
|
+
date_created
|
|
73
|
+
date_updated
|
|
74
|
+
url
|
|
75
|
+
]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# An array for nullable fields
|
|
79
|
+
def self.nullables
|
|
80
|
+
%w[
|
|
81
|
+
sid
|
|
82
|
+
account_sid
|
|
83
|
+
friendly_name
|
|
84
|
+
sandbox
|
|
85
|
+
date_created
|
|
86
|
+
date_updated
|
|
87
|
+
url
|
|
88
|
+
]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def initialize(sid: SKIP, account_sid: SKIP, friendly_name: SKIP,
|
|
92
|
+
type: SKIP, sandbox: SKIP, date_created: SKIP,
|
|
93
|
+
date_updated: SKIP, url: SKIP, additional_properties: nil)
|
|
94
|
+
# Add additional model properties to the instance
|
|
95
|
+
additional_properties = {} if additional_properties.nil?
|
|
96
|
+
|
|
97
|
+
@sid = sid unless sid == SKIP
|
|
98
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
99
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
100
|
+
@type = type unless type == SKIP
|
|
101
|
+
@sandbox = sandbox unless sandbox == SKIP
|
|
102
|
+
@date_created = date_created unless date_created == SKIP
|
|
103
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
104
|
+
@url = url unless url == SKIP
|
|
105
|
+
@additional_properties = additional_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Creates an instance of the object from a hash.
|
|
109
|
+
def self.from_hash(hash)
|
|
110
|
+
return nil unless hash
|
|
111
|
+
|
|
112
|
+
# Extract variables from the hash.
|
|
113
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
114
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
115
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
116
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
117
|
+
sandbox = hash.key?('sandbox') ? hash['sandbox'] : SKIP
|
|
118
|
+
date_created = if hash.key?('date_created')
|
|
119
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
120
|
+
else
|
|
121
|
+
SKIP
|
|
122
|
+
end
|
|
123
|
+
date_updated = if hash.key?('date_updated')
|
|
124
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
125
|
+
else
|
|
126
|
+
SKIP
|
|
127
|
+
end
|
|
128
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
129
|
+
|
|
130
|
+
# Create a new hash for additional properties, removing known properties.
|
|
131
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
132
|
+
|
|
133
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
134
|
+
new_hash, proc { |value| value }
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# Create object from extracted values.
|
|
138
|
+
Credential.new(sid: sid,
|
|
139
|
+
account_sid: account_sid,
|
|
140
|
+
friendly_name: friendly_name,
|
|
141
|
+
type: type,
|
|
142
|
+
sandbox: sandbox,
|
|
143
|
+
date_created: date_created,
|
|
144
|
+
date_updated: date_updated,
|
|
145
|
+
url: url,
|
|
146
|
+
additional_properties: additional_properties)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def to_custom_date_created
|
|
150
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def to_custom_date_updated
|
|
154
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Provides a human-readable string representation of the object.
|
|
158
|
+
def to_s
|
|
159
|
+
class_name = self.class.name.split('::').last
|
|
160
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, friendly_name:"\
|
|
161
|
+
" #{@friendly_name}, type: #{@type}, sandbox: #{@sandbox}, date_created: #{@date_created},"\
|
|
162
|
+
" date_updated: #{@date_updated}, url: #{@url}, additional_properties:"\
|
|
163
|
+
" #{@additional_properties}>"
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
167
|
+
def inspect
|
|
168
|
+
class_name = self.class.name.split('::').last
|
|
169
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, friendly_name:"\
|
|
170
|
+
" #{@friendly_name.inspect}, type: #{@type.inspect}, sandbox: #{@sandbox.inspect},"\
|
|
171
|
+
" date_created: #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, url:"\
|
|
172
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
# Credential1 Model.
|
|
9
|
+
class Credential1 < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the Credential 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 Credential resource.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :account_sid
|
|
21
|
+
|
|
22
|
+
# The string that you assigned to describe the resource.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :friendly_name
|
|
25
|
+
|
|
26
|
+
# The Credential type. Can be: `gcm`, `fcm`, or `apn`.
|
|
27
|
+
# @return [CredentialPushType]
|
|
28
|
+
attr_accessor :type
|
|
29
|
+
|
|
30
|
+
# [APN only] Whether to send the credential to sandbox APNs. Can be `true`
|
|
31
|
+
# to send to sandbox APNs or `false` to send to production.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :sandbox
|
|
34
|
+
|
|
35
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
36
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
37
|
+
# @return [DateTime]
|
|
38
|
+
attr_accessor :date_created
|
|
39
|
+
|
|
40
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
41
|
+
# [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
42
|
+
# @return [DateTime]
|
|
43
|
+
attr_accessor :date_updated
|
|
44
|
+
|
|
45
|
+
# The absolute URL of the Credential resource.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :url
|
|
48
|
+
|
|
49
|
+
# A mapping from model property names to API property names.
|
|
50
|
+
def self.names
|
|
51
|
+
@_hash = {} if @_hash.nil?
|
|
52
|
+
@_hash['sid'] = 'sid'
|
|
53
|
+
@_hash['account_sid'] = 'account_sid'
|
|
54
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
55
|
+
@_hash['type'] = 'type'
|
|
56
|
+
@_hash['sandbox'] = 'sandbox'
|
|
57
|
+
@_hash['date_created'] = 'date_created'
|
|
58
|
+
@_hash['date_updated'] = 'date_updated'
|
|
59
|
+
@_hash['url'] = 'url'
|
|
60
|
+
@_hash
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# An array for optional fields
|
|
64
|
+
def self.optionals
|
|
65
|
+
%w[
|
|
66
|
+
sid
|
|
67
|
+
account_sid
|
|
68
|
+
friendly_name
|
|
69
|
+
type
|
|
70
|
+
sandbox
|
|
71
|
+
date_created
|
|
72
|
+
date_updated
|
|
73
|
+
url
|
|
74
|
+
]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# An array for nullable fields
|
|
78
|
+
def self.nullables
|
|
79
|
+
%w[
|
|
80
|
+
sid
|
|
81
|
+
account_sid
|
|
82
|
+
friendly_name
|
|
83
|
+
sandbox
|
|
84
|
+
date_created
|
|
85
|
+
date_updated
|
|
86
|
+
url
|
|
87
|
+
]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def initialize(sid: SKIP, account_sid: SKIP, friendly_name: SKIP,
|
|
91
|
+
type: SKIP, sandbox: SKIP, date_created: SKIP,
|
|
92
|
+
date_updated: SKIP, url: SKIP, additional_properties: nil)
|
|
93
|
+
# Add additional model properties to the instance
|
|
94
|
+
additional_properties = {} if additional_properties.nil?
|
|
95
|
+
|
|
96
|
+
@sid = sid unless sid == SKIP
|
|
97
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
98
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
99
|
+
@type = type unless type == SKIP
|
|
100
|
+
@sandbox = sandbox unless sandbox == SKIP
|
|
101
|
+
@date_created = date_created unless date_created == SKIP
|
|
102
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
103
|
+
@url = url unless url == SKIP
|
|
104
|
+
@additional_properties = additional_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Creates an instance of the object from a hash.
|
|
108
|
+
def self.from_hash(hash)
|
|
109
|
+
return nil unless hash
|
|
110
|
+
|
|
111
|
+
# Extract variables from the hash.
|
|
112
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
113
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
114
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
115
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
116
|
+
sandbox = hash.key?('sandbox') ? hash['sandbox'] : SKIP
|
|
117
|
+
date_created = if hash.key?('date_created')
|
|
118
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
119
|
+
else
|
|
120
|
+
SKIP
|
|
121
|
+
end
|
|
122
|
+
date_updated = if hash.key?('date_updated')
|
|
123
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
124
|
+
else
|
|
125
|
+
SKIP
|
|
126
|
+
end
|
|
127
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
128
|
+
|
|
129
|
+
# Create a new hash for additional properties, removing known properties.
|
|
130
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
131
|
+
|
|
132
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
133
|
+
new_hash, proc { |value| value }
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
# Create object from extracted values.
|
|
137
|
+
Credential1.new(sid: sid,
|
|
138
|
+
account_sid: account_sid,
|
|
139
|
+
friendly_name: friendly_name,
|
|
140
|
+
type: type,
|
|
141
|
+
sandbox: sandbox,
|
|
142
|
+
date_created: date_created,
|
|
143
|
+
date_updated: date_updated,
|
|
144
|
+
url: url,
|
|
145
|
+
additional_properties: additional_properties)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def to_custom_date_created
|
|
149
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def to_custom_date_updated
|
|
153
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Provides a human-readable string representation of the object.
|
|
157
|
+
def to_s
|
|
158
|
+
class_name = self.class.name.split('::').last
|
|
159
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, friendly_name:"\
|
|
160
|
+
" #{@friendly_name}, type: #{@type}, sandbox: #{@sandbox}, date_created: #{@date_created},"\
|
|
161
|
+
" date_updated: #{@date_updated}, url: #{@url}, additional_properties:"\
|
|
162
|
+
" #{@additional_properties}>"
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
166
|
+
def inspect
|
|
167
|
+
class_name = self.class.name.split('::').last
|
|
168
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, friendly_name:"\
|
|
169
|
+
" #{@friendly_name.inspect}, type: #{@type.inspect}, sandbox: #{@sandbox.inspect},"\
|
|
170
|
+
" date_created: #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, url:"\
|
|
171
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|