-
Notifications
You must be signed in to change notification settings - Fork 52
Add support for retrieving Zoom Phone call queues #468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MacgyverH
wants to merge
8
commits into
Jericho:develop
Choose a base branch
from
MacgyverH:feature-CallQueues
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
223ac5d
Add support for retrieving Zoom Phone call queues
MacgyverH 97597f7
Refactor CallQueue models and added missing documentation
MacgyverH 4e41e74
Formatting Fixes for ICallQueues.cs
MacgyverH d085586
Use Site model and rename call queue params
MacgyverH 273a31a
Move call queues into Phone resource
MacgyverH d30f607
Add CallQueueStatus; remove CallQueues property
MacgyverH 041d561
Use CallQueueStatus enum for Status property
MacgyverH 6356ed3
Add CallQueueNumberSource enum and use in model
MacgyverH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| using System.Collections.Generic; | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace ZoomNet.Models | ||
| { | ||
| /// <summary> | ||
| /// A Call Queue. | ||
| /// </summary> | ||
| public class CallQueue | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the extension id. | ||
| /// </summary> | ||
| [JsonPropertyName("extension_id")] | ||
| public string ExtensionId { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the extension number. | ||
| /// </summary> | ||
| [JsonPropertyName("extension_number")] | ||
| public long? ExtensionNumber { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the unique identifier of the call queue. | ||
| /// </summary> | ||
| [JsonPropertyName("id")] | ||
| public string Id { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the name of the call queue. | ||
| /// </summary> | ||
| [JsonPropertyName("name")] | ||
| public string Name { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the phone numbers assigned to the call queue. | ||
| /// </summary> | ||
| [JsonPropertyName("phone_numbers")] | ||
| public List<CallQueuePhoneNumber> PhoneNumbers { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the site information. | ||
| /// </summary> | ||
| [JsonPropertyName("site")] | ||
| public Site Site { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the status of the call queue. | ||
| /// </summary> | ||
| [JsonPropertyName("status")] | ||
| public CallQueueStatus Status { get; set; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace ZoomNet.Models | ||
| { | ||
| /// <summary> | ||
| /// Represents a member of a call queue, which can be a user or a common area. | ||
| /// </summary> | ||
| public class CallQueueMember | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the member id. | ||
| /// </summary> | ||
| [JsonPropertyName("id")] | ||
| public string Id { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the level of the member. | ||
| /// </summary> | ||
| [JsonPropertyName("level")] | ||
| public string Level { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the name of the user or common area. | ||
| /// </summary> | ||
| [JsonPropertyName("name")] | ||
| public string Name { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets a value indicating whether the user can receive calls. It displays if the level is user. | ||
| /// </summary> | ||
| [JsonPropertyName("receive_call")] | ||
| public bool ReceiveCall { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the extension ID of the user or common area. | ||
| /// </summary> | ||
| [JsonPropertyName("extension_id")] | ||
| public string ExtensionId { get; set; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| using System.Runtime.Serialization; | ||
|
|
||
| namespace ZoomNet.Models | ||
| { | ||
| /// <summary> | ||
| /// Enumeration to indicate the source of callee/caller number. | ||
| /// </summary> | ||
| public enum CallQueueNumberSource | ||
| { | ||
| /// <summary> | ||
| /// internal | ||
| /// </summary> | ||
| [EnumMember(Value = "internal")] | ||
| Internal, | ||
|
|
||
| /// <summary> | ||
| /// external | ||
| /// </summary> | ||
| [EnumMember(Value = "external")] | ||
| External | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| { | ||
| /// <summary> | ||
| /// Represents a phone number assigned to a call queue. | ||
| /// </summary> | ||
| public class CallQueuePhoneNumber | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the unique identifier of the phone number. | ||
| /// </summary> | ||
| [JsonPropertyName("id")] | ||
| public string Id { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the phone number. | ||
| /// </summary> | ||
| [JsonPropertyName("number")] | ||
| public string Number { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// gets or sets the source of the phone number. | ||
| /// </summary> | ||
| [JsonPropertyName("source")] | ||
| public CallQueueNumberSource Source { get; set; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| using System.Runtime.Serialization; | ||
|
|
||
| namespace ZoomNet.Models; | ||
|
|
||
| /// <summary> | ||
| /// Represents the status of a Call Queue. | ||
| /// </summary> | ||
| public enum CallQueueStatus | ||
| { | ||
| /// <summary> | ||
| /// An active call queue. | ||
| /// </summary> | ||
| [EnumMember(Value = "active")] | ||
| Active, | ||
|
|
||
| /// <summary> | ||
| /// Call queue has been deactivated. | ||
| /// </summary> | ||
| [EnumMember(Value = "inactive")] | ||
| Inactive | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that (according to the specification) this endpoint provides more details about the requested call queue. So we can define CallQueueDetails inherited from CallQueue and add more properties there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll compare and add the missing properties to the new class as suggested.