class Accounts extends Resource (View source)

The "accounts" collection of methods.

Typical usage is:

 $mybusinessaccountmanagementService = new Google\Service\MyBusinessAccountManagement(...);
 $accounts = $mybusinessaccountmanagementService->accounts;

Methods

create(Account $postBody, array $optParams = [])

Creates an account with the specified name and type under the given parent. - Personal accounts and Organizations cannot be created. - User Groups cannot be created with a Personal account as primary owner. - Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization. - Location Groups cannot own Location Groups.

get(string $name, array $optParams = [])

Gets the specified account. Returns NOT_FOUND if the account does not exist or if the caller does not have access rights to it. (accounts.get)

listAccounts(array $optParams = [])

Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights. (accounts.listAccounts)

patch(string $name, Account $postBody, array $optParams = [])

Updates the specified business account. Personal accounts cannot be updated using this method. (accounts.patch)

Details

Account create(Account $postBody, array $optParams = [])

Creates an account with the specified name and type under the given parent. - Personal accounts and Organizations cannot be created. - User Groups cannot be created with a Personal account as primary owner. - Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization. - Location Groups cannot own Location Groups.

(accounts.create)

Parameters

Account $postBody
array $optParams

Optional parameters.

Return Value

Account

Exceptions

Exception

Account get(string $name, array $optParams = [])

Gets the specified account. Returns NOT_FOUND if the account does not exist or if the caller does not have access rights to it. (accounts.get)

Parameters

string $name

Required. The name of the account to fetch.

array $optParams

Optional parameters.

Return Value

Account

Exceptions

Exception

ListAccountsResponse listAccounts(array $optParams = [])

Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights. (accounts.listAccounts)

Parameters

array $optParams

Optional parameters.

Return Value

ListAccountsResponse

Exceptions

Exception

Account patch(string $name, Account $postBody, array $optParams = [])

Updates the specified business account. Personal accounts cannot be updated using this method. (accounts.patch)

Parameters

string $name

Immutable. The resource name, in the format accounts/{account_id}.

Account $postBody
array $optParams

Optional parameters.

Return Value

Account

Exceptions

Exception