diff --git a/github/billing.go b/github/billing.go index bb6f8ec49ea..8a0e55c02bf 100644 --- a/github/billing.go +++ b/github/billing.go @@ -121,7 +121,7 @@ type UsageItem struct { Date string `json:"date"` Product string `json:"product"` SKU string `json:"sku"` - Quantity int `json:"quantity"` + Quantity float64 `json:"quantity"` UnitType string `json:"unitType"` PricePerUnit float64 `json:"pricePerUnit"` GrossAmount float64 `json:"grossAmount"` diff --git a/github/billing_test.go b/github/billing_test.go index 7d1baa9719f..fdd7c471972 100644 --- a/github/billing_test.go +++ b/github/billing_test.go @@ -407,7 +407,7 @@ func TestBillingService_GetOrganizationUsageReport(t *testing.T) { Date: "2023-08-01", Product: "Actions", SKU: "Actions Linux", - Quantity: 100, + Quantity: 100.0, UnitType: "minutes", PricePerUnit: 0.008, GrossAmount: 0.8, @@ -488,7 +488,7 @@ func TestBillingService_GetUsageReport(t *testing.T) { Date: "2023-08-15", Product: "Codespaces", SKU: "Codespaces Linux", - Quantity: 50, + Quantity: 50.0, UnitType: "hours", PricePerUnit: 0.18, GrossAmount: 9.0,