Files
cfw-autumn/shared/utils/cusUtils/fullCusUtils/getCusStripeSubCount.ts
2025-12-11 19:23:53 +00:00

12 lines
287 B
TypeScript

import type { FullCustomer } from "../../../models/cusModels/fullCusModel.js";
export const getCusStripeSubCount = ({
fullCus,
}: {
fullCus: FullCustomer;
}) => {
return fullCus.customer_products.filter(
(cp) => cp.subscription_ids && cp.subscription_ids.length > 0,
).length;
};