save method

Future<RecipientModel> save(
  1. int id,
  2. int version, [
  3. Map? data
])

Implementation

Future<RecipientModel> save(int id, int version, [Map? data]) async {
  try {
    final response = await dio.put('/mail/$id',
        queryParameters: {'version': version},
        data: data,
        options: Options(receiveDataWhenStatusError: true));
    return RecipientModel.fromJson(response.data);
  } on DioException catch (e) {
    _handleError(e);
    rethrow;
  }
}