// GENERATED CODE - DO NOT MODIFY BY HAND part of 'business_api.dart'; // ************************************************************************** // RetrofitGenerator // ************************************************************************** class _BusinessApiService implements BusinessApiService { _BusinessApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); baseUrl ??= kReleaseMode ? serviceBaseUrl : localBaseUrl; } final Dio _dio; String baseUrl; @override void dispose() { _dio.close(force: true); } @override Future annoToken(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'anno/token', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == null ? null : json, ); return value; } @override Future> getDayCounts(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'comprehensiveReport/getDayCounts', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null :DayCount.fromJson(json), ); return value; } @override Future> popularList(offsetDay) async { ArgumentError.checkNotNull(offsetDay, 'offsetDay'); const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>( 'dashBoard/store/$offsetDay', queryParameters: queryParameters, options: RequestOptions( method: 'GET', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => PopularSalesList.fromJson(json), ); return value; } @override Future>> orderTrend() async { const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>( 'trend/orderTrend', queryParameters: queryParameters, options: RequestOptions( method: 'GET', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData>.fromJson( _result.data, (json) => (json as List) .map( (i) => OrderTrend.fromJson(i as Map)) .toList()); return value; } }