create method
Creates an enterprise signup URL.
Request parameters:
adminEmail
- Optional. Email address used to prefill the admin field of
the enterprise signup form. This value is a hint only and can be altered
by the user.
callbackUrl
- The callback URL that the admin will be redirected to
after successfully creating an enterprise. Before redirecting there the
system will add a query parameter to this URL named enterpriseToken which
will contain an opaque token to be used for the create enterprise request.
The URL will be parsed then reformatted in order to add the
enterpriseToken parameter, so there may be some minor formatting changes.
projectId
- The ID of the Google Cloud Platform project which will own
the enterprise.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SignupUrl.
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<SignupUrl> create({
core.String? adminEmail,
core.String? callbackUrl,
core.String? projectId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (adminEmail != null) 'adminEmail': [adminEmail],
if (callbackUrl != null) 'callbackUrl': [callbackUrl],
if (projectId != null) 'projectId': [projectId],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/signupUrls';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return SignupUrl.fromJson(response_ as core.Map<core.String, core.dynamic>);
}