unregisterGcp method

Future<Empty> unregisterGcp(
  1. UnregisterGcpRequest request,
  2. String name, {
  3. String? $fields,
})

Unregister the calling GCP from the calling shopping account.

Note that the GCP will still be able to access the API for at most 1 day from the unregister succussful call.

request - The metadata request object.

Request parameters:

name - Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: accounts/{account}/developerRegistration Value must have pattern ^accounts/\[^/\]+/developerRegistration$.

$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> unregisterGcp(
  UnregisterGcpRequest request,
  core.String name, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    'fields': ?$fields == null ? null : [$fields],
  };

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

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