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,363 @@
|
|
|
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
|
+
# Notification Model.
|
|
9
|
+
class Notification < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the Notification 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 Notification resource.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :account_sid
|
|
21
|
+
|
|
22
|
+
# The SID of the
|
|
23
|
+
# [Service](https://www.twilio.com/docs/notify/api/service-resource) the
|
|
24
|
+
# resource is associated with.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :service_sid
|
|
27
|
+
|
|
28
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
29
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
30
|
+
# @return [DateTime]
|
|
31
|
+
attr_accessor :date_created
|
|
32
|
+
|
|
33
|
+
# The list of `identity` values of the Users to notify. We will attempt to
|
|
34
|
+
# deliver notifications only to Bindings with an identity in this list.
|
|
35
|
+
# @return [Array[String]]
|
|
36
|
+
attr_accessor :identities
|
|
37
|
+
|
|
38
|
+
# The tags that select the Bindings to notify. Notifications will be
|
|
39
|
+
# attempted only to Bindings that have all of the tags listed in this
|
|
40
|
+
# property.
|
|
41
|
+
# @return [Array[String]]
|
|
42
|
+
attr_accessor :tags
|
|
43
|
+
|
|
44
|
+
# The list of Segments to notify. The
|
|
45
|
+
# [Segment](https://www.twilio.com/docs/notify/api/segment-resource)
|
|
46
|
+
# resource is deprecated. Use the `tags` property, instead.
|
|
47
|
+
# @return [Array[String]]
|
|
48
|
+
attr_accessor :segments
|
|
49
|
+
|
|
50
|
+
# The priority of the notification. Can be: `low` or `high` and the default
|
|
51
|
+
# is `high`. A value of `low` optimizes the client app's battery
|
|
52
|
+
# consumption; however, notifications may be delivered with unspecified
|
|
53
|
+
# delay. For FCM and GCM, `low` priority is the same as `Normal` priority.
|
|
54
|
+
# For APNS `low` priority is the same as `5`. A value of `high` sends the
|
|
55
|
+
# notification immediately, and can wake up a sleeping device. For FCM and
|
|
56
|
+
# GCM, `high` is the same as `High` priority. For APNS, `high` is a priority
|
|
57
|
+
# `10`. SMS does not support this property.
|
|
58
|
+
# @return [NotifPriority]
|
|
59
|
+
attr_accessor :priority
|
|
60
|
+
|
|
61
|
+
# How long, in seconds, the notification is valid. Can be an integer between
|
|
62
|
+
# 0 and 2,419,200, which is 4 weeks, the default and the maximum supported
|
|
63
|
+
# time to live (TTL). Delivery should be attempted if the device is offline
|
|
64
|
+
# until the TTL elapses. Zero means that the notification delivery is
|
|
65
|
+
# attempted immediately, only once, and is not stored for future delivery.
|
|
66
|
+
# SMS does not support this property.
|
|
67
|
+
# @return [Integer]
|
|
68
|
+
attr_accessor :ttl
|
|
69
|
+
|
|
70
|
+
# The notification title. For FCM and GCM, this translates to the
|
|
71
|
+
# `data.twi_title` value. For APNS, this translates to the `aps.alert.title`
|
|
72
|
+
# value. SMS does not support this property. This field is not visible on
|
|
73
|
+
# iOS phones and tablets but appears on Apple Watch and Android devices.
|
|
74
|
+
# @return [String]
|
|
75
|
+
attr_accessor :title
|
|
76
|
+
|
|
77
|
+
# The notification text. For FCM and GCM, translates to `data.twi_body`. For
|
|
78
|
+
# APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS
|
|
79
|
+
# requires either this `body` value, or `media_urls` attribute defined in
|
|
80
|
+
# the `sms` parameter of the notification.
|
|
81
|
+
# @return [String]
|
|
82
|
+
attr_accessor :body
|
|
83
|
+
|
|
84
|
+
# The name of the sound to be played for the notification. For FCM and GCM,
|
|
85
|
+
# this Translates to `data.twi_sound`. For APNS, this translates to
|
|
86
|
+
# `aps.sound`. SMS does not support this property.
|
|
87
|
+
# @return [String]
|
|
88
|
+
attr_accessor :sound
|
|
89
|
+
|
|
90
|
+
# The actions to display for the notification. For APNS, translates to the
|
|
91
|
+
# `aps.category` value. For GCM, translates to the `data.twi_action` value.
|
|
92
|
+
# For SMS, this parameter is not supported and is omitted from deliveries to
|
|
93
|
+
# those channels.
|
|
94
|
+
# @return [String]
|
|
95
|
+
attr_accessor :action
|
|
96
|
+
|
|
97
|
+
# The custom key-value pairs of the notification's payload. For FCM and GCM,
|
|
98
|
+
# this value translates to `data` in the FCM and GCM payloads. FCM and GCM
|
|
99
|
+
# [reserve certain
|
|
100
|
+
# keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref)
|
|
101
|
+
# that cannot be used in those channels. For APNS, attributes of `data` are
|
|
102
|
+
# inserted into the APNS payload as custom properties outside of the `aps`
|
|
103
|
+
# dictionary. In all channels, we reserve keys that start with `twi_` for
|
|
104
|
+
# future use. Custom keys that start with `twi_` are not allowed and are
|
|
105
|
+
# rejected as 400 Bad request with no delivery attempted. For SMS, this
|
|
106
|
+
# parameter is not supported and is omitted from deliveries to those
|
|
107
|
+
# channels.
|
|
108
|
+
# @return [Object]
|
|
109
|
+
attr_accessor :data
|
|
110
|
+
|
|
111
|
+
# The APNS-specific payload that overrides corresponding attributes in the
|
|
112
|
+
# generic payload for APNS Bindings. This property maps to the APNS
|
|
113
|
+
# `Payload` item, therefore the `aps` key must be used to change standard
|
|
114
|
+
# attributes. Adds custom key-value pairs to the root of the dictionary. See
|
|
115
|
+
# the [APNS
|
|
116
|
+
# documentation](https://developer.apple.com/library/content/documentation/N
|
|
117
|
+
# etworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.h
|
|
118
|
+
# tml) for more details. We reserve keys that start with `twi_` for future
|
|
119
|
+
# use. Custom keys that start with `twi_` are not allowed.
|
|
120
|
+
# @return [Object]
|
|
121
|
+
attr_accessor :apn
|
|
122
|
+
|
|
123
|
+
# The GCM-specific payload that overrides corresponding attributes in the
|
|
124
|
+
# generic payload for GCM Bindings. This property maps to the root JSON
|
|
125
|
+
# dictionary. Target parameters `to`, `registration_ids`, and
|
|
126
|
+
# `notification_key` are not allowed. We reserve keys that start with `twi_`
|
|
127
|
+
# for future use. Custom keys that start with `twi_` are not allowed.
|
|
128
|
+
# @return [Object]
|
|
129
|
+
attr_accessor :gcm
|
|
130
|
+
|
|
131
|
+
# The FCM-specific payload that overrides corresponding attributes in the
|
|
132
|
+
# generic payload for FCM Bindings. This property maps to the root JSON
|
|
133
|
+
# dictionary. See the [FCM
|
|
134
|
+
# documentation](https://firebase.google.com/docs/cloud-messaging/http-serve
|
|
135
|
+
# r-ref#downstream) for more details. Target parameters `to`,
|
|
136
|
+
# `registration_ids`, `condition`, and `notification_key` are not allowed in
|
|
137
|
+
# this parameter. We reserve keys that start with `twi_` for future use.
|
|
138
|
+
# Custom keys that start with `twi_` are not allowed. FCM also [reserves
|
|
139
|
+
# certain
|
|
140
|
+
# keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref),
|
|
141
|
+
# which cannot be used in that channel.
|
|
142
|
+
# @return [Object]
|
|
143
|
+
attr_accessor :fcm
|
|
144
|
+
|
|
145
|
+
# The SMS-specific payload that overrides corresponding attributes in the
|
|
146
|
+
# generic payload for SMS Bindings. Each attribute in this value maps to
|
|
147
|
+
# the corresponding `form` parameter of the Twilio
|
|
148
|
+
# [Message](https://www.twilio.com/docs/sms/api/message-resource) resource.
|
|
149
|
+
# These parameters of the Message resource are supported in snake case
|
|
150
|
+
# format: `body`, `media_urls`, `status_callback`, and `max_price`. The
|
|
151
|
+
# `status_callback` parameter overrides the corresponding parameter in the
|
|
152
|
+
# messaging service, if configured. The `media_urls` property expects a JSON
|
|
153
|
+
# array.
|
|
154
|
+
# @return [Object]
|
|
155
|
+
attr_accessor :sms
|
|
156
|
+
|
|
157
|
+
# Deprecated.
|
|
158
|
+
# @return [Object]
|
|
159
|
+
attr_accessor :facebook_messenger
|
|
160
|
+
|
|
161
|
+
# Deprecated.
|
|
162
|
+
# @return [Object]
|
|
163
|
+
attr_accessor :alexa
|
|
164
|
+
|
|
165
|
+
# A mapping from model property names to API property names.
|
|
166
|
+
def self.names
|
|
167
|
+
@_hash = {} if @_hash.nil?
|
|
168
|
+
@_hash['sid'] = 'sid'
|
|
169
|
+
@_hash['account_sid'] = 'account_sid'
|
|
170
|
+
@_hash['service_sid'] = 'service_sid'
|
|
171
|
+
@_hash['date_created'] = 'date_created'
|
|
172
|
+
@_hash['identities'] = 'identities'
|
|
173
|
+
@_hash['tags'] = 'tags'
|
|
174
|
+
@_hash['segments'] = 'segments'
|
|
175
|
+
@_hash['priority'] = 'priority'
|
|
176
|
+
@_hash['ttl'] = 'ttl'
|
|
177
|
+
@_hash['title'] = 'title'
|
|
178
|
+
@_hash['body'] = 'body'
|
|
179
|
+
@_hash['sound'] = 'sound'
|
|
180
|
+
@_hash['action'] = 'action'
|
|
181
|
+
@_hash['data'] = 'data'
|
|
182
|
+
@_hash['apn'] = 'apn'
|
|
183
|
+
@_hash['gcm'] = 'gcm'
|
|
184
|
+
@_hash['fcm'] = 'fcm'
|
|
185
|
+
@_hash['sms'] = 'sms'
|
|
186
|
+
@_hash['facebook_messenger'] = 'facebook_messenger'
|
|
187
|
+
@_hash['alexa'] = 'alexa'
|
|
188
|
+
@_hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# An array for optional fields
|
|
192
|
+
def self.optionals
|
|
193
|
+
%w[
|
|
194
|
+
sid
|
|
195
|
+
account_sid
|
|
196
|
+
service_sid
|
|
197
|
+
date_created
|
|
198
|
+
identities
|
|
199
|
+
tags
|
|
200
|
+
segments
|
|
201
|
+
priority
|
|
202
|
+
ttl
|
|
203
|
+
title
|
|
204
|
+
body
|
|
205
|
+
sound
|
|
206
|
+
action
|
|
207
|
+
data
|
|
208
|
+
apn
|
|
209
|
+
gcm
|
|
210
|
+
fcm
|
|
211
|
+
sms
|
|
212
|
+
facebook_messenger
|
|
213
|
+
alexa
|
|
214
|
+
]
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# An array for nullable fields
|
|
218
|
+
def self.nullables
|
|
219
|
+
%w[
|
|
220
|
+
sid
|
|
221
|
+
account_sid
|
|
222
|
+
service_sid
|
|
223
|
+
date_created
|
|
224
|
+
identities
|
|
225
|
+
tags
|
|
226
|
+
segments
|
|
227
|
+
title
|
|
228
|
+
body
|
|
229
|
+
sound
|
|
230
|
+
action
|
|
231
|
+
data
|
|
232
|
+
apn
|
|
233
|
+
gcm
|
|
234
|
+
fcm
|
|
235
|
+
sms
|
|
236
|
+
facebook_messenger
|
|
237
|
+
alexa
|
|
238
|
+
]
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
def initialize(sid: SKIP, account_sid: SKIP, service_sid: SKIP,
|
|
242
|
+
date_created: SKIP, identities: SKIP, tags: SKIP,
|
|
243
|
+
segments: SKIP, priority: SKIP, ttl: 0, title: SKIP,
|
|
244
|
+
body: SKIP, sound: SKIP, action: SKIP, data: SKIP, apn: SKIP,
|
|
245
|
+
gcm: SKIP, fcm: SKIP, sms: SKIP, facebook_messenger: SKIP,
|
|
246
|
+
alexa: SKIP, additional_properties: nil)
|
|
247
|
+
# Add additional model properties to the instance
|
|
248
|
+
additional_properties = {} if additional_properties.nil?
|
|
249
|
+
|
|
250
|
+
@sid = sid unless sid == SKIP
|
|
251
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
252
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
253
|
+
@date_created = date_created unless date_created == SKIP
|
|
254
|
+
@identities = identities unless identities == SKIP
|
|
255
|
+
@tags = tags unless tags == SKIP
|
|
256
|
+
@segments = segments unless segments == SKIP
|
|
257
|
+
@priority = priority unless priority == SKIP
|
|
258
|
+
@ttl = ttl unless ttl == SKIP
|
|
259
|
+
@title = title unless title == SKIP
|
|
260
|
+
@body = body unless body == SKIP
|
|
261
|
+
@sound = sound unless sound == SKIP
|
|
262
|
+
@action = action unless action == SKIP
|
|
263
|
+
@data = data unless data == SKIP
|
|
264
|
+
@apn = apn unless apn == SKIP
|
|
265
|
+
@gcm = gcm unless gcm == SKIP
|
|
266
|
+
@fcm = fcm unless fcm == SKIP
|
|
267
|
+
@sms = sms unless sms == SKIP
|
|
268
|
+
@facebook_messenger = facebook_messenger unless facebook_messenger == SKIP
|
|
269
|
+
@alexa = alexa unless alexa == SKIP
|
|
270
|
+
@additional_properties = additional_properties
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Creates an instance of the object from a hash.
|
|
274
|
+
def self.from_hash(hash)
|
|
275
|
+
return nil unless hash
|
|
276
|
+
|
|
277
|
+
# Extract variables from the hash.
|
|
278
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
279
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
280
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
281
|
+
date_created = if hash.key?('date_created')
|
|
282
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
283
|
+
else
|
|
284
|
+
SKIP
|
|
285
|
+
end
|
|
286
|
+
identities = hash.key?('identities') ? hash['identities'] : SKIP
|
|
287
|
+
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
288
|
+
segments = hash.key?('segments') ? hash['segments'] : SKIP
|
|
289
|
+
priority = hash.key?('priority') ? hash['priority'] : SKIP
|
|
290
|
+
ttl = hash['ttl'] ||= 0
|
|
291
|
+
title = hash.key?('title') ? hash['title'] : SKIP
|
|
292
|
+
body = hash.key?('body') ? hash['body'] : SKIP
|
|
293
|
+
sound = hash.key?('sound') ? hash['sound'] : SKIP
|
|
294
|
+
action = hash.key?('action') ? hash['action'] : SKIP
|
|
295
|
+
data = hash.key?('data') ? hash['data'] : SKIP
|
|
296
|
+
apn = hash.key?('apn') ? hash['apn'] : SKIP
|
|
297
|
+
gcm = hash.key?('gcm') ? hash['gcm'] : SKIP
|
|
298
|
+
fcm = hash.key?('fcm') ? hash['fcm'] : SKIP
|
|
299
|
+
sms = hash.key?('sms') ? hash['sms'] : SKIP
|
|
300
|
+
facebook_messenger =
|
|
301
|
+
hash.key?('facebook_messenger') ? hash['facebook_messenger'] : SKIP
|
|
302
|
+
alexa = hash.key?('alexa') ? hash['alexa'] : SKIP
|
|
303
|
+
|
|
304
|
+
# Create a new hash for additional properties, removing known properties.
|
|
305
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
306
|
+
|
|
307
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
308
|
+
new_hash, proc { |value| value }
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
# Create object from extracted values.
|
|
312
|
+
Notification.new(sid: sid,
|
|
313
|
+
account_sid: account_sid,
|
|
314
|
+
service_sid: service_sid,
|
|
315
|
+
date_created: date_created,
|
|
316
|
+
identities: identities,
|
|
317
|
+
tags: tags,
|
|
318
|
+
segments: segments,
|
|
319
|
+
priority: priority,
|
|
320
|
+
ttl: ttl,
|
|
321
|
+
title: title,
|
|
322
|
+
body: body,
|
|
323
|
+
sound: sound,
|
|
324
|
+
action: action,
|
|
325
|
+
data: data,
|
|
326
|
+
apn: apn,
|
|
327
|
+
gcm: gcm,
|
|
328
|
+
fcm: fcm,
|
|
329
|
+
sms: sms,
|
|
330
|
+
facebook_messenger: facebook_messenger,
|
|
331
|
+
alexa: alexa,
|
|
332
|
+
additional_properties: additional_properties)
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
def to_custom_date_created
|
|
336
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Provides a human-readable string representation of the object.
|
|
340
|
+
def to_s
|
|
341
|
+
class_name = self.class.name.split('::').last
|
|
342
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, service_sid: #{@service_sid},"\
|
|
343
|
+
" date_created: #{@date_created}, identities: #{@identities}, tags: #{@tags}, segments:"\
|
|
344
|
+
" #{@segments}, priority: #{@priority}, ttl: #{@ttl}, title: #{@title}, body: #{@body},"\
|
|
345
|
+
" sound: #{@sound}, action: #{@action}, data: #{@data}, apn: #{@apn}, gcm: #{@gcm}, fcm:"\
|
|
346
|
+
" #{@fcm}, sms: #{@sms}, facebook_messenger: #{@facebook_messenger}, alexa: #{@alexa},"\
|
|
347
|
+
" additional_properties: #{@additional_properties}>"
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
351
|
+
def inspect
|
|
352
|
+
class_name = self.class.name.split('::').last
|
|
353
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, service_sid:"\
|
|
354
|
+
" #{@service_sid.inspect}, date_created: #{@date_created.inspect}, identities:"\
|
|
355
|
+
" #{@identities.inspect}, tags: #{@tags.inspect}, segments: #{@segments.inspect}, priority:"\
|
|
356
|
+
" #{@priority.inspect}, ttl: #{@ttl.inspect}, title: #{@title.inspect}, body:"\
|
|
357
|
+
" #{@body.inspect}, sound: #{@sound.inspect}, action: #{@action.inspect}, data:"\
|
|
358
|
+
" #{@data.inspect}, apn: #{@apn.inspect}, gcm: #{@gcm.inspect}, fcm: #{@fcm.inspect}, sms:"\
|
|
359
|
+
" #{@sms.inspect}, facebook_messenger: #{@facebook_messenger.inspect}, alexa:"\
|
|
360
|
+
" #{@alexa.inspect}, additional_properties: #{@additional_properties}>"
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
end
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
# Notification1 Model.
|
|
9
|
+
class Notification1 < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# A 34 character string that uniquely identifies this Notification.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The unique SID identifier of the Account.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :account_sid
|
|
20
|
+
|
|
21
|
+
# The unique SID identifier of the Service.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :service_sid
|
|
24
|
+
|
|
25
|
+
# The unique SID identifier of the Entity.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :entity_sid
|
|
28
|
+
|
|
29
|
+
# Customer unique identity for the Entity owner of the Challenge. This
|
|
30
|
+
# identifier should be immutable, not PII, length between 8 and 64
|
|
31
|
+
# characters, and generated by your external system, such as your user's
|
|
32
|
+
# UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric
|
|
33
|
+
# characters.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :identity
|
|
36
|
+
|
|
37
|
+
# The unique SID identifier of the Challenge.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :challenge_sid
|
|
40
|
+
|
|
41
|
+
# The priority of the notification. For `push` Challenges it's always `high`
|
|
42
|
+
# which sends the notification immediately, and can wake up a sleeping
|
|
43
|
+
# device.
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :priority
|
|
46
|
+
|
|
47
|
+
# How long, in seconds, the notification is valid. Max: 5 minutes
|
|
48
|
+
# @return [Integer]
|
|
49
|
+
attr_accessor :ttl
|
|
50
|
+
|
|
51
|
+
# The date that this Notification was created, given in [ISO
|
|
52
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
53
|
+
# @return [DateTime]
|
|
54
|
+
attr_accessor :date_created
|
|
55
|
+
|
|
56
|
+
# A mapping from model property names to API property names.
|
|
57
|
+
def self.names
|
|
58
|
+
@_hash = {} if @_hash.nil?
|
|
59
|
+
@_hash['sid'] = 'sid'
|
|
60
|
+
@_hash['account_sid'] = 'account_sid'
|
|
61
|
+
@_hash['service_sid'] = 'service_sid'
|
|
62
|
+
@_hash['entity_sid'] = 'entity_sid'
|
|
63
|
+
@_hash['identity'] = 'identity'
|
|
64
|
+
@_hash['challenge_sid'] = 'challenge_sid'
|
|
65
|
+
@_hash['priority'] = 'priority'
|
|
66
|
+
@_hash['ttl'] = 'ttl'
|
|
67
|
+
@_hash['date_created'] = 'date_created'
|
|
68
|
+
@_hash
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# An array for optional fields
|
|
72
|
+
def self.optionals
|
|
73
|
+
%w[
|
|
74
|
+
sid
|
|
75
|
+
account_sid
|
|
76
|
+
service_sid
|
|
77
|
+
entity_sid
|
|
78
|
+
identity
|
|
79
|
+
challenge_sid
|
|
80
|
+
priority
|
|
81
|
+
ttl
|
|
82
|
+
date_created
|
|
83
|
+
]
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# An array for nullable fields
|
|
87
|
+
def self.nullables
|
|
88
|
+
%w[
|
|
89
|
+
sid
|
|
90
|
+
account_sid
|
|
91
|
+
service_sid
|
|
92
|
+
entity_sid
|
|
93
|
+
identity
|
|
94
|
+
challenge_sid
|
|
95
|
+
priority
|
|
96
|
+
date_created
|
|
97
|
+
]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def initialize(sid: SKIP, account_sid: SKIP, service_sid: SKIP,
|
|
101
|
+
entity_sid: SKIP, identity: SKIP, challenge_sid: SKIP,
|
|
102
|
+
priority: SKIP, ttl: 0, date_created: SKIP,
|
|
103
|
+
additional_properties: nil)
|
|
104
|
+
# Add additional model properties to the instance
|
|
105
|
+
additional_properties = {} if additional_properties.nil?
|
|
106
|
+
|
|
107
|
+
@sid = sid unless sid == SKIP
|
|
108
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
109
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
110
|
+
@entity_sid = entity_sid unless entity_sid == SKIP
|
|
111
|
+
@identity = identity unless identity == SKIP
|
|
112
|
+
@challenge_sid = challenge_sid unless challenge_sid == SKIP
|
|
113
|
+
@priority = priority unless priority == SKIP
|
|
114
|
+
@ttl = ttl unless ttl == SKIP
|
|
115
|
+
@date_created = date_created unless date_created == SKIP
|
|
116
|
+
@additional_properties = additional_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Creates an instance of the object from a hash.
|
|
120
|
+
def self.from_hash(hash)
|
|
121
|
+
return nil unless hash
|
|
122
|
+
|
|
123
|
+
# Extract variables from the hash.
|
|
124
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
125
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
126
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
127
|
+
entity_sid = hash.key?('entity_sid') ? hash['entity_sid'] : SKIP
|
|
128
|
+
identity = hash.key?('identity') ? hash['identity'] : SKIP
|
|
129
|
+
challenge_sid = hash.key?('challenge_sid') ? hash['challenge_sid'] : SKIP
|
|
130
|
+
priority = hash.key?('priority') ? hash['priority'] : SKIP
|
|
131
|
+
ttl = hash['ttl'] ||= 0
|
|
132
|
+
date_created = if hash.key?('date_created')
|
|
133
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
134
|
+
else
|
|
135
|
+
SKIP
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Create a new hash for additional properties, removing known properties.
|
|
139
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
140
|
+
|
|
141
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
142
|
+
new_hash, proc { |value| value }
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
# Create object from extracted values.
|
|
146
|
+
Notification1.new(sid: sid,
|
|
147
|
+
account_sid: account_sid,
|
|
148
|
+
service_sid: service_sid,
|
|
149
|
+
entity_sid: entity_sid,
|
|
150
|
+
identity: identity,
|
|
151
|
+
challenge_sid: challenge_sid,
|
|
152
|
+
priority: priority,
|
|
153
|
+
ttl: ttl,
|
|
154
|
+
date_created: date_created,
|
|
155
|
+
additional_properties: additional_properties)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def to_custom_date_created
|
|
159
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Provides a human-readable string representation of the object.
|
|
163
|
+
def to_s
|
|
164
|
+
class_name = self.class.name.split('::').last
|
|
165
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, service_sid: #{@service_sid},"\
|
|
166
|
+
" entity_sid: #{@entity_sid}, identity: #{@identity}, challenge_sid: #{@challenge_sid},"\
|
|
167
|
+
" priority: #{@priority}, ttl: #{@ttl}, date_created: #{@date_created},"\
|
|
168
|
+
" additional_properties: #{@additional_properties}>"
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
172
|
+
def inspect
|
|
173
|
+
class_name = self.class.name.split('::').last
|
|
174
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, service_sid:"\
|
|
175
|
+
" #{@service_sid.inspect}, entity_sid: #{@entity_sid.inspect}, identity:"\
|
|
176
|
+
" #{@identity.inspect}, challenge_sid: #{@challenge_sid.inspect}, priority:"\
|
|
177
|
+
" #{@priority.inspect}, ttl: #{@ttl.inspect}, date_created: #{@date_created.inspect},"\
|
|
178
|
+
" additional_properties: #{@additional_properties}>"
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|