[FEAT]: Adding Copilot for Business support (#2826)

* initial tests and implementation of Copilot for Business client API

* updated billing settings documentation

* renames and refactors - clarity and simplified

* using context to ensure license clean up

* extra documentation and used ApiOptions instead of custom class

* implemented observable clients

* Fixing convention issues

* renaming for clarity

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
This commit is contained in:
Dylan Morley
2024-01-02 21:57:14 +00:00
committed by GitHub
parent 48d061afd2
commit a2a4f09c24
25 changed files with 1161 additions and 2 deletions
+31 -1
View File
@@ -5481,7 +5481,37 @@ namespace Octokit
{
return "orgs/{0}/actions/runner-groups/{1}/repositories".FormatUri(org, runnerGroupId);
}
/// <summary>
/// Returns the <see cref="Uri"/> that handles adding or removing of copilot licenses for an organisation
/// </summary>
/// <param name="org">The name of the organization</param>
/// <returns>A Uri Instance</returns>
public static Uri CopilotBillingLicense(string org)
{
return $"orgs/{org}/copilot/billing/selected_users".FormatUri(org);
}
/// <summary>
/// Returns the <see cref="Uri"/> that handles reading copilot billing settings for an organization
/// </summary>
/// <param name="org">The name of the organization</param>
/// <returns>A Uri Instance</returns>
public static Uri CopilotBillingSettings(string org)
{
return $"orgs/{org}/copilot/billing".FormatUri(org);
}
/// <summary>
/// Returns the <see cref="Uri"/> that allows for searching across all licenses for an organisation
/// </summary>
/// <param name="org"></param>
/// <returns></returns>
public static Uri CopilotAllocatedLicenses(string org)
{
return $"orgs/{org}/copilot/billing/seats".FormatUri(org);
}
public static Uri Codespaces()
{
return _currentUserAllCodespaces;