MobileOrderAmendment
Buyer-side amendment capabilities for this order, resolved per request from the order state and the caller's role. Absent on list rows and on the cancel mutation.
type MobileOrderAmendment {
canChangeAddress: Boolean!
canChangePaymentMethod: Boolean!
canEditItems: Boolean!
lockReason: String
paymentMethodLockReason: String
version: Int!
}
Fields
MobileOrderAmendment.canChangeAddress ● Boolean! non-null scalar
The delivery address may be swapped for another of the company's addresses. Same gates as canEditItems, plus: never on an order placed for a branch, nor on one whose delivery fee was a live courier quote for its address.
MobileOrderAmendment.canChangePaymentMethod ● Boolean! non-null scalar
The payment method may be changed. A SEPARATE gate from canEditItems: an ONLINE order (the ONLINE_PAYMENT lock above) is exactly the case this is for switching OFF of, so that lock does not apply here. Still requires a writer role, no live invoice, an amendable status, and nothing paid yet.
MobileOrderAmendment.canEditItems ● Boolean! non-null scalar
Line quantities may be changed / lines removed. True only while the order is AWAITING_PAYMENT or CONFIRMED, nothing is paid, no live invoice references it, and the caller's role may write.
MobileOrderAmendment.lockReason ● String scalar
Why both capabilities are off: ROLE | INVOICED | ONLINE_PAYMENT | STATUS | PAID | BRANCH | NEGOTIATED_PRICE. Null when at least one is on (a negotiated-price order turns canEditItems off and keeps the address editable).
MobileOrderAmendment.paymentMethodLockReason ● String scalar
Why canChangePaymentMethod is off: ROLE | INVOICED | STATUS | PAID. Null when it is on.
MobileOrderAmendment.version ● Int! non-null scalar
Optimistic-concurrency version to echo back as expectedVersion on an amendment.
Member Of
MobileOrder object