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,192 @@
|
|
|
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
|
+
# Role Model.
|
|
9
|
+
class Role < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the Role 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 Role resource.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :account_sid
|
|
21
|
+
|
|
22
|
+
# The SID of the [Conversation
|
|
23
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
24
|
+
# the Role resource is associated with.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :chat_service_sid
|
|
27
|
+
|
|
28
|
+
# The string that you assigned to describe the resource.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :friendly_name
|
|
31
|
+
|
|
32
|
+
# The type of role. Can be: `conversation` for
|
|
33
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-
|
|
34
|
+
# resource) roles or `service` for [Conversation
|
|
35
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
36
|
+
# roles.
|
|
37
|
+
# @return [RoleRoleType]
|
|
38
|
+
attr_accessor :type
|
|
39
|
+
|
|
40
|
+
# An array of the permissions the role has been granted.
|
|
41
|
+
# @return [Array[String]]
|
|
42
|
+
attr_accessor :permissions
|
|
43
|
+
|
|
44
|
+
# The date and time in GMT when the resource was created specified in [ISO
|
|
45
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
46
|
+
# @return [DateTime]
|
|
47
|
+
attr_accessor :date_created
|
|
48
|
+
|
|
49
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
50
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
51
|
+
# @return [DateTime]
|
|
52
|
+
attr_accessor :date_updated
|
|
53
|
+
|
|
54
|
+
# An absolute API resource URL for this user role.
|
|
55
|
+
# @return [String]
|
|
56
|
+
attr_accessor :url
|
|
57
|
+
|
|
58
|
+
# A mapping from model property names to API property names.
|
|
59
|
+
def self.names
|
|
60
|
+
@_hash = {} if @_hash.nil?
|
|
61
|
+
@_hash['sid'] = 'sid'
|
|
62
|
+
@_hash['account_sid'] = 'account_sid'
|
|
63
|
+
@_hash['chat_service_sid'] = 'chat_service_sid'
|
|
64
|
+
@_hash['friendly_name'] = 'friendly_name'
|
|
65
|
+
@_hash['type'] = 'type'
|
|
66
|
+
@_hash['permissions'] = 'permissions'
|
|
67
|
+
@_hash['date_created'] = 'date_created'
|
|
68
|
+
@_hash['date_updated'] = 'date_updated'
|
|
69
|
+
@_hash['url'] = 'url'
|
|
70
|
+
@_hash
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for optional fields
|
|
74
|
+
def self.optionals
|
|
75
|
+
%w[
|
|
76
|
+
sid
|
|
77
|
+
account_sid
|
|
78
|
+
chat_service_sid
|
|
79
|
+
friendly_name
|
|
80
|
+
type
|
|
81
|
+
permissions
|
|
82
|
+
date_created
|
|
83
|
+
date_updated
|
|
84
|
+
url
|
|
85
|
+
]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# An array for nullable fields
|
|
89
|
+
def self.nullables
|
|
90
|
+
%w[
|
|
91
|
+
sid
|
|
92
|
+
account_sid
|
|
93
|
+
chat_service_sid
|
|
94
|
+
friendly_name
|
|
95
|
+
permissions
|
|
96
|
+
date_created
|
|
97
|
+
date_updated
|
|
98
|
+
url
|
|
99
|
+
]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def initialize(sid: SKIP, account_sid: SKIP, chat_service_sid: SKIP,
|
|
103
|
+
friendly_name: SKIP, type: SKIP, permissions: SKIP,
|
|
104
|
+
date_created: SKIP, date_updated: SKIP, url: SKIP,
|
|
105
|
+
additional_properties: nil)
|
|
106
|
+
# Add additional model properties to the instance
|
|
107
|
+
additional_properties = {} if additional_properties.nil?
|
|
108
|
+
|
|
109
|
+
@sid = sid unless sid == SKIP
|
|
110
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
111
|
+
@chat_service_sid = chat_service_sid unless chat_service_sid == SKIP
|
|
112
|
+
@friendly_name = friendly_name unless friendly_name == SKIP
|
|
113
|
+
@type = type unless type == SKIP
|
|
114
|
+
@permissions = permissions unless permissions == SKIP
|
|
115
|
+
@date_created = date_created unless date_created == SKIP
|
|
116
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
117
|
+
@url = url unless url == SKIP
|
|
118
|
+
@additional_properties = additional_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Creates an instance of the object from a hash.
|
|
122
|
+
def self.from_hash(hash)
|
|
123
|
+
return nil unless hash
|
|
124
|
+
|
|
125
|
+
# Extract variables from the hash.
|
|
126
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
127
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
128
|
+
chat_service_sid =
|
|
129
|
+
hash.key?('chat_service_sid') ? hash['chat_service_sid'] : SKIP
|
|
130
|
+
friendly_name = hash.key?('friendly_name') ? hash['friendly_name'] : SKIP
|
|
131
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
132
|
+
permissions = hash.key?('permissions') ? hash['permissions'] : SKIP
|
|
133
|
+
date_created = if hash.key?('date_created')
|
|
134
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
135
|
+
else
|
|
136
|
+
SKIP
|
|
137
|
+
end
|
|
138
|
+
date_updated = if hash.key?('date_updated')
|
|
139
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
140
|
+
else
|
|
141
|
+
SKIP
|
|
142
|
+
end
|
|
143
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
144
|
+
|
|
145
|
+
# Create a new hash for additional properties, removing known properties.
|
|
146
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
147
|
+
|
|
148
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
149
|
+
new_hash, proc { |value| value }
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Create object from extracted values.
|
|
153
|
+
Role.new(sid: sid,
|
|
154
|
+
account_sid: account_sid,
|
|
155
|
+
chat_service_sid: chat_service_sid,
|
|
156
|
+
friendly_name: friendly_name,
|
|
157
|
+
type: type,
|
|
158
|
+
permissions: permissions,
|
|
159
|
+
date_created: date_created,
|
|
160
|
+
date_updated: date_updated,
|
|
161
|
+
url: url,
|
|
162
|
+
additional_properties: additional_properties)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def to_custom_date_created
|
|
166
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def to_custom_date_updated
|
|
170
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Provides a human-readable string representation of the object.
|
|
174
|
+
def to_s
|
|
175
|
+
class_name = self.class.name.split('::').last
|
|
176
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, chat_service_sid:"\
|
|
177
|
+
" #{@chat_service_sid}, friendly_name: #{@friendly_name}, type: #{@type}, permissions:"\
|
|
178
|
+
" #{@permissions}, date_created: #{@date_created}, date_updated: #{@date_updated}, url:"\
|
|
179
|
+
" #{@url}, additional_properties: #{@additional_properties}>"
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
183
|
+
def inspect
|
|
184
|
+
class_name = self.class.name.split('::').last
|
|
185
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect},"\
|
|
186
|
+
" chat_service_sid: #{@chat_service_sid.inspect}, friendly_name: #{@friendly_name.inspect},"\
|
|
187
|
+
" type: #{@type.inspect}, permissions: #{@permissions.inspect}, date_created:"\
|
|
188
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, url: #{@url.inspect},"\
|
|
189
|
+
" additional_properties: #{@additional_properties}>"
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# The type of role. Can be: `conversation` for
|
|
8
|
+
# [Conversation](https://www.twilio.com/docs/conversations/api/conversation-re
|
|
9
|
+
# source) roles or `service` for [Conversation
|
|
10
|
+
# Service](https://www.twilio.com/docs/conversations/api/service-resource)
|
|
11
|
+
# roles.
|
|
12
|
+
class RoleRoleType
|
|
13
|
+
ROLE_ROLE_TYPE = [
|
|
14
|
+
# TODO: Write general description for CONVERSATION
|
|
15
|
+
CONVERSATION = 'conversation'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for SERVICE
|
|
18
|
+
SERVICE = 'service'.freeze
|
|
19
|
+
].freeze
|
|
20
|
+
|
|
21
|
+
def self.validate(value)
|
|
22
|
+
return false if value.nil?
|
|
23
|
+
|
|
24
|
+
ROLE_ROLE_TYPE.include?(value)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_value(value, default_value = CONVERSATION)
|
|
28
|
+
return default_value if value.nil?
|
|
29
|
+
|
|
30
|
+
str = value.to_s.strip
|
|
31
|
+
|
|
32
|
+
case str.downcase
|
|
33
|
+
when 'conversation' then CONVERSATION
|
|
34
|
+
when 'service' then SERVICE
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
# Safelist Model.
|
|
8
|
+
class Safelist < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The unique string that we created to identify the SafeList resource.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :sid
|
|
15
|
+
|
|
16
|
+
# The phone number or phone number 1k prefix in SafeList.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :phone_number
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['sid'] = 'sid'
|
|
24
|
+
@_hash['phone_number'] = 'phone_number'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
sid
|
|
32
|
+
phone_number
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
%w[
|
|
39
|
+
sid
|
|
40
|
+
phone_number
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(sid: SKIP, phone_number: SKIP, additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@sid = sid unless sid == SKIP
|
|
49
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
50
|
+
@additional_properties = additional_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
59
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
|
|
60
|
+
|
|
61
|
+
# Create a new hash for additional properties, removing known properties.
|
|
62
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
63
|
+
|
|
64
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
65
|
+
new_hash, proc { |value| value }
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# Create object from extracted values.
|
|
69
|
+
Safelist.new(sid: sid,
|
|
70
|
+
phone_number: phone_number,
|
|
71
|
+
additional_properties: additional_properties)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Provides a human-readable string representation of the object.
|
|
75
|
+
def to_s
|
|
76
|
+
class_name = self.class.name.split('::').last
|
|
77
|
+
"<#{class_name} sid: #{@sid}, phone_number: #{@phone_number}, additional_properties:"\
|
|
78
|
+
" #{@additional_properties}>"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
82
|
+
def inspect
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} sid: #{@sid.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
85
|
+
" additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
# Safelist1 Model.
|
|
8
|
+
class Safelist1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The unique string that we created to identify the SafeList resource.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :sid
|
|
15
|
+
|
|
16
|
+
# The phone number in SafeList.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :phone_number
|
|
19
|
+
|
|
20
|
+
# The absolute URL of the SafeList resource.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :url
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['sid'] = 'sid'
|
|
28
|
+
@_hash['phone_number'] = 'phone_number'
|
|
29
|
+
@_hash['url'] = 'url'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
sid
|
|
37
|
+
phone_number
|
|
38
|
+
url
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
%w[
|
|
45
|
+
sid
|
|
46
|
+
phone_number
|
|
47
|
+
url
|
|
48
|
+
]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def initialize(sid: SKIP, phone_number: SKIP, url: SKIP,
|
|
52
|
+
additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
56
|
+
@sid = sid unless sid == SKIP
|
|
57
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
58
|
+
@url = url unless url == SKIP
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Creates an instance of the object from a hash.
|
|
63
|
+
def self.from_hash(hash)
|
|
64
|
+
return nil unless hash
|
|
65
|
+
|
|
66
|
+
# Extract variables from the hash.
|
|
67
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
68
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
|
|
69
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
70
|
+
|
|
71
|
+
# Create a new hash for additional properties, removing known properties.
|
|
72
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
73
|
+
|
|
74
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
75
|
+
new_hash, proc { |value| value }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Create object from extracted values.
|
|
79
|
+
Safelist1.new(sid: sid,
|
|
80
|
+
phone_number: phone_number,
|
|
81
|
+
url: url,
|
|
82
|
+
additional_properties: additional_properties)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Provides a human-readable string representation of the object.
|
|
86
|
+
def to_s
|
|
87
|
+
class_name = self.class.name.split('::').last
|
|
88
|
+
"<#{class_name} sid: #{@sid}, phone_number: #{@phone_number}, url: #{@url},"\
|
|
89
|
+
" additional_properties: #{@additional_properties}>"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
93
|
+
def inspect
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} sid: #{@sid.inspect}, phone_number: #{@phone_number.inspect}, url:"\
|
|
96
|
+
" #{@url.inspect}, additional_properties: #{@additional_properties}>"
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
# SecondaryAuthToken Model.
|
|
9
|
+
class SecondaryAuthToken < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
14
|
+
# the secondary Auth Token was created for.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :account_sid
|
|
17
|
+
|
|
18
|
+
# The date and time in UTC when the resource was created specified in [ISO
|
|
19
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
20
|
+
# @return [DateTime]
|
|
21
|
+
attr_accessor :date_created
|
|
22
|
+
|
|
23
|
+
# The date and time in UTC when the resource was last updated specified in
|
|
24
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
25
|
+
# @return [DateTime]
|
|
26
|
+
attr_accessor :date_updated
|
|
27
|
+
|
|
28
|
+
# The generated secondary Auth Token that can be used to authenticate future
|
|
29
|
+
# API requests.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :secondary_auth_token
|
|
32
|
+
|
|
33
|
+
# The URI for this resource, relative to `https://accounts.twilio.com`
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :url
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['account_sid'] = 'account_sid'
|
|
41
|
+
@_hash['date_created'] = 'date_created'
|
|
42
|
+
@_hash['date_updated'] = 'date_updated'
|
|
43
|
+
@_hash['secondary_auth_token'] = 'secondary_auth_token'
|
|
44
|
+
@_hash['url'] = 'url'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
%w[
|
|
51
|
+
account_sid
|
|
52
|
+
date_created
|
|
53
|
+
date_updated
|
|
54
|
+
secondary_auth_token
|
|
55
|
+
url
|
|
56
|
+
]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
account_sid
|
|
63
|
+
date_created
|
|
64
|
+
date_updated
|
|
65
|
+
secondary_auth_token
|
|
66
|
+
url
|
|
67
|
+
]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def initialize(account_sid: SKIP, date_created: SKIP, date_updated: SKIP,
|
|
71
|
+
secondary_auth_token: SKIP, url: SKIP,
|
|
72
|
+
additional_properties: nil)
|
|
73
|
+
# Add additional model properties to the instance
|
|
74
|
+
additional_properties = {} if additional_properties.nil?
|
|
75
|
+
|
|
76
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
77
|
+
@date_created = date_created unless date_created == SKIP
|
|
78
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
79
|
+
@secondary_auth_token = secondary_auth_token unless secondary_auth_token == SKIP
|
|
80
|
+
@url = url unless url == SKIP
|
|
81
|
+
@additional_properties = additional_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Creates an instance of the object from a hash.
|
|
85
|
+
def self.from_hash(hash)
|
|
86
|
+
return nil unless hash
|
|
87
|
+
|
|
88
|
+
# Extract variables from the hash.
|
|
89
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
90
|
+
date_created = if hash.key?('date_created')
|
|
91
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
92
|
+
else
|
|
93
|
+
SKIP
|
|
94
|
+
end
|
|
95
|
+
date_updated = if hash.key?('date_updated')
|
|
96
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
97
|
+
else
|
|
98
|
+
SKIP
|
|
99
|
+
end
|
|
100
|
+
secondary_auth_token =
|
|
101
|
+
hash.key?('secondary_auth_token') ? hash['secondary_auth_token'] : SKIP
|
|
102
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
103
|
+
|
|
104
|
+
# Create a new hash for additional properties, removing known properties.
|
|
105
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
106
|
+
|
|
107
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
108
|
+
new_hash, proc { |value| value }
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
# Create object from extracted values.
|
|
112
|
+
SecondaryAuthToken.new(account_sid: account_sid,
|
|
113
|
+
date_created: date_created,
|
|
114
|
+
date_updated: date_updated,
|
|
115
|
+
secondary_auth_token: secondary_auth_token,
|
|
116
|
+
url: url,
|
|
117
|
+
additional_properties: additional_properties)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def to_custom_date_created
|
|
121
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def to_custom_date_updated
|
|
125
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Provides a human-readable string representation of the object.
|
|
129
|
+
def to_s
|
|
130
|
+
class_name = self.class.name.split('::').last
|
|
131
|
+
"<#{class_name} account_sid: #{@account_sid}, date_created: #{@date_created}, date_updated:"\
|
|
132
|
+
" #{@date_updated}, secondary_auth_token: #{@secondary_auth_token}, url: #{@url},"\
|
|
133
|
+
" additional_properties: #{@additional_properties}>"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
137
|
+
def inspect
|
|
138
|
+
class_name = self.class.name.split('::').last
|
|
139
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, date_created:"\
|
|
140
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect}, secondary_auth_token:"\
|
|
141
|
+
" #{@secondary_auth_token.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
142
|
+
" #{@additional_properties}>"
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|