From 223ac5d6d6370b42e7bb24ea1325b610296fe05a Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Thu, 8 Jan 2026 12:01:08 -0600 Subject: [PATCH 1/8] Add support for retrieving Zoom Phone call queues * Introduces models, interfaces, and resources for Zoom Phone call queues, including CallQueue and CallQueueMember entities. * Adds ICallQueues and CallQueues resource classes with methods to retrieve call queue details, list call queues, and get queue members. * Updates ZoomClient and IZoomClient to expose the new CallQueues resource. * Registers new models in the JSON serializer context. --- Source/ZoomNet/IZoomClient.cs | 5 ++ .../Json/ZoomNetJsonSerializerContext.cs | 8 ++ Source/ZoomNet/Models/CallQueue.cs | 74 +++++++++++++++++++ Source/ZoomNet/Models/CallQueueMember.cs | 22 ++++++ Source/ZoomNet/Resources/CallQueues.cs | 60 +++++++++++++++ Source/ZoomNet/Resources/ICallQueues.cs | 46 ++++++++++++ Source/ZoomNet/ZoomClient.cs | 4 + 7 files changed, 219 insertions(+) create mode 100644 Source/ZoomNet/Models/CallQueue.cs create mode 100644 Source/ZoomNet/Models/CallQueueMember.cs create mode 100644 Source/ZoomNet/Resources/CallQueues.cs create mode 100644 Source/ZoomNet/Resources/ICallQueues.cs diff --git a/Source/ZoomNet/IZoomClient.cs b/Source/ZoomNet/IZoomClient.cs index 792429862..2bb8451e5 100644 --- a/Source/ZoomNet/IZoomClient.cs +++ b/Source/ZoomNet/IZoomClient.cs @@ -121,6 +121,11 @@ public interface IZoomClient /// IWebinars Webinars { get; } + /// + /// Gets the resource which allows you to manage call queues. + /// + ICallQueues CallQueues { get; } + /// /// Determines if the specified scopes have been granted. /// diff --git a/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs b/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs index ed767869f..916fdd6f7 100644 --- a/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs +++ b/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs @@ -87,6 +87,10 @@ namespace ZoomNet.Json [JsonSerializable(typeof(ZoomNet.Models.CallLogTransferInfoExtensionType))] [JsonSerializable(typeof(ZoomNet.Models.CallLogTransferInfoNumberType))] [JsonSerializable(typeof(ZoomNet.Models.CallLogType))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueue))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueuePhoneNumber))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueSite))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueMember))] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotAction), TypeInfoPropertyName = "ChatbotMessageChatbotAction")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActions), TypeInfoPropertyName = "ChatbotMessageChatbotActions")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActionStyle), TypeInfoPropertyName = "ChatbotMessageChatbotActionStyle")] @@ -870,6 +874,10 @@ namespace ZoomNet.Json [JsonSerializable(typeof(ZoomNet.Models.CallLogTransferInfoExtensionType[]))] [JsonSerializable(typeof(ZoomNet.Models.CallLogTransferInfoNumberType[]))] [JsonSerializable(typeof(ZoomNet.Models.CallLogType[]))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueue[]))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueuePhoneNumber[]))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueSite[]))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueMember[]))] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotAction[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionArray")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActions[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionsArray")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActionStyle[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionStyleArray")] diff --git a/Source/ZoomNet/Models/CallQueue.cs b/Source/ZoomNet/Models/CallQueue.cs new file mode 100644 index 000000000..4f7b4b5a2 --- /dev/null +++ b/Source/ZoomNet/Models/CallQueue.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace ZoomNet.Models +{ + /// + /// A Call Queue. + /// + public class CallQueue + { + /// + /// Gets or sets the extension id. + /// + [JsonPropertyName("extension_id")] + public string ExtensionId { get; set; } + + /// + /// Gets or sets the extension number. + /// + [JsonPropertyName("extension_number")] + public long? ExtensionNumber { get; set; } + + /// + /// Gets or sets the unique identifier of the call queue. + /// + [JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// Gets or sets the name of the call queue. + /// + [JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// Gets or sets the phone numbers assigned to the call queue. + /// + [JsonPropertyName("phone_numbers")] + public List PhoneNumbers { get; set; } + + /// + /// Gets or sets the site information. + /// + [JsonPropertyName("site")] + public CallQueueSite Site { get; set; } + + /// + /// Gets or sets the status of the call queue. + /// + [JsonPropertyName("status")] + public string Status { get; set; } + } + + public class CallQueuePhoneNumber + { + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("number")] + public string Number { get; set; } + + [JsonPropertyName("source")] + public string Source { get; set; } + } + + public class CallQueueSite + { + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + } +} diff --git a/Source/ZoomNet/Models/CallQueueMember.cs b/Source/ZoomNet/Models/CallQueueMember.cs new file mode 100644 index 000000000..fd25f9079 --- /dev/null +++ b/Source/ZoomNet/Models/CallQueueMember.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; + +namespace ZoomNet.Models +{ + public class CallQueueMember + { + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("level")] + public string Level { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("receive_call")] + public bool ReceiveCall { get; set; } + + [JsonPropertyName("extension_id")] + public string ExtensionId { get; set; } + } +} diff --git a/Source/ZoomNet/Resources/CallQueues.cs b/Source/ZoomNet/Resources/CallQueues.cs new file mode 100644 index 000000000..581bc06bd --- /dev/null +++ b/Source/ZoomNet/Resources/CallQueues.cs @@ -0,0 +1,60 @@ +using Pathoschild.Http.Client; +using System.Threading; +using System.Threading.Tasks; +using ZoomNet.Models; +using ZoomNet.Utilities; + +namespace ZoomNet.Resources +{ + /// + public class CallQueues : ICallQueues + { + private readonly IClient _client; + + /// + /// Initializes a new instance of the class. + /// + /// The HTTP client. + internal CallQueues(IClient client) + { + _client = client; + } + + /// + public Task GetAsync(string callQueueId, CancellationToken cancellationToken = default) + { + return _client + .GetAsync($"phone/call_queues/{callQueueId}") + .WithCancellationToken(cancellationToken) + .AsObject(); + } + + /// + public Task> GetAllAsync(string department = null, string cost_center = null, string site_id = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + Utils.ValidateRecordPerPage(recordsPerPage, max: 100); + + return _client + .GetAsync($"phone/call_queues") + .WithArgument("department", department) + .WithArgument("cost_center", cost_center) + .WithArgument("site_id", site_id) + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("call_queues"); + } + + /// + public Task> GetMembersAsync(string callQueueId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + Utils.ValidateRecordPerPage(recordsPerPage); + return _client + .GetAsync($"phone/call_queues/{callQueueId}/members") + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("call_queue_members"); + } + } +} diff --git a/Source/ZoomNet/Resources/ICallQueues.cs b/Source/ZoomNet/Resources/ICallQueues.cs new file mode 100644 index 000000000..af2d91243 --- /dev/null +++ b/Source/ZoomNet/Resources/ICallQueues.cs @@ -0,0 +1,46 @@ +using System.Threading; +using System.Threading.Tasks; +using ZoomNet.Models; + +namespace ZoomNet.Resources +{ + /// + /// Allows you to manage call queues. + /// + public interface ICallQueues + { + + /// + /// Get call queue details. + /// + /// The ID of the call queue. + /// The cancellation token. + /// + /// Details about a . + /// + public Task GetAsync(string callQueueId, CancellationToken cancellationToken = default); + /// + /// Get call queues. + /// + /// Filter by department. + /// Filter by cost center. + /// Filter by site id. + /// The number of records to return. + /// The paging token. + /// The cancellation token. + /// + /// A paginated response of . + /// + public Task> GetAllAsync(string department = null, string cost_center = null, string site_id = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + + /// + /// Get members currently in call queues. + /// + /// The ID of the call queue. + /// The number of records to return. + /// The paging token. + /// The cancellation token. + /// An array of current call queue membership entries. + public Task> GetMembersAsync(string callQueueId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + } +} diff --git a/Source/ZoomNet/ZoomClient.cs b/Source/ZoomNet/ZoomClient.cs index c1e91dbf3..cd1cbf210 100644 --- a/Source/ZoomNet/ZoomClient.cs +++ b/Source/ZoomNet/ZoomClient.cs @@ -130,6 +130,9 @@ public static string Version /// public IWebinars Webinars { get; private set; } + /// + public ICallQueues CallQueues { get; private set; } + #endregion #region CTOR @@ -245,6 +248,7 @@ private ZoomClient(IConnectionInfo connectionInfo, HttpClient httpClient, bool d TrackingFields = new TrackingFields(_fluentClient); Users = new Users(_fluentClient); Webinars = new Webinars(_fluentClient); + CallQueues = new CallQueues(_fluentClient); } /// From 97597f7a8d54a29acd2366c3aa2c79084f56cf2d Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Thu, 8 Jan 2026 12:15:09 -0600 Subject: [PATCH 2/8] Refactor CallQueue models and added missing documentation Moved CallQueuePhoneNumber and CallQueueSite to separate files and added XML documentation to CallQueueMember, CallQueuePhoneNumber, and CallQueueSite classes for improved clarity and maintainability. --- Source/ZoomNet/Models/CallQueue.cs | 21 ------------ Source/ZoomNet/Models/CallQueueMember.cs | 18 ++++++++++ Source/ZoomNet/Models/CallQueuePhoneNumber.cs | 33 +++++++++++++++++++ Source/ZoomNet/Models/CallQueueSite.cs | 27 +++++++++++++++ 4 files changed, 78 insertions(+), 21 deletions(-) create mode 100644 Source/ZoomNet/Models/CallQueuePhoneNumber.cs create mode 100644 Source/ZoomNet/Models/CallQueueSite.cs diff --git a/Source/ZoomNet/Models/CallQueue.cs b/Source/ZoomNet/Models/CallQueue.cs index 4f7b4b5a2..778b49924 100644 --- a/Source/ZoomNet/Models/CallQueue.cs +++ b/Source/ZoomNet/Models/CallQueue.cs @@ -50,25 +50,4 @@ public class CallQueue [JsonPropertyName("status")] public string Status { get; set; } } - - public class CallQueuePhoneNumber - { - [JsonPropertyName("id")] - public string Id { get; set; } - - [JsonPropertyName("number")] - public string Number { get; set; } - - [JsonPropertyName("source")] - public string Source { get; set; } - } - - public class CallQueueSite - { - [JsonPropertyName("id")] - public string Id { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - } } diff --git a/Source/ZoomNet/Models/CallQueueMember.cs b/Source/ZoomNet/Models/CallQueueMember.cs index fd25f9079..e259cfa82 100644 --- a/Source/ZoomNet/Models/CallQueueMember.cs +++ b/Source/ZoomNet/Models/CallQueueMember.cs @@ -2,20 +2,38 @@ namespace ZoomNet.Models { + /// + /// Represents a member of a call queue, which can be a user or a common area. + /// public class CallQueueMember { + /// + /// Gets or sets the member id. + /// [JsonPropertyName("id")] public string Id { get; set; } + /// + /// Gets or sets the level of the member. + /// [JsonPropertyName("level")] public string Level { get; set; } + /// + /// Gets or sets the name of the user or common area. + /// [JsonPropertyName("name")] public string Name { get; set; } + /// + /// Gets or sets a value indicating whether the user can receive calls. It displays if the level is user. + /// [JsonPropertyName("receive_call")] public bool ReceiveCall { get; set; } + /// + /// Gets or sets the extension ID of the user or common area. + /// [JsonPropertyName("extension_id")] public string ExtensionId { get; set; } } diff --git a/Source/ZoomNet/Models/CallQueuePhoneNumber.cs b/Source/ZoomNet/Models/CallQueuePhoneNumber.cs new file mode 100644 index 000000000..ddb6361fb --- /dev/null +++ b/Source/ZoomNet/Models/CallQueuePhoneNumber.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace ZoomNet.Models +{ + /// + /// Represents a phone number assigned to a call queue. + /// + public class CallQueuePhoneNumber + { + /// + /// Gets or sets the unique identifier of the phone number. + /// + [JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// Gets or sets the phone number. + /// + [JsonPropertyName("number")] + public string Number { get; set; } + + /// + /// gets or sets the source of the phone number. + /// + [JsonPropertyName("source")] + public string Source { get; set; } + } +} diff --git a/Source/ZoomNet/Models/CallQueueSite.cs b/Source/ZoomNet/Models/CallQueueSite.cs new file mode 100644 index 000000000..fb59b0464 --- /dev/null +++ b/Source/ZoomNet/Models/CallQueueSite.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace ZoomNet.Models +{ + /// + /// Represents a site where a Call Queue is assigned. + /// + public class CallQueueSite + { + /// + /// Gets or sets the Unique identifier of the site where the Call Queue is assigned. + /// + [JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// Gets or sets the name of the site. + /// + [JsonPropertyName("name")] + public string Name { get; set; } + } +} From 4e41e74a048e3897a199c0873e8e62e22e6a082b Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Thu, 8 Jan 2026 12:33:32 -0600 Subject: [PATCH 3/8] Formatting Fixes for ICallQueues.cs --- Source/ZoomNet/Resources/ICallQueues.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ZoomNet/Resources/ICallQueues.cs b/Source/ZoomNet/Resources/ICallQueues.cs index af2d91243..873f70071 100644 --- a/Source/ZoomNet/Resources/ICallQueues.cs +++ b/Source/ZoomNet/Resources/ICallQueues.cs @@ -9,7 +9,6 @@ namespace ZoomNet.Resources /// public interface ICallQueues { - /// /// Get call queue details. /// @@ -19,6 +18,7 @@ public interface ICallQueues /// Details about a . /// public Task GetAsync(string callQueueId, CancellationToken cancellationToken = default); + /// /// Get call queues. /// From d08558622d1c6977d6af6fbb02ed6ee4d71d23f7 Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Tue, 3 Feb 2026 15:07:42 -0600 Subject: [PATCH 4/8] Use Site model and rename call queue params - Use the existing Site type for CallQueue.Site - Update ICallQueues and CallQueues parameters and docs from snake_case (cost_center, site_id) to camelCase (costCenter, siteId) --- Source/ZoomNet/Models/CallQueue.cs | 2 +- Source/ZoomNet/Models/CallQueueSite.cs | 27 ------------------------- Source/ZoomNet/Resources/CallQueues.cs | 6 +++--- Source/ZoomNet/Resources/ICallQueues.cs | 6 +++--- 4 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 Source/ZoomNet/Models/CallQueueSite.cs diff --git a/Source/ZoomNet/Models/CallQueue.cs b/Source/ZoomNet/Models/CallQueue.cs index 778b49924..4b117bd1e 100644 --- a/Source/ZoomNet/Models/CallQueue.cs +++ b/Source/ZoomNet/Models/CallQueue.cs @@ -42,7 +42,7 @@ public class CallQueue /// Gets or sets the site information. /// [JsonPropertyName("site")] - public CallQueueSite Site { get; set; } + public Site Site { get; set; } /// /// Gets or sets the status of the call queue. diff --git a/Source/ZoomNet/Models/CallQueueSite.cs b/Source/ZoomNet/Models/CallQueueSite.cs deleted file mode 100644 index fb59b0464..000000000 --- a/Source/ZoomNet/Models/CallQueueSite.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace ZoomNet.Models -{ - /// - /// Represents a site where a Call Queue is assigned. - /// - public class CallQueueSite - { - /// - /// Gets or sets the Unique identifier of the site where the Call Queue is assigned. - /// - [JsonPropertyName("id")] - public string Id { get; set; } - - /// - /// Gets or sets the name of the site. - /// - [JsonPropertyName("name")] - public string Name { get; set; } - } -} diff --git a/Source/ZoomNet/Resources/CallQueues.cs b/Source/ZoomNet/Resources/CallQueues.cs index 581bc06bd..9976af606 100644 --- a/Source/ZoomNet/Resources/CallQueues.cs +++ b/Source/ZoomNet/Resources/CallQueues.cs @@ -30,15 +30,15 @@ public Task GetAsync(string callQueueId, CancellationToken cancellati } /// - public Task> GetAllAsync(string department = null, string cost_center = null, string site_id = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + public Task> GetAllAsync(string department = null, string costCenter = null, string siteId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) { Utils.ValidateRecordPerPage(recordsPerPage, max: 100); return _client .GetAsync($"phone/call_queues") .WithArgument("department", department) - .WithArgument("cost_center", cost_center) - .WithArgument("site_id", site_id) + .WithArgument("cost_center", costCenter) + .WithArgument("site_id", siteId) .WithArgument("page_size", recordsPerPage) .WithArgument("next_page_token", pagingToken) .WithCancellationToken(cancellationToken) diff --git a/Source/ZoomNet/Resources/ICallQueues.cs b/Source/ZoomNet/Resources/ICallQueues.cs index 873f70071..84c20c866 100644 --- a/Source/ZoomNet/Resources/ICallQueues.cs +++ b/Source/ZoomNet/Resources/ICallQueues.cs @@ -23,15 +23,15 @@ public interface ICallQueues /// Get call queues. /// /// Filter by department. - /// Filter by cost center. - /// Filter by site id. + /// Filter by cost center. + /// Filter by site id. /// The number of records to return. /// The paging token. /// The cancellation token. /// /// A paginated response of . /// - public Task> GetAllAsync(string department = null, string cost_center = null, string site_id = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + public Task> GetAllAsync(string department = null, string costCenter = null, string siteId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); /// /// Get members currently in call queues. From 273a31a81b355636934d2d982ce5ee767f88497f Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Tue, 3 Feb 2026 15:23:01 -0600 Subject: [PATCH 5/8] Move call queues into Phone resource Remove separate CallQueues/ICallQueues resources and integrate call-queue endpoints into the existing Phone API. --- Source/ZoomNet/Resources/CallQueues.cs | 60 ------------------------- Source/ZoomNet/Resources/ICallQueues.cs | 46 ------------------- Source/ZoomNet/Resources/IPhone.cs | 36 +++++++++++++++ Source/ZoomNet/Resources/Phone.cs | 39 ++++++++++++++++ 4 files changed, 75 insertions(+), 106 deletions(-) delete mode 100644 Source/ZoomNet/Resources/CallQueues.cs delete mode 100644 Source/ZoomNet/Resources/ICallQueues.cs diff --git a/Source/ZoomNet/Resources/CallQueues.cs b/Source/ZoomNet/Resources/CallQueues.cs deleted file mode 100644 index 9976af606..000000000 --- a/Source/ZoomNet/Resources/CallQueues.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Pathoschild.Http.Client; -using System.Threading; -using System.Threading.Tasks; -using ZoomNet.Models; -using ZoomNet.Utilities; - -namespace ZoomNet.Resources -{ - /// - public class CallQueues : ICallQueues - { - private readonly IClient _client; - - /// - /// Initializes a new instance of the class. - /// - /// The HTTP client. - internal CallQueues(IClient client) - { - _client = client; - } - - /// - public Task GetAsync(string callQueueId, CancellationToken cancellationToken = default) - { - return _client - .GetAsync($"phone/call_queues/{callQueueId}") - .WithCancellationToken(cancellationToken) - .AsObject(); - } - - /// - public Task> GetAllAsync(string department = null, string costCenter = null, string siteId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) - { - Utils.ValidateRecordPerPage(recordsPerPage, max: 100); - - return _client - .GetAsync($"phone/call_queues") - .WithArgument("department", department) - .WithArgument("cost_center", costCenter) - .WithArgument("site_id", siteId) - .WithArgument("page_size", recordsPerPage) - .WithArgument("next_page_token", pagingToken) - .WithCancellationToken(cancellationToken) - .AsPaginatedResponseWithToken("call_queues"); - } - - /// - public Task> GetMembersAsync(string callQueueId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) - { - Utils.ValidateRecordPerPage(recordsPerPage); - return _client - .GetAsync($"phone/call_queues/{callQueueId}/members") - .WithArgument("page_size", recordsPerPage) - .WithArgument("next_page_token", pagingToken) - .WithCancellationToken(cancellationToken) - .AsPaginatedResponseWithToken("call_queue_members"); - } - } -} diff --git a/Source/ZoomNet/Resources/ICallQueues.cs b/Source/ZoomNet/Resources/ICallQueues.cs deleted file mode 100644 index 84c20c866..000000000 --- a/Source/ZoomNet/Resources/ICallQueues.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using ZoomNet.Models; - -namespace ZoomNet.Resources -{ - /// - /// Allows you to manage call queues. - /// - public interface ICallQueues - { - /// - /// Get call queue details. - /// - /// The ID of the call queue. - /// The cancellation token. - /// - /// Details about a . - /// - public Task GetAsync(string callQueueId, CancellationToken cancellationToken = default); - - /// - /// Get call queues. - /// - /// Filter by department. - /// Filter by cost center. - /// Filter by site id. - /// The number of records to return. - /// The paging token. - /// The cancellation token. - /// - /// A paginated response of . - /// - public Task> GetAllAsync(string department = null, string costCenter = null, string siteId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); - - /// - /// Get members currently in call queues. - /// - /// The ID of the call queue. - /// The number of records to return. - /// The paging token. - /// The cancellation token. - /// An array of current call queue membership entries. - public Task> GetMembersAsync(string callQueueId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); - } -} diff --git a/Source/ZoomNet/Resources/IPhone.cs b/Source/ZoomNet/Resources/IPhone.cs index 25fe37bc7..3ad36143d 100644 --- a/Source/ZoomNet/Resources/IPhone.cs +++ b/Source/ZoomNet/Resources/IPhone.cs @@ -141,5 +141,41 @@ Task UpdateCallHandlingSettingsAsync( CancellationToken cancellationToken); #endregion + + #region Call Queues Endpoints + /// + /// Get call queue details. + /// + /// The ID of the call queue. + /// The cancellation token. + /// + /// Details about a . + /// + public Task GetCallQueueAsync(string callQueueId, CancellationToken cancellationToken = default); + + /// + /// Get call queues. + /// + /// Filter by department. + /// Filter by cost center. + /// Filter by site id. + /// The number of records to return. + /// The paging token. + /// The cancellation token. + /// + /// A paginated response of . + /// + public Task> GetAllCallQueuesAsync(string department = null, string costCenter = null, string siteId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + + /// + /// Get members currently in call queues. + /// + /// The ID of the call queue. + /// The number of records to return. + /// The paging token. + /// The cancellation token. + /// An array of current call queue membership entries. + public Task> GetCallQueueMembersAsync(string callQueueId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default); + #endregion } } diff --git a/Source/ZoomNet/Resources/Phone.cs b/Source/ZoomNet/Resources/Phone.cs index 281c81067..ae39e4a2c 100644 --- a/Source/ZoomNet/Resources/Phone.cs +++ b/Source/ZoomNet/Resources/Phone.cs @@ -124,5 +124,44 @@ public Task UpdateCallHandlingSettingsAsync( .WithCancellationToken(cancellationToken) .AsMessage(); } + + #region Call Queues + /// + public Task GetCallQueueAsync(string callQueueId, CancellationToken cancellationToken = default) + { + return _client + .GetAsync($"phone/call_queues/{callQueueId}") + .WithCancellationToken(cancellationToken) + .AsObject(); + } + + /// + public Task> GetAllCallQueuesAsync(string department = null, string costCenter = null, string siteId = null, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + Utils.ValidateRecordPerPage(recordsPerPage, max: 100); + + return _client + .GetAsync($"phone/call_queues") + .WithArgument("department", department) + .WithArgument("cost_center", costCenter) + .WithArgument("site_id", siteId) + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("call_queues"); + } + + /// + public Task> GetCallQueueMembersAsync(string callQueueId, int recordsPerPage = 30, string pagingToken = null, CancellationToken cancellationToken = default) + { + Utils.ValidateRecordPerPage(recordsPerPage); + return _client + .GetAsync($"phone/call_queues/{callQueueId}/members") + .WithArgument("page_size", recordsPerPage) + .WithArgument("next_page_token", pagingToken) + .WithCancellationToken(cancellationToken) + .AsPaginatedResponseWithToken("call_queue_members"); + } + #endregion } } From d30f6070ffa8e44a89c7bbf24c09976f3c45c997 Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Wed, 4 Feb 2026 12:19:27 -0600 Subject: [PATCH 6/8] Add CallQueueStatus; remove CallQueues property - Introduce a new CallQueueStatus enum (active/inactive) to represent call queue state and add it to the JSON serializer context. - Remove the ICallQueues API surface from IZoomClient and the CallQueues initialization from ZoomClient, reflecting removal of the CallQueues resource from the client implementation. - Removed no longer needed CallQueueSite references in ZoomNetJsonSerializerContex --- Source/ZoomNet/IZoomClient.cs | 5 ----- .../Json/ZoomNetJsonSerializerContext.cs | 4 ++-- Source/ZoomNet/Models/CallQueueStatus.cs | 21 +++++++++++++++++++ Source/ZoomNet/ZoomClient.cs | 4 ---- 4 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 Source/ZoomNet/Models/CallQueueStatus.cs diff --git a/Source/ZoomNet/IZoomClient.cs b/Source/ZoomNet/IZoomClient.cs index 2bb8451e5..792429862 100644 --- a/Source/ZoomNet/IZoomClient.cs +++ b/Source/ZoomNet/IZoomClient.cs @@ -121,11 +121,6 @@ public interface IZoomClient /// IWebinars Webinars { get; } - /// - /// Gets the resource which allows you to manage call queues. - /// - ICallQueues CallQueues { get; } - /// /// Determines if the specified scopes have been granted. /// diff --git a/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs b/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs index 916fdd6f7..9e27cf1b6 100644 --- a/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs +++ b/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs @@ -89,7 +89,7 @@ namespace ZoomNet.Json [JsonSerializable(typeof(ZoomNet.Models.CallLogType))] [JsonSerializable(typeof(ZoomNet.Models.CallQueue))] [JsonSerializable(typeof(ZoomNet.Models.CallQueuePhoneNumber))] - [JsonSerializable(typeof(ZoomNet.Models.CallQueueSite))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueStatus))] [JsonSerializable(typeof(ZoomNet.Models.CallQueueMember))] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotAction), TypeInfoPropertyName = "ChatbotMessageChatbotAction")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActions), TypeInfoPropertyName = "ChatbotMessageChatbotActions")] @@ -876,7 +876,7 @@ namespace ZoomNet.Json [JsonSerializable(typeof(ZoomNet.Models.CallLogType[]))] [JsonSerializable(typeof(ZoomNet.Models.CallQueue[]))] [JsonSerializable(typeof(ZoomNet.Models.CallQueuePhoneNumber[]))] - [JsonSerializable(typeof(ZoomNet.Models.CallQueueSite[]))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueStatus[]))] [JsonSerializable(typeof(ZoomNet.Models.CallQueueMember[]))] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotAction[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionArray")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActions[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionsArray")] diff --git a/Source/ZoomNet/Models/CallQueueStatus.cs b/Source/ZoomNet/Models/CallQueueStatus.cs new file mode 100644 index 000000000..01aca8405 --- /dev/null +++ b/Source/ZoomNet/Models/CallQueueStatus.cs @@ -0,0 +1,21 @@ +using System.Runtime.Serialization; + +namespace ZoomNet.Models; + +/// +/// Represents the status of a Call Queue. +/// +public enum CallQueueStatus +{ + /// + /// An active call queue. + /// + [EnumMember(Value = "active")] + Active, + + /// + /// Call queue has been deactivated. + /// + [EnumMember(Value = "inactive")] + Inactive +} diff --git a/Source/ZoomNet/ZoomClient.cs b/Source/ZoomNet/ZoomClient.cs index cd1cbf210..c1e91dbf3 100644 --- a/Source/ZoomNet/ZoomClient.cs +++ b/Source/ZoomNet/ZoomClient.cs @@ -130,9 +130,6 @@ public static string Version /// public IWebinars Webinars { get; private set; } - /// - public ICallQueues CallQueues { get; private set; } - #endregion #region CTOR @@ -248,7 +245,6 @@ private ZoomClient(IConnectionInfo connectionInfo, HttpClient httpClient, bool d TrackingFields = new TrackingFields(_fluentClient); Users = new Users(_fluentClient); Webinars = new Webinars(_fluentClient); - CallQueues = new CallQueues(_fluentClient); } /// From 041d5612b8a68442cd9a1fb9152be304680eb232 Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Wed, 4 Feb 2026 12:27:59 -0600 Subject: [PATCH 7/8] Use CallQueueStatus enum for Status property - Change the CallQueue.Status property from string to CallQueueStatus enum. --- Source/ZoomNet/Models/CallQueue.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ZoomNet/Models/CallQueue.cs b/Source/ZoomNet/Models/CallQueue.cs index 4b117bd1e..873f770a4 100644 --- a/Source/ZoomNet/Models/CallQueue.cs +++ b/Source/ZoomNet/Models/CallQueue.cs @@ -48,6 +48,6 @@ public class CallQueue /// Gets or sets the status of the call queue. /// [JsonPropertyName("status")] - public string Status { get; set; } + public CallQueueStatus Status { get; set; } } } From 6356ed3cc4e987439ff8210df6b7d2dc646db850 Mon Sep 17 00:00:00 2001 From: Macgyver Hoferkamp Date: Wed, 4 Feb 2026 12:34:30 -0600 Subject: [PATCH 8/8] Add CallQueueNumberSource enum and use in model - Introduce CallQueueNumberSource enum (internal/external) with EnumMember values and replace CallQueuePhoneNumber.Source string with this enum for stronger typing. - Register the new enum type and its array in ZoomNetJsonSerializerContext to enable proper JSON (de)serialization. --- .../Json/ZoomNetJsonSerializerContext.cs | 2 ++ .../ZoomNet/Models/CallQueueNumberSource.cs | 22 +++++++++++++++++++ Source/ZoomNet/Models/CallQueuePhoneNumber.cs | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Source/ZoomNet/Models/CallQueueNumberSource.cs diff --git a/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs b/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs index 9e27cf1b6..9b9502844 100644 --- a/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs +++ b/Source/ZoomNet/Json/ZoomNetJsonSerializerContext.cs @@ -91,6 +91,7 @@ namespace ZoomNet.Json [JsonSerializable(typeof(ZoomNet.Models.CallQueuePhoneNumber))] [JsonSerializable(typeof(ZoomNet.Models.CallQueueStatus))] [JsonSerializable(typeof(ZoomNet.Models.CallQueueMember))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueNumberSource))] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotAction), TypeInfoPropertyName = "ChatbotMessageChatbotAction")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActions), TypeInfoPropertyName = "ChatbotMessageChatbotActions")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActionStyle), TypeInfoPropertyName = "ChatbotMessageChatbotActionStyle")] @@ -878,6 +879,7 @@ namespace ZoomNet.Json [JsonSerializable(typeof(ZoomNet.Models.CallQueuePhoneNumber[]))] [JsonSerializable(typeof(ZoomNet.Models.CallQueueStatus[]))] [JsonSerializable(typeof(ZoomNet.Models.CallQueueMember[]))] + [JsonSerializable(typeof(ZoomNet.Models.CallQueueNumberSource[]))] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotAction[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionArray")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActions[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionsArray")] [JsonSerializable(typeof(ZoomNet.Models.ChatbotMessage.ChatbotActionStyle[]), TypeInfoPropertyName = "ChatbotMessageChatbotActionStyleArray")] diff --git a/Source/ZoomNet/Models/CallQueueNumberSource.cs b/Source/ZoomNet/Models/CallQueueNumberSource.cs new file mode 100644 index 000000000..7c2dee810 --- /dev/null +++ b/Source/ZoomNet/Models/CallQueueNumberSource.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; + +namespace ZoomNet.Models +{ + /// + /// Enumeration to indicate the source of callee/caller number. + /// + public enum CallQueueNumberSource + { + /// + /// internal + /// + [EnumMember(Value = "internal")] + Internal, + + /// + /// external + /// + [EnumMember(Value = "external")] + External + } +} diff --git a/Source/ZoomNet/Models/CallQueuePhoneNumber.cs b/Source/ZoomNet/Models/CallQueuePhoneNumber.cs index ddb6361fb..879d1229c 100644 --- a/Source/ZoomNet/Models/CallQueuePhoneNumber.cs +++ b/Source/ZoomNet/Models/CallQueuePhoneNumber.cs @@ -28,6 +28,6 @@ public class CallQueuePhoneNumber /// gets or sets the source of the phone number. /// [JsonPropertyName("source")] - public string Source { get; set; } + public CallQueueNumberSource Source { get; set; } } }