BillingPlanVariable
ResponseA plan variable, referenced from formulas as var.<key>.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
14number or boolean. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) number, boolean
timed (values by period), asked (given at every run) or formula (computed from its formula at every run). New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) timed, asked, formula
For timed variables, the values by period.
3 attributes of each item
Lines whose formulas or condition use this variable (it cannot be removed while non-empty).
True when the key can no longer change (used by a line, or a run recorded a value for it).
Required for kind=formula; null otherwise. Uses system values and variables earlier in the submitted variable list; self and forward references are refused. Evaluated after system values, before lines, using Decimal precision 28.
For an asked number only: how a billing run computes the value it takes from a purchase invoice's chosen lines, a formula in the invoice context (see parseBillingFormula), e.g. sum_lines(line.amount / line.quantity) for a price per unit.
Details
Null: the chosen lines' sum, sum_lines(line.amount). Stored normalised; the default written out is stored as null.