Logic Flow
The general flow for calculating individual YTD wages works like this:- Call the
/paymentendpoint and pass astart_dateof the first day of the year (January 01) and anend_dateof the current date. - Loop over the array of returned payment objects and collect all of the payment
ids. - Call the
/pay-statementendpoint and pass all of thepayment_ids as a batched request. - Loop over the array of returned pay statements and aggregate each individual’s gross pay amounts.
Sequence Diagram
