hello there,
hello there,
Question around invoices. On checking, I see that currently the limit to get the invoices for
GET /customers/{customer_id}?expand=invoices
is set to 10. So you'll always get the 10 most recent invoices only
Just want to understand is there a reason behind this hard limiting to 10 ?
Asking this to understand , if there are plans to do pagination here ?
customer_invoices AS (
SELECT
COALESCE(
json_agg(row_to_json(i) ORDER BY i.created_at DESC, i.id DESC) FILTER (WHERE i.id IS NOT NULL),
'[]'::json
) AS invoices
FROM invoices i
WHERE i.internal_customer_id = (SELECT internal_id FROM customer_record)
${entityFilter}
LIMIT 10
)
Question around invoices. On checking, I see that currently the limit to get the invoices for
GET /customers/{customer_id}?expand=invoices
is set to 10. So you'll always get the 10 most recent invoices only
Just want to understand is there a reason behind this hard limiting to 10 ?
Asking this to understand , if there are plans to do pagination here ?
return sqlcustomer_invoices AS (
SELECT
COALESCE(
json_agg(row_to_json(i) ORDER BY i.created_at DESC, i.id DESC) FILTER (WHERE i.id IS NOT NULL),
'[]'::json
) AS invoices
FROM invoices i
WHERE i.internal_customer_id = (SELECT internal_id FROM customer_record)
${entityFilter}
LIMIT 10
)
;
