ordersModelsFilesUpdateWithHttpInfo method

Future<Response> ordersModelsFilesUpdateWithHttpInfo(
  1. int orderId,
  2. String contentDisposition,
  3. int id, {
  4. MultipartFile? body,
})

Upload a file. Max size 30MB. Filename is required!

Note: This method returns the HTTP Response.

Parameters:

  • int orderId (required):

  • String contentDisposition (required): The original filename.

  • int id (required):

  • MultipartFile body:

Implementation

Future<Response> ordersModelsFilesUpdateWithHttpInfo(
  int orderId,
  String contentDisposition,
  int id, {
  MultipartFile? body,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/api/orders/{order_id}/models/{id}/files/'
      .replaceAll('{order_id}', orderId.toString())
      .replaceAll('{id}', id.toString());

  // ignore: prefer_final_locals
  Object? postBody = body;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  headerParams[r'Content-Disposition'] = parameterToString(contentDisposition);

  const contentTypes = <String>['application/octet-stream'];

  return apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}