invoke
suspend operator fun invoke(orderId: Int, newStatus: OrderState, sessionToken: String? = null): ResultS1SDK<Boolean, ErrorS1SDK>
Update the order state of the related order id on the api.
Return
Parameters
orderId
Int the id of the order to be updated.
newStatus
OrderState the new status of the order. Notes:
If you want to reject the order you should use the OrderState.NOT_ASSIGNED status.
If you want to start the order you should use the OrderState.IN_PROGRESS status.
Never use the OrderState.UNKNOWN status.
sessionToken
String an specific session token for consuming the API. Only is required when you have an specific custom session handling with a valid session token for this request or you did not set the initial SDK setup. If null, you must have to set the initial SDK setup for handling automatically the session behind the scenes.