// GENERATED CODE - DO NOT MODIFY BY HAND part of 'min_api.dart'; // ************************************************************************** // RetrofitGenerator // ************************************************************************** // ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element class _MinApiService implements MinApiService { _MinApiService( this._dio, { this.baseUrl, this.errorLogger, }) { baseUrl ??= 'https://pos.api.yixinhuixiang.com/app/'; } final Dio _dio; String? baseUrl; final ParseErrorLogger? errorLogger; @override Future> memberInfo() async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, '/member/info', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> findMiNiGroupList( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'product/findMiNiGroupList', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => FindMiniGroup.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> miNiDetail(String id) async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, '/product/queryMiNiProductDetail?id=${id}', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => MiniDetail.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> addShoppingCart( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'shoppingcart', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => ShoppingCart.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> getShoppingCart(int tableId) async { final _extra = {}; final queryParameters = {r'tableId': tableId}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'shoppingcart', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => ShoppingCart.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> clearShoppingCart(num storeId) async { final _extra = {}; final queryParameters = {r'storeId': storeId}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'shoppingcart/delCart', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as bool, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> shoppingCart1( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'PUT', headers: _headers, extra: _extra, ) .compose( _dio.options, 'shoppingcart', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => ShoppingCart.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> shoppingCartSingle( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'PUT', headers: _headers, extra: _extra, ) .compose( _dio.options, 'shoppingcart/single', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => ShoppingCart.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> getOrderInfo( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/getOrderInfo', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => SettleOrderInfo.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> getOrderDetails( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/getOrderDetail', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => MinOrderInfo.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> queryAddress() async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'address/queryMemberAddress', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData
_value; try { _value = BaseListData
.fromJson( _result.data!, (json) => Address.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> placeOrderFirst(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/placeOrderFirst', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> addOrder(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/addOrder', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> settlementWx(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/settlement', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => WxPay.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> settlementApi(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/settlement', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> queryStoreInfo1(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'store/getStore', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> getParentInfo(String tableId) async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'order/getParentInfo?tableId=${tableId}', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> recommendList() async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'product/recommendList', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => HomeRecommendList.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> homeConfig() async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'store/homeConfig', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => ShopingHomeConfig.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> findActListByType( bool allDay, String type, ) async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/findActListByType?allDay=${allDay}&type=${type}', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => ActivityAreaList.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> viewProduct( String actProductId, String type, ) async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/viewProduct?actProductId=${actProductId}&type=${type}', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => ActivityDetails.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> launchAct(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/launchAct', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => LaunchJoinAct.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> joinAct(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/joinAct', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => LaunchJoinAct.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future?> actPay(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/actPay', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch?>(_options); late BaseData? _value; try { _value = _result.data == null ? null : BaseData.fromJson( _result.data!, (json) => WxPay.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> showMyActList( Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/showMyActList', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => ActivityOrder.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> showOneAct( String actRecordId) async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'actTemplate/showOneAct?actRecordId=${actRecordId}', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => ActivityActRecordDetails.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> cancelMemberCoupon(String orderId) async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, 'promotion/cancelMemberCoupon?orderId=${orderId}', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> useMemberCoupon(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, 'promotion/useMemberCoupon', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> memberRecharge(Map param) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(param); final _options = _setStreamType>(Options( method: 'POST', headers: _headers, extra: _extra, ) .compose( _dio.options, '/member/recharge', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseData _value; try { _value = BaseData.fromJson( _result.data!, (json) => json as dynamic, ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } @override Future> memberRechargeList() async { final _extra = {}; final queryParameters = {}; final _headers = {}; const Map? _data = null; final _options = _setStreamType>(Options( method: 'GET', headers: _headers, extra: _extra, ) .compose( _dio.options, '/store/getRechargePreferential', queryParameters: queryParameters, data: _data, ) .copyWith( baseUrl: _combineBaseUrls( _dio.options.baseUrl, baseUrl, ))); final _result = await _dio.fetch>(_options); late BaseListData _value; try { _value = BaseListData.fromJson( _result.data!, (json) => MemberRecharge.fromJson(json as Map), ); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; } return _value; } RequestOptions _setStreamType(RequestOptions requestOptions) { if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) { if (T == String) { requestOptions.responseType = ResponseType.plain; } else { requestOptions.responseType = ResponseType.json; } } return requestOptions; } String _combineBaseUrls( String dioBaseUrl, String? baseUrl, ) { if (baseUrl == null || baseUrl.trim().isEmpty) { return dioBaseUrl; } final url = Uri.parse(baseUrl); if (url.isAbsolute) { return url.toString(); } return Uri.parse(dioBaseUrl).resolveUri(url).toString(); } }