updateStatus method

Future<User> updateStatus()

Update status

Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.

Implementation

Future<models.User> updateStatus() async {
  const String apiPath = '/account/status';

  final Map<String, dynamic> apiParams = {};

  final Map<String, String> apiHeaders = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.patch,
      path: apiPath, params: apiParams, headers: apiHeaders);

  return models.User.fromMap(res.data);
}