@@ -772,17 +772,17 @@ func requireInvoiceTotals(t *testing.T, expected expectedInvoiceTotals, totals a
772772 })
773773}
774774
775- func requireCustomerCreditBalance (t * testing.T , balance * apiv3.BillingCreditBalances , currency string , expectedAvailable float64 , expectedPending float64 ) {
775+ func requireCustomerCreditBalance (t * testing.T , balance * apiv3.BillingCreditBalances , currency string , expectedSettled float64 , expectedPending float64 ) {
776776 t .Helper ()
777777
778778 idx := slices .IndexFunc (balance .Balances , func (item apiv3.CreditBalance ) bool {
779779 return item .Currency == currency
780780 })
781781 require .NotEqual (t , - 1 , idx , "credit balance for %s" , currency )
782782
783- available := numericToFloat (t , balance .Balances [idx ].Available )
783+ settled := numericToFloat (t , balance .Balances [idx ].Settled )
784784 pending := numericToFloat (t , balance .Balances [idx ].Pending )
785- require .Equal (t , expectedAvailable , available , "available credit balance for %s" , currency )
785+ require .Equal (t , expectedSettled , settled , "settled credit balance for %s" , currency )
786786 require .Equal (t , expectedPending , pending , "pending credit balance for %s" , currency )
787787}
788788
0 commit comments