delete method
Deletes a Merchant Center account user.
Executing this method requires admin access. The user to be deleted can't be the last admin user of that account. Also a user is protected from deletion if it is managed by Business Manager"
Request parameters:
name
- Required. The name of the user to delete. Format:
accounts/{account}/users/{email}
It is also possible to delete the user
corresponding to the caller by using me
rather than an email address as
in accounts/{account}/users/me
.
Value must have pattern ^accounts/\[^/\]+/users/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Empty.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<Empty> delete(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'accounts/v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}