/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-07-13 09:03:28
 * @LastEditTime : 2023-08-16 17:10:11
 * @FilePath     : /app-boost/api_package/lib/metercommons_transcribes.post.dart
 * @Description  : Do not edit
 */
//*****************************************************************
//             Generate by vsc-wisdom-flutter-kit
//*****************************************************************

///[http://yapi.wisdomcity.com.cn/project/16/interface/api/2915](http://yapi.wisdomcity.com.cn/project/16/interface/api/2915)
///
///update 2020-10-9 11:45:0
///
///公共仪表抄表
// ignore: library_names
library metercommons_transcribes.post;

import 'response_model.dart';
import 'package:dio/dio.dart';

///[http://yapi.wisdomcity.com.cn/project/16/interface/api/2915](http://yapi.wisdomcity.com.cn/project/16/interface/api/2915)
///
///update 2020-10-9 11:45:0
///
///公共仪表抄表
class Interface {
  Interface._();

  static const String path = '/app/admin/metercommons/transcribes';

  static const String method = 'post';

  static Future<ResponseModel<String>> request(
    Dio dio, {
    Options? options,
    Map<String, dynamic>? pathParameters,
    Map<String, dynamic>? queryParameters,
    data,
    CancelToken? cancelToken,
    ProgressCallback? onSendProgress,
    ProgressCallback? onReceiveProgress,
  }) async {
    // final _options = options != null ? options.copyWith(method: method) : null;
    final res = await dio.request(
      _path(pathParameters ?? {}),
      data: data,
      queryParameters: queryParameters,
      cancelToken: cancelToken,
      options: Options(method: 'post'),
      onSendProgress: onSendProgress,
      onReceiveProgress: onReceiveProgress,
    );

    return ResponseModel(
      json: res.data,
      to: (v) => v,
      from: (v) => v,
    );
  }

  static String _path(Map<String, dynamic> pathParameters) {
    String back = path;
    for (final key in pathParameters.keys) {
      back = back.replaceAll('{$key}', pathParameters[key].toString());
    }
    return back;
  }
}
