send method

Future<RecipientModel> send(
  1. int id,
  2. int version,
  3. String actionId,
  4. Map<String, dynamic>? args, [
  5. Map? data,
])

Implementation

Future<RecipientModel> send(
    int id, int version, String actionId, Map<String, dynamic>? args,
    [Map? data]) async {
  try {
    var queryParameters = <String, dynamic>{
      'version': version,
      'action': actionId
    };
    if (args != null) queryParameters.addAll(args);
    final response = await dio.put('/mail/$id',
        data: data,
        queryParameters: queryParameters,
        options: Options(receiveDataWhenStatusError: true));
    return RecipientModel.fromJson(response.data);
  } on DioException catch (e) {
    _handleError(e);
    rethrow;
  }
}