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; startDate
and endDate are optional (omit both for deferred_without_date revenue). When
both dates are provided, startDate must be on or before endDate.
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.