feat: Add enterprise billing usage endpoints and response types#4288
Open
maishivamhoo123 wants to merge 6 commits into
Open
feat: Add enterprise billing usage endpoints and response types#4288maishivamhoo123 wants to merge 6 commits into
maishivamhoo123 wants to merge 6 commits into
Conversation
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
alexandear
reviewed
Jun 8, 2026
| // GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/usage?apiVersion=2022-11-28#get-billing-usage-report-for-an-enterprise | ||
| // | ||
| //meta:operation GET /enterprises/{enterprise}/settings/billing/usage | ||
| func (s *BillingService) GetEnterpriseUsageReport(ctx context.Context, enterprise string, opts *EnterpriseUsageReportOptions) (*EnterpriseUsageReport, *Response, error) { |
Contributor
There was a problem hiding this comment.
Suggested change
| func (s *BillingService) GetEnterpriseUsageReport(ctx context.Context, enterprise string, opts *EnterpriseUsageReportOptions) (*EnterpriseUsageReport, *Response, error) { | |
| func (s *EnterpriseService) GetUsageReport(ctx context.Context, enterprise string, opts *EnterpriseUsageReportOptions) (*EnterpriseUsageReport, *Response, error) { |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4288 +/- ##
==========================================
- Coverage 97.49% 97.38% -0.11%
==========================================
Files 192 193 +1
Lines 19256 19308 +52
==========================================
+ Hits 18774 18804 +30
- Misses 267 278 +11
- Partials 215 226 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds support for the GitHub Enterprise billing usage API endpoints.
#4262
New methods on BillingService
GetEnterpriseUsageReport
GetEnterpriseUsageSummary
GetEnterprisePremiumRequestUsageReport
GetEnterpriseAICreditUsage
And added test for all the new End points .