BillingPlanLineInput
RequestA line of a billing plan. Lines are sent as a whole list, in invoice order: a line with an id keeps that line (fields it leaves out keep their values), one without is new, one left out is removed. Formulas are TEXT in the billing-formula grammar (see parseBillingFormula); the server parses and stores the tree. quantity/unit/unit_price are for fixed lines only, the formulas for formula and allocation lines only.
Sent in requests. Its values are closed: anything not listed is refused.
Attributes
22fixed: a quantity and price. formula: quantity formula × price formula per recipient. allocation: a total formula split across recipients by a weight formula.
One of fixed, formula, allocation
An existing line of this plan to keep; omit for a new line (BILLING_PLAN_LINE_NOT_FOUND otherwise).
The item the line bills; with price_source article its price is read at every run.
fixed lines: the price from this line (manual) or from the item (article), read at every run.
One of manual, article
fixed lines with price_source manual: net price per unit; null with article.
formula lines: the quantity per recipient, e.g. consumption.kulm_vesi.
formula lines: the price per unit, e.g. var.water_rate.
allocation lines: the amount to split, evaluated once for the plan; may use sum_objects.
allocation lines: each recipient's weight, e.g. prop.area_m2.
Who the line bills; null (or omitted) = every recipient of the plan.
When a consumption the line uses has no reading: stop the run (block), leave the line off that recipient's invoice (skip_line), or bill the last 3 periods' average, marked as an estimate (estimate).
One of block, skip_line, estimate
Bill a negative period consumption as 0, or with a negative amount.
One of zero, negative
Bill only objects whose boolean property has this value.
Bill only in periods where the plan's boolean variable has this value.
Dimension values on the line, at most one per dimension.