Split stay costs
split_stay_costsSplit each stay's total among the people who sleep there, adding any per-person-night fee and allocating cents so each stay sums exactly.
Instructions
Local: split each stay's total among the people who sleep there.
stays are {name, check_in, check_out, total}; roster is as for plan_stay_blocks. A stay's rate is its total over the person-nights the roster puts inside it, so someone who never sleeps there pays nothing toward it. currency is named by the caller and never converted. fee_per_person_night is a per-night charge the caller names (a city tax) added per person. Cents are allocated so each stay sums exactly. Nights no stay covers come back as unallocated_nights. Arithmetic only: it does not price or recommend a stay.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stays | Yes | ||
| roster | Yes | ||
| currency | Yes | ||
| fee_per_person_night | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| empty_note | Yes | ||
| error_code | Yes | ||
| observed_at | Yes | ||
| retry_after | Yes | ||
| completeness | Yes | ||
| empty_reason | Yes | ||
| observed_at_basis | Yes | ||
| retry_after_seconds | Yes |