move method
Changes which parent organization a billing account belongs to.
Request parameters:
destinationParent - Required. The resource name of the Organization to
move the billing account under. Must be of the form
organizations/{organization_id}.
Value must have pattern ^organizations/\[^/\]+$.
name - Required. The resource name of the billing account to move. Must
be of the form billingAccounts/{billing_account_id}. The specified
billing account cannot be a subaccount, since a subaccount always belongs
to the same organization as its parent account.
Value must have pattern ^billingAccounts/\[^/\]+$.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a BillingAccount.
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<BillingAccount> move(
core.String destinationParent,
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('$destinationParent') +
'/' +
core.Uri.encodeFull('$name') +
':move';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return BillingAccount.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}