PUT/DELETE endpoints. Instead, editing
and deleting are exposed as state-machine (FSM) actions on the revenue
object type, the same pattern used for invoice line items. You first ask which
actions are available for a revenue entry, then perform the chosen action as a
transition.
Availability.
EDIT and DELETE are only offered for a revenue entry when
both conditions hold:- the revenue’s parent invoice is in the
draftstate, and - the revenue’s
typeis notunbilled(i.e.billedordeferred_without_date).
1. Get available actions
Fetch the actions that can currently be performed on a revenue entry.EDIT and DELETE
actions (with EDIT’s editable fields); otherwise the list is empty.
Required policy action:
FsmService:getActions. See Get object
actions.2. Edit a revenue entry
Send anEDIT transition with the new values. value is required; period
is optional (omit it to leave the row’s period as-is for a deferred_without_date
row, or to clear it back to no period). The API derives the full calendar-month
startDate/endDate from whatever date period falls in.
Required policy actions:
FsmService:transition and
RevenueService:updateRevenue (AdminAccess). See Transition object
state.3. Delete a revenue entry
Send aDELETE transition. No additional fields are required.
Required policy actions:
FsmService:transition and
RevenueService:deleteRevenue (AdminAccess). See Transition object
state.
