fix: caching customer invoices too

This commit is contained in:
John Yeo
2025-11-19 19:51:34 +00:00
parent 29537323ba
commit 975430b988
51 changed files with 647 additions and 293 deletions

View File

@@ -73,8 +73,10 @@ local function getCustomerObject(orgId, env, customerId, skipEntityMerge)
-- Merge subscriptions by plan ID and normalized status
baseCustomer.subscriptions = mergeSubscriptions(allSubscriptions)
-- Merge invoices
-- Build final customer object
baseCustomer.invoices = baseCustomer.invoices or nil
baseCustomer._balanceFeatureIds = nil -- Remove tracking field
baseCustomer._entityIds = nil -- Remove tracking field
baseCustomer.balances = balances