class OrganizationsBillingAccounts extends Resource (View source)

The "billingAccounts" collection of methods.

Typical usage is:

 $cloudbillingService = new Google\Service\Cloudbilling(...);
 $billingAccounts = $cloudbillingService->organizations_billingAccounts;

Methods

create(string $parent, BillingAccount $postBody, array $optParams = [])

This method creates billing subaccounts.

listOrganizationsBillingAccounts(string $parent, array $optParams = [])

Lists the billing accounts that the current authenticated user has permission to view.

move(string $destinationParent, string $name, array $optParams = [])

Changes which parent organization a billing account belongs to.

Details

BillingAccount create(string $parent, BillingAccount $postBody, array $optParams = [])

This method creates billing subaccounts.

Google Cloud resellers should use the Channel Services APIs, accounts.custom ers.create and accounts.customers.entitlements.create. When creating a subaccount, the current authenticated user must have the billing.accounts.update IAM permission on the parent account, which is typically given to billing account administrators. This method will return an error if the parent account has not been provisioned for subaccounts. (billingAccounts.create)

Parameters

string $parent

Optional. The parent to create a billing account from. Format: - billingAccounts/{billing_account_id}, for example, billingAccounts/012345-567890-ABCDEF

BillingAccount $postBody
array $optParams

Optional parameters.

Return Value

BillingAccount

Exceptions

Exception

ListBillingAccountsResponse listOrganizationsBillingAccounts(string $parent, array $optParams = [])

Lists the billing accounts that the current authenticated user has permission to view.

(billingAccounts.listOrganizationsBillingAccounts)

Parameters

string $parent

Optional. The parent resource to list billing accounts from. Format: - organizations/{organization_id}, for example, organizations/12345678 - billingAccounts/{billing_account_id}, for example, billingAccounts/012345-567890-ABCDEF

array $optParams

Optional parameters.

Return Value

ListBillingAccountsResponse

Exceptions

Exception

BillingAccount move(string $destinationParent, string $name, array $optParams = [])

Changes which parent organization a billing account belongs to.

(billingAccounts.move)

Parameters

string $destinationParent

Required. The resource name of the Organization to move the billing account under. Must be of the form organizations/{organization_id}.

string $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.

array $optParams

Optional parameters.

Return Value

BillingAccount

Exceptions

Exception