get(id: string, include?: string): Promise<UnitResponse<Payment & Include<Account[] | Customer[] | Transaction[]>>>;
the actual response is as such:
which is as expected as per the API docs, but the TS type is wrong, so you get the following error:
Property 'included' does not exist on type 'UnitResponse<Payment & Include<Account[] | Customer[] | Transaction[]>>'.
When accessing like so:
const payment = await unit.getPayment(paymentId);
const { data, included } = payment;
I might be wrong, but I think it should be: Promise<UnitResponse<Payment> & Include<Account[] | Customer[] | Transaction[]>>