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,269 @@
|
|
|
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
|
+
# Binding Model.
|
|
9
|
+
class Binding < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The unique string that we created to identify the Binding 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 Binding 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 SID of the
|
|
29
|
+
# [Credential](https://www.twilio.com/docs/notify/api/credential-resource)
|
|
30
|
+
# resource to be used to send notifications to this Binding. If present,
|
|
31
|
+
# this overrides the Credential specified in the Service resource.
|
|
32
|
+
# Applicable only to `apn`, `fcm`, and `gcm` type Bindings.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :credential_sid
|
|
35
|
+
|
|
36
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
37
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
38
|
+
# @return [DateTime]
|
|
39
|
+
attr_accessor :date_created
|
|
40
|
+
|
|
41
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
42
|
+
# [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
43
|
+
# @return [DateTime]
|
|
44
|
+
attr_accessor :date_updated
|
|
45
|
+
|
|
46
|
+
# The protocol version to use to send the notification. This defaults to the
|
|
47
|
+
# value of `default_xxxx_notification_protocol_version` in the
|
|
48
|
+
# [Service](https://www.twilio.com/docs/notify/api/service-resource) for the
|
|
49
|
+
# protocol. The current version is `"3"` for `apn`, `fcm`, and `gcm` type
|
|
50
|
+
# Bindings. The parameter is not applicable to `sms` and
|
|
51
|
+
# `facebook-messenger` type Bindings as the data format is fixed.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :notification_protocol_version
|
|
54
|
+
|
|
55
|
+
# Deprecated.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :endpoint
|
|
58
|
+
|
|
59
|
+
# The `identity` value that uniquely identifies the resource's
|
|
60
|
+
# [User](https://www.twilio.com/docs/chat/rest/user-resource) within the
|
|
61
|
+
# [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to
|
|
62
|
+
# 20 Bindings can be created for the same Identity in a given Service.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :identity
|
|
65
|
+
|
|
66
|
+
# The transport technology to use for the Binding. Can be: `apn`, `fcm`,
|
|
67
|
+
# `gcm`, `sms`, or `facebook-messenger`.
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :binding_type
|
|
70
|
+
|
|
71
|
+
# The channel-specific address. For APNS, the device token. For FCM and GCM,
|
|
72
|
+
# the registration token. For SMS, a phone number in E.164 format. For
|
|
73
|
+
# Facebook Messenger, the Messenger ID of the user or a phone number in
|
|
74
|
+
# E.164 format.
|
|
75
|
+
# @return [String]
|
|
76
|
+
attr_accessor :address
|
|
77
|
+
|
|
78
|
+
# The list of tags associated with this Binding. Tags can be used to select
|
|
79
|
+
# the Bindings to use when sending a notification. Maximum 20 tags are
|
|
80
|
+
# allowed.
|
|
81
|
+
# @return [Array[String]]
|
|
82
|
+
attr_accessor :tags
|
|
83
|
+
|
|
84
|
+
# The absolute URL of the Binding resource.
|
|
85
|
+
# @return [String]
|
|
86
|
+
attr_accessor :url
|
|
87
|
+
|
|
88
|
+
# The URLs of related resources.
|
|
89
|
+
# @return [Object]
|
|
90
|
+
attr_accessor :links
|
|
91
|
+
|
|
92
|
+
# A mapping from model property names to API property names.
|
|
93
|
+
def self.names
|
|
94
|
+
@_hash = {} if @_hash.nil?
|
|
95
|
+
@_hash['sid'] = 'sid'
|
|
96
|
+
@_hash['account_sid'] = 'account_sid'
|
|
97
|
+
@_hash['service_sid'] = 'service_sid'
|
|
98
|
+
@_hash['credential_sid'] = 'credential_sid'
|
|
99
|
+
@_hash['date_created'] = 'date_created'
|
|
100
|
+
@_hash['date_updated'] = 'date_updated'
|
|
101
|
+
@_hash['notification_protocol_version'] =
|
|
102
|
+
'notification_protocol_version'
|
|
103
|
+
@_hash['endpoint'] = 'endpoint'
|
|
104
|
+
@_hash['identity'] = 'identity'
|
|
105
|
+
@_hash['binding_type'] = 'binding_type'
|
|
106
|
+
@_hash['address'] = 'address'
|
|
107
|
+
@_hash['tags'] = 'tags'
|
|
108
|
+
@_hash['url'] = 'url'
|
|
109
|
+
@_hash['links'] = 'links'
|
|
110
|
+
@_hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# An array for optional fields
|
|
114
|
+
def self.optionals
|
|
115
|
+
%w[
|
|
116
|
+
sid
|
|
117
|
+
account_sid
|
|
118
|
+
service_sid
|
|
119
|
+
credential_sid
|
|
120
|
+
date_created
|
|
121
|
+
date_updated
|
|
122
|
+
notification_protocol_version
|
|
123
|
+
endpoint
|
|
124
|
+
identity
|
|
125
|
+
binding_type
|
|
126
|
+
address
|
|
127
|
+
tags
|
|
128
|
+
url
|
|
129
|
+
links
|
|
130
|
+
]
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# An array for nullable fields
|
|
134
|
+
def self.nullables
|
|
135
|
+
%w[
|
|
136
|
+
sid
|
|
137
|
+
account_sid
|
|
138
|
+
service_sid
|
|
139
|
+
credential_sid
|
|
140
|
+
date_created
|
|
141
|
+
date_updated
|
|
142
|
+
notification_protocol_version
|
|
143
|
+
endpoint
|
|
144
|
+
identity
|
|
145
|
+
binding_type
|
|
146
|
+
address
|
|
147
|
+
tags
|
|
148
|
+
url
|
|
149
|
+
links
|
|
150
|
+
]
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def initialize(sid: SKIP, account_sid: SKIP, service_sid: SKIP,
|
|
154
|
+
credential_sid: SKIP, date_created: SKIP, date_updated: SKIP,
|
|
155
|
+
notification_protocol_version: SKIP, endpoint: SKIP,
|
|
156
|
+
identity: SKIP, binding_type: SKIP, address: SKIP,
|
|
157
|
+
tags: SKIP, url: SKIP, links: SKIP,
|
|
158
|
+
additional_properties: nil)
|
|
159
|
+
# Add additional model properties to the instance
|
|
160
|
+
additional_properties = {} if additional_properties.nil?
|
|
161
|
+
|
|
162
|
+
@sid = sid unless sid == SKIP
|
|
163
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
164
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
165
|
+
@credential_sid = credential_sid unless credential_sid == SKIP
|
|
166
|
+
@date_created = date_created unless date_created == SKIP
|
|
167
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
168
|
+
unless notification_protocol_version == SKIP
|
|
169
|
+
@notification_protocol_version =
|
|
170
|
+
notification_protocol_version
|
|
171
|
+
end
|
|
172
|
+
@endpoint = endpoint unless endpoint == SKIP
|
|
173
|
+
@identity = identity unless identity == SKIP
|
|
174
|
+
@binding_type = binding_type unless binding_type == SKIP
|
|
175
|
+
@address = address unless address == SKIP
|
|
176
|
+
@tags = tags unless tags == SKIP
|
|
177
|
+
@url = url unless url == SKIP
|
|
178
|
+
@links = links unless links == SKIP
|
|
179
|
+
@additional_properties = additional_properties
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Creates an instance of the object from a hash.
|
|
183
|
+
def self.from_hash(hash)
|
|
184
|
+
return nil unless hash
|
|
185
|
+
|
|
186
|
+
# Extract variables from the hash.
|
|
187
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
188
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
189
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
190
|
+
credential_sid =
|
|
191
|
+
hash.key?('credential_sid') ? hash['credential_sid'] : SKIP
|
|
192
|
+
date_created = if hash.key?('date_created')
|
|
193
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
194
|
+
else
|
|
195
|
+
SKIP
|
|
196
|
+
end
|
|
197
|
+
date_updated = if hash.key?('date_updated')
|
|
198
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
199
|
+
else
|
|
200
|
+
SKIP
|
|
201
|
+
end
|
|
202
|
+
notification_protocol_version =
|
|
203
|
+
hash.key?('notification_protocol_version') ? hash['notification_protocol_version'] : SKIP
|
|
204
|
+
endpoint = hash.key?('endpoint') ? hash['endpoint'] : SKIP
|
|
205
|
+
identity = hash.key?('identity') ? hash['identity'] : SKIP
|
|
206
|
+
binding_type = hash.key?('binding_type') ? hash['binding_type'] : SKIP
|
|
207
|
+
address = hash.key?('address') ? hash['address'] : SKIP
|
|
208
|
+
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
209
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
210
|
+
links = hash.key?('links') ? hash['links'] : SKIP
|
|
211
|
+
|
|
212
|
+
# Create a new hash for additional properties, removing known properties.
|
|
213
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
214
|
+
|
|
215
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
216
|
+
new_hash, proc { |value| value }
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
# Create object from extracted values.
|
|
220
|
+
Binding.new(sid: sid,
|
|
221
|
+
account_sid: account_sid,
|
|
222
|
+
service_sid: service_sid,
|
|
223
|
+
credential_sid: credential_sid,
|
|
224
|
+
date_created: date_created,
|
|
225
|
+
date_updated: date_updated,
|
|
226
|
+
notification_protocol_version: notification_protocol_version,
|
|
227
|
+
endpoint: endpoint,
|
|
228
|
+
identity: identity,
|
|
229
|
+
binding_type: binding_type,
|
|
230
|
+
address: address,
|
|
231
|
+
tags: tags,
|
|
232
|
+
url: url,
|
|
233
|
+
links: links,
|
|
234
|
+
additional_properties: additional_properties)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def to_custom_date_created
|
|
238
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
def to_custom_date_updated
|
|
242
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Provides a human-readable string representation of the object.
|
|
246
|
+
def to_s
|
|
247
|
+
class_name = self.class.name.split('::').last
|
|
248
|
+
"<#{class_name} sid: #{@sid}, account_sid: #{@account_sid}, service_sid: #{@service_sid},"\
|
|
249
|
+
" credential_sid: #{@credential_sid}, date_created: #{@date_created}, date_updated:"\
|
|
250
|
+
" #{@date_updated}, notification_protocol_version: #{@notification_protocol_version},"\
|
|
251
|
+
" endpoint: #{@endpoint}, identity: #{@identity}, binding_type: #{@binding_type}, address:"\
|
|
252
|
+
" #{@address}, tags: #{@tags}, url: #{@url}, links: #{@links}, additional_properties:"\
|
|
253
|
+
" #{@additional_properties}>"
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
257
|
+
def inspect
|
|
258
|
+
class_name = self.class.name.split('::').last
|
|
259
|
+
"<#{class_name} sid: #{@sid.inspect}, account_sid: #{@account_sid.inspect}, service_sid:"\
|
|
260
|
+
" #{@service_sid.inspect}, credential_sid: #{@credential_sid.inspect}, date_created:"\
|
|
261
|
+
" #{@date_created.inspect}, date_updated: #{@date_updated.inspect},"\
|
|
262
|
+
" notification_protocol_version: #{@notification_protocol_version.inspect}, endpoint:"\
|
|
263
|
+
" #{@endpoint.inspect}, identity: #{@identity.inspect}, binding_type:"\
|
|
264
|
+
" #{@binding_type.inspect}, address: #{@address.inspect}, tags: #{@tags.inspect}, url:"\
|
|
265
|
+
" #{@url.inspect}, links: #{@links.inspect}, additional_properties:"\
|
|
266
|
+
" #{@additional_properties}>"
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
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 transport technology to use for the Binding. Can be: `apn`, `fcm`,
|
|
8
|
+
# `gcm`, `sms`, or `facebook-messenger`.
|
|
9
|
+
class BindingBindingType
|
|
10
|
+
BINDING_BINDING_TYPE = [
|
|
11
|
+
# TODO: Write general description for APN
|
|
12
|
+
APN = 'apn'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for GCM
|
|
15
|
+
GCM = 'gcm'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for SMS
|
|
18
|
+
SMS = 'sms'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for FCM
|
|
21
|
+
FCM = 'fcm'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for FACEBOOKMESSENGER
|
|
24
|
+
FACEBOOKMESSENGER = 'facebook-messenger'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for ALEXA
|
|
27
|
+
ALEXA = 'alexa'.freeze
|
|
28
|
+
].freeze
|
|
29
|
+
|
|
30
|
+
def self.validate(value)
|
|
31
|
+
return false if value.nil?
|
|
32
|
+
|
|
33
|
+
BINDING_BINDING_TYPE.include?(value)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.from_value(value, default_value = APN)
|
|
37
|
+
return default_value if value.nil?
|
|
38
|
+
|
|
39
|
+
str = value.to_s.strip
|
|
40
|
+
|
|
41
|
+
case str.downcase
|
|
42
|
+
when 'apn' then APN
|
|
43
|
+
when 'gcm' then GCM
|
|
44
|
+
when 'sms' then SMS
|
|
45
|
+
when 'fcm' then FCM
|
|
46
|
+
when 'facebookmessenger' then FACEBOOKMESSENGER
|
|
47
|
+
when 'alexa' then ALEXA
|
|
48
|
+
else
|
|
49
|
+
default_value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
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
|
+
# Bucket Model.
|
|
9
|
+
class Bucket < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# A 34 character string that uniquely identifies this Bucket.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :sid
|
|
16
|
+
|
|
17
|
+
# The Twilio-provided string that uniquely identifies the Rate Limit
|
|
18
|
+
# resource.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :rate_limit_sid
|
|
21
|
+
|
|
22
|
+
# The SID of the [Service](https://www.twilio.com/docs/verify/api/service)
|
|
23
|
+
# the resource is associated with.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :service_sid
|
|
26
|
+
|
|
27
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
28
|
+
# created the Rate Limit resource.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :account_sid
|
|
31
|
+
|
|
32
|
+
# Maximum number of requests permitted in during the interval.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :max
|
|
35
|
+
|
|
36
|
+
# Number of seconds that the rate limit will be enforced over.
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :interval
|
|
39
|
+
|
|
40
|
+
# The date and time in GMT when the resource was created specified in [RFC
|
|
41
|
+
# 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
42
|
+
# @return [DateTime]
|
|
43
|
+
attr_accessor :date_created
|
|
44
|
+
|
|
45
|
+
# The date and time in GMT when the resource was last updated specified in
|
|
46
|
+
# [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
47
|
+
# @return [DateTime]
|
|
48
|
+
attr_accessor :date_updated
|
|
49
|
+
|
|
50
|
+
# The URL of this resource.
|
|
51
|
+
# @return [String]
|
|
52
|
+
attr_accessor :url
|
|
53
|
+
|
|
54
|
+
# A mapping from model property names to API property names.
|
|
55
|
+
def self.names
|
|
56
|
+
@_hash = {} if @_hash.nil?
|
|
57
|
+
@_hash['sid'] = 'sid'
|
|
58
|
+
@_hash['rate_limit_sid'] = 'rate_limit_sid'
|
|
59
|
+
@_hash['service_sid'] = 'service_sid'
|
|
60
|
+
@_hash['account_sid'] = 'account_sid'
|
|
61
|
+
@_hash['max'] = 'max'
|
|
62
|
+
@_hash['interval'] = 'interval'
|
|
63
|
+
@_hash['date_created'] = 'date_created'
|
|
64
|
+
@_hash['date_updated'] = 'date_updated'
|
|
65
|
+
@_hash['url'] = 'url'
|
|
66
|
+
@_hash
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# An array for optional fields
|
|
70
|
+
def self.optionals
|
|
71
|
+
%w[
|
|
72
|
+
sid
|
|
73
|
+
rate_limit_sid
|
|
74
|
+
service_sid
|
|
75
|
+
account_sid
|
|
76
|
+
max
|
|
77
|
+
interval
|
|
78
|
+
date_created
|
|
79
|
+
date_updated
|
|
80
|
+
url
|
|
81
|
+
]
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# An array for nullable fields
|
|
85
|
+
def self.nullables
|
|
86
|
+
%w[
|
|
87
|
+
sid
|
|
88
|
+
rate_limit_sid
|
|
89
|
+
service_sid
|
|
90
|
+
account_sid
|
|
91
|
+
date_created
|
|
92
|
+
date_updated
|
|
93
|
+
url
|
|
94
|
+
]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def initialize(sid: SKIP, rate_limit_sid: SKIP, service_sid: SKIP,
|
|
98
|
+
account_sid: SKIP, max: 0, interval: 0, date_created: SKIP,
|
|
99
|
+
date_updated: SKIP, url: SKIP, additional_properties: nil)
|
|
100
|
+
# Add additional model properties to the instance
|
|
101
|
+
additional_properties = {} if additional_properties.nil?
|
|
102
|
+
|
|
103
|
+
@sid = sid unless sid == SKIP
|
|
104
|
+
@rate_limit_sid = rate_limit_sid unless rate_limit_sid == SKIP
|
|
105
|
+
@service_sid = service_sid unless service_sid == SKIP
|
|
106
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
107
|
+
@max = max unless max == SKIP
|
|
108
|
+
@interval = interval unless interval == SKIP
|
|
109
|
+
@date_created = date_created unless date_created == SKIP
|
|
110
|
+
@date_updated = date_updated unless date_updated == SKIP
|
|
111
|
+
@url = url unless url == SKIP
|
|
112
|
+
@additional_properties = additional_properties
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Creates an instance of the object from a hash.
|
|
116
|
+
def self.from_hash(hash)
|
|
117
|
+
return nil unless hash
|
|
118
|
+
|
|
119
|
+
# Extract variables from the hash.
|
|
120
|
+
sid = hash.key?('sid') ? hash['sid'] : SKIP
|
|
121
|
+
rate_limit_sid =
|
|
122
|
+
hash.key?('rate_limit_sid') ? hash['rate_limit_sid'] : SKIP
|
|
123
|
+
service_sid = hash.key?('service_sid') ? hash['service_sid'] : SKIP
|
|
124
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
125
|
+
max = hash['max'] ||= 0
|
|
126
|
+
interval = hash['interval'] ||= 0
|
|
127
|
+
date_created = if hash.key?('date_created')
|
|
128
|
+
(DateTimeHelper.from_rfc3339(hash['date_created']) if hash['date_created'])
|
|
129
|
+
else
|
|
130
|
+
SKIP
|
|
131
|
+
end
|
|
132
|
+
date_updated = if hash.key?('date_updated')
|
|
133
|
+
(DateTimeHelper.from_rfc3339(hash['date_updated']) if hash['date_updated'])
|
|
134
|
+
else
|
|
135
|
+
SKIP
|
|
136
|
+
end
|
|
137
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
138
|
+
|
|
139
|
+
# Create a new hash for additional properties, removing known properties.
|
|
140
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
141
|
+
|
|
142
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
143
|
+
new_hash, proc { |value| value }
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
# Create object from extracted values.
|
|
147
|
+
Bucket.new(sid: sid,
|
|
148
|
+
rate_limit_sid: rate_limit_sid,
|
|
149
|
+
service_sid: service_sid,
|
|
150
|
+
account_sid: account_sid,
|
|
151
|
+
max: max,
|
|
152
|
+
interval: interval,
|
|
153
|
+
date_created: date_created,
|
|
154
|
+
date_updated: date_updated,
|
|
155
|
+
url: url,
|
|
156
|
+
additional_properties: additional_properties)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def to_custom_date_created
|
|
160
|
+
DateTimeHelper.to_rfc3339(date_created)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def to_custom_date_updated
|
|
164
|
+
DateTimeHelper.to_rfc3339(date_updated)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Provides a human-readable string representation of the object.
|
|
168
|
+
def to_s
|
|
169
|
+
class_name = self.class.name.split('::').last
|
|
170
|
+
"<#{class_name} sid: #{@sid}, rate_limit_sid: #{@rate_limit_sid}, service_sid:"\
|
|
171
|
+
" #{@service_sid}, account_sid: #{@account_sid}, max: #{@max}, interval: #{@interval},"\
|
|
172
|
+
" date_created: #{@date_created}, date_updated: #{@date_updated}, url: #{@url},"\
|
|
173
|
+
" additional_properties: #{@additional_properties}>"
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
177
|
+
def inspect
|
|
178
|
+
class_name = self.class.name.split('::').last
|
|
179
|
+
"<#{class_name} sid: #{@sid.inspect}, rate_limit_sid: #{@rate_limit_sid.inspect},"\
|
|
180
|
+
" service_sid: #{@service_sid.inspect}, account_sid: #{@account_sid.inspect}, max:"\
|
|
181
|
+
" #{@max.inspect}, interval: #{@interval.inspect}, date_created: #{@date_created.inspect},"\
|
|
182
|
+
" date_updated: #{@date_updated.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
183
|
+
" #{@additional_properties}>"
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
# BulkConsents Model.
|
|
8
|
+
class BulkConsents < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A list of objects where each object represents the result of processing a
|
|
13
|
+
# `correlation_id`. Each object contains the following fields:
|
|
14
|
+
# `correlation_id`, a unique 32-character UUID that maps the response to the
|
|
15
|
+
# original request; `error_code`, an integer where 0 indicates success and
|
|
16
|
+
# any non-zero value represents an error; and `error_messages`, an array of
|
|
17
|
+
# strings describing specific validation errors encountered. If the request
|
|
18
|
+
# is successful, the error_messages array will be empty.
|
|
19
|
+
# @return [Object]
|
|
20
|
+
attr_accessor :items
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['items'] = 'items'
|
|
26
|
+
@_hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An array for optional fields
|
|
30
|
+
def self.optionals
|
|
31
|
+
%w[
|
|
32
|
+
items
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
%w[
|
|
39
|
+
items
|
|
40
|
+
]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(items: SKIP, additional_properties: nil)
|
|
44
|
+
# Add additional model properties to the instance
|
|
45
|
+
additional_properties = {} if additional_properties.nil?
|
|
46
|
+
|
|
47
|
+
@items = items unless items == SKIP
|
|
48
|
+
@additional_properties = additional_properties
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates an instance of the object from a hash.
|
|
52
|
+
def self.from_hash(hash)
|
|
53
|
+
return nil unless hash
|
|
54
|
+
|
|
55
|
+
# Extract variables from the hash.
|
|
56
|
+
items = hash.key?('items') ? hash['items'] : SKIP
|
|
57
|
+
|
|
58
|
+
# Create a new hash for additional properties, removing known properties.
|
|
59
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
60
|
+
|
|
61
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
62
|
+
new_hash, proc { |value| value }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Create object from extracted values.
|
|
66
|
+
BulkConsents.new(items: items,
|
|
67
|
+
additional_properties: additional_properties)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a human-readable string representation of the object.
|
|
71
|
+
def to_s
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} items: #{@items}, additional_properties: #{@additional_properties}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} items: #{@items.inspect}, additional_properties:"\
|
|
80
|
+
" #{@additional_properties}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
# BulkContacts Model.
|
|
8
|
+
class BulkContacts < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A list of objects where each object represents the result of processing a
|
|
13
|
+
# `correlation_id`. Each object contains the following fields:
|
|
14
|
+
# `correlation_id`, a unique 32-character UUID that maps the response to the
|
|
15
|
+
# original request; `error_code`, an integer where 0 indicates success and
|
|
16
|
+
# any non-zero value represents an error; and `error_messages`, an array of
|
|
17
|
+
# strings describing specific validation errors encountered. If the request
|
|
18
|
+
# is successful, the error_messages array will be empty.
|
|
19
|
+
# @return [Object]
|
|
20
|
+
attr_accessor :items
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['items'] = 'items'
|
|
26
|
+
@_hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An array for optional fields
|
|
30
|
+
def self.optionals
|
|
31
|
+
%w[
|
|
32
|
+
items
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
%w[
|
|
39
|
+
items
|
|
40
|
+
]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(items: SKIP, additional_properties: nil)
|
|
44
|
+
# Add additional model properties to the instance
|
|
45
|
+
additional_properties = {} if additional_properties.nil?
|
|
46
|
+
|
|
47
|
+
@items = items unless items == SKIP
|
|
48
|
+
@additional_properties = additional_properties
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates an instance of the object from a hash.
|
|
52
|
+
def self.from_hash(hash)
|
|
53
|
+
return nil unless hash
|
|
54
|
+
|
|
55
|
+
# Extract variables from the hash.
|
|
56
|
+
items = hash.key?('items') ? hash['items'] : SKIP
|
|
57
|
+
|
|
58
|
+
# Create a new hash for additional properties, removing known properties.
|
|
59
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
60
|
+
|
|
61
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
62
|
+
new_hash, proc { |value| value }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Create object from extracted values.
|
|
66
|
+
BulkContacts.new(items: items,
|
|
67
|
+
additional_properties: additional_properties)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a human-readable string representation of the object.
|
|
71
|
+
def to_s
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} items: #{@items}, additional_properties: #{@additional_properties}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} items: #{@items.inspect}, additional_properties:"\
|
|
80
|
+
" #{@additional_properties}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|