-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Breaking API ChangePR will require a bump to the major version num in next release. Look here to see the change(s).PR will require a bump to the major version num in next release. Look here to see the change(s).buggood first issue
Description
The values for GrossQuantity, DiscountQuantity, and NetQuantity can be floats. The current struct in v82 for PremiumRequestUsageItem in github/billing.go has them defined as ints.
e.g.
{
"product": "Copilot",
"sku": "Copilot Premium Request",
"model": "GPT-5.2",
"unitType": "requests",
"pricePerUnit": 0.04,
"grossQuantity": 5054.0,
"grossAmount": 202.16,
"discountQuantity": 4974.0,
"discountAmount": 198.96,
"netQuantity": 80.0,
"netAmount": 3.2
}
This leads to an error in unmarshalling the json data:
json: cannot unmarshal number 5054.0 into Go struct field PremiumRequestUsageItem.usageItems.grossQuantity of type int
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Breaking API ChangePR will require a bump to the major version num in next release. Look here to see the change(s).PR will require a bump to the major version num in next release. Look here to see the change(s).buggood first issue