EARS: If a service provider bills the ORA for a service before it has been delivered or consumed, then the system shall refuse the bill unless a bilateral agreement allows earlier billing.
Story: As an airline, I want providers to bill me only for what they have delivered, so that I never pay a provider for a service the customer did not receive.
Acceptance criteria:
-
ONE-808.1: If a service provider bills for a service that has not been delivered or consumed, then the system shall refuse the bill unless a bilateral agreement with that provider allows earlier billing.
-
ONE-808.2: If a service provider bills for a service another provider delivers, then the system shall refuse the bill.
-
ONE-808.3: The system shall keep the total billed for each service within its settlement value, and at zero while it has not been delivered or consumed unless a bilateral agreement allows earlier billing.
-
ONE-808.4: When a provider bills for a delivered service within what is left of its settlement value, the system shall accept the bill.
The bills are checked against the services' delivery statuses when they
arrive. Which statuses count as delivered or consumed is a reading of the
sources (ConsumptionReading). The result says whether the bill is
accepted.