From 60773aef97828ff4a7a7b88ade910ab62a09b203 Mon Sep 17 00:00:00 2001 From: Ben Papillon Date: Fri, 5 Jun 2026 15:50:06 -0700 Subject: [PATCH 1/2] add CreditReserved and CreditSettled to FeatureEntitlement --- models.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models.go b/models.go index b14c00b..0423773 100644 --- a/models.go +++ b/models.go @@ -149,6 +149,8 @@ type FeatureEntitlement struct { CreditTotal *float64 `json:"credit_total" desc:"If the company has a credit-based entitlement for this feature, the total credit amount"` CreditUsed *float64 `json:"credit_used" desc:"If the company has a credit-based entitlement for this feature, the amount of credit used"` CreditRemaining *float64 `json:"credit_remaining" desc:"If the company has a credit-based entitlement for this feature, the remaining credit amount"` + CreditReserved *float64 `json:"credit_reserved,omitempty" desc:"If the company has a credit-based entitlement for this feature, the amount currently held by an open lease (granted minus tracked)"` + CreditSettled *float64 `json:"credit_settled,omitempty" desc:"If the company has a credit-based entitlement for this feature, the spendable balance including open lease holds (remaining plus reserved)"` } type Company struct { From 29599013d4fdb0b8f54a61ae14b06b54b646225f Mon Sep 17 00:00:00 2001 From: Ben Papillon Date: Fri, 5 Jun 2026 16:36:24 -0700 Subject: [PATCH 2/2] clarify credit balance field descriptions (which client uses which number) --- models.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models.go b/models.go index 0423773..5c3a9b1 100644 --- a/models.go +++ b/models.go @@ -148,9 +148,9 @@ type FeatureEntitlement struct { CreditID *string `json:"credit_id" desc:"If the company has a credit-based entitlement for this feature, the ID of the credit"` CreditTotal *float64 `json:"credit_total" desc:"If the company has a credit-based entitlement for this feature, the total credit amount"` CreditUsed *float64 `json:"credit_used" desc:"If the company has a credit-based entitlement for this feature, the amount of credit used"` - CreditRemaining *float64 `json:"credit_remaining" desc:"If the company has a credit-based entitlement for this feature, the remaining credit amount"` - CreditReserved *float64 `json:"credit_reserved,omitempty" desc:"If the company has a credit-based entitlement for this feature, the amount currently held by an open lease (granted minus tracked)"` - CreditSettled *float64 `json:"credit_settled,omitempty" desc:"If the company has a credit-based entitlement for this feature, the spendable balance including open lease holds (remaining plus reserved)"` + CreditRemaining *float64 `json:"credit_remaining" desc:"If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead"` + CreditReserved *float64 `json:"credit_reserved,omitempty" desc:"If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released"` + CreditSettled *float64 `json:"credit_settled,omitempty" desc:"If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users"` } type Company struct {