updateName method
Update currently logged in user account name.
Implementation
Future<models.User> updateName({required String name}) async {
const String apiPath = '/account/name';
final Map<String, dynamic> apiParams = {'name': name};
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);
}