isInvitableUser method

Future<IsInvitableUserResponse> isInvitableUser(
  1. String name, {
  2. String? $fields,
})

Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account).

Eligibility is based on the following criteria: * the email address is a consumer account and it's the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. Note: This method is not supported for Workspace Essentials customers.

Request parameters:

name - Required. UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} Value must have pattern ^customers/\[^/\]+/userinvitations/\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a IsInvitableUserResponse.

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<IsInvitableUserResponse> isInvitableUser(
  core.String name, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':isInvitableUser';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return IsInvitableUserResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}