previewOrderChange function

Future<ApiResponse<OrderRead>> previewOrderChange(
  1. ExsitedClient client,
  2. Object orderId,
  3. Object payload, {
  4. bool? raiseOnError,
  5. String? responseFormat,
})

POST /api/{api_version}/orders/{order_id}/change/preview

Preview a change, the changeOrder body; nothing is changed, and the answer is the order as it stands.

Implementation

Future<ApiResponse<OrderRead>> previewOrderChange(
  ExsitedClient client,
  Object orderId,
  Object payload, {
  bool? raiseOnError,
  String? responseFormat,
}) =>
    client.sendPostRequest(OrdersUrls.orderChangePreview,
        pathParams: {'order_id': orderId},
        jsonBody: payload,
        raiseOnError: raiseOnError,
        responseFormat: responseFormat,
        dtoDecoder: OrderRead.fromMap);