1.
Confirm that the amount lies in the inclusive range 1 to 50000 cents.
2.
Ask the ledger service whether the stored balance is at least the amount.
3.
Assign the new balance to the stored account field.
4.
Reject the call if the request object is missing (null) before reading any of its fields.
5.
Confirm that the amount field holds an integer number of cents.
6.
After every check has passed, compute the new balance in a local variable.