getInvoice method
Future
getInvoice(
{ - required String invoiceId,
- required dynamic token,
})
override
Implementation
@override
Future<dynamic> getInvoice(
{required final String invoiceId, required final token}) async {
_dio.options.headers['Authorization'] = 'Bearer $token';
_dio.options.queryParameters['id'] = invoiceId;
try {
final response = await _dio.get('/Invoice/getbyid');
return response.data;
} on DioException catch (e) {
if (e.response != null) {
return e.response;
} else {
throw e.message.toString();
}
}
}