updateOrderNote function
PATCH /api/{api_version}/orders/{order_id}/notes/{order_note_id}
Sent as a form, the text as the note field, and as multipart with any
files beside it: the endpoint reads no JSON body.
Implementation
Future<ApiResponse<OrderNoteView>> updateOrderNote(
ExsitedClient client,
Object orderId,
Object orderNoteId,
String note, {
Map<String, Object?>? files,
bool? raiseOnError,
String? responseFormat,
}) {
if (note.isEmpty) {
throw SdkUsageError(
'note is required: the note text is the body of this request');
}
return client.sendPatchRequest(OrdersUrls.orderNote,
pathParams: {'order_id': orderId, 'order_note_id': orderNoteId},
formData: {'note': note},
files: files,
raiseOnError: raiseOnError,
responseFormat: responseFormat,
dtoDecoder: OrderNoteView.fromMap);
}