Change
Change is what an operation’s prepare() returns when the request is
valid and complete. The SDK keeps it as the change waiting for the caller’s yes, and the
platform says its read_back. Change is a dataclass.
Parameters
read_back
The words the platform says and the caller says yes to. Put the change itself in the
first clause: a read-back cut off by the caller’s answer is judged on what they heard.
May be empty for an operation with confirm = False.
touches
Stable keys for everything the change acts on, such as "order:#W1" or
"item:9494281769". A new request is compared with the waiting change by these.
writes
The backend writes, run in order once the caller says yes.
money
The money each write moves: more than 0 is charged, less than 0 goes back to the caller. Amounts are kept exactly. See money.
currency
The ISO 4217 code of money, such as "EUR". Defaults to the service’s currency.
done
What to tell the caller once the writes went through: one string for the whole
change, or one per write. Defaults to the done.default wording, built from the
read-back.
after
The kind of another change the caller asked for that has to go first. This change isn’t read back yet: it’s set aside, the model is told to call that kind’s tool, and it’s offered once a change of that kind is settled.
after_why
Why the other change goes first, as a clause.
then
What the model is told once the change is made, in place of the service’s own text. Use it for a change whose effect comes after the tool’s result, such as a payment the platform takes next.