class Accounts extends Resource (View source)

The "accounts" collection of methods.

Typical usage is:

 $contentService = new Google\Service\ShoppingContent(...);
 $accounts = $contentService->accounts;

Methods

authinfo(array $optParams = [])

Returns information about the authenticated user. (accounts.authinfo)

claimwebsite(string $merchantId, string $accountId, array $optParams = [])

Claims the website of a Merchant Center sub-account. Merchant accounts with approved third-party CSSs aren't required to claim a website.

custombatch(AccountsCustomBatchRequest $postBody, array $optParams = [])

Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. (accounts.custombatch)

delete(string $merchantId, string $accountId, array $optParams = [])

Deletes a Merchant Center sub-account. (accounts.delete)

get(string $merchantId, string $accountId, array $optParams = [])

Retrieves a Merchant Center account. (accounts.get)

insert(string $merchantId, Account $postBody, array $optParams = [])

Creates a Merchant Center sub-account. (accounts.insert)

link(string $merchantId, string $accountId, AccountsLinkRequest $postBody, array $optParams = [])

Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId. (accounts.link)

listAccounts(string $merchantId, array $optParams = [])

Lists the sub-accounts in your Merchant Center account.

listlinks(string $merchantId, string $accountId, array $optParams = [])

Returns the list of accounts linked to your Merchant Center account.

requestphoneverification(string $merchantId, string $accountId, RequestPhoneVerificationRequest $postBody, array $optParams = [])

Request verification code to start phone verification.

update(string $merchantId, string $accountId, Account $postBody, array $optParams = [])

Updates a Merchant Center account. Any fields that are not provided are deleted from the resource. (accounts.update)

updatelabels(string $merchantId, string $accountId, AccountsUpdateLabelsRequest $postBody, array $optParams = [])

Updates labels that are assigned to the Merchant Center account by CSS user.

verifyphonenumber(string $merchantId, string $accountId, VerifyPhoneNumberRequest $postBody, array $optParams = [])

Validates verification code to verify phone number for the account. If successful this will overwrite the value of accounts.businessinformation.phoneNumber. Only verified phone number will replace an existing verified phone number. (accounts.verifyphonenumber)

Details

AccountsAuthInfoResponse authinfo(array $optParams = [])

Returns information about the authenticated user. (accounts.authinfo)

Parameters

array $optParams

Optional parameters.

Return Value

AccountsAuthInfoResponse

Exceptions

Exception

AccountsClaimWebsiteResponse claimwebsite(string $merchantId, string $accountId, array $optParams = [])

Claims the website of a Merchant Center sub-account. Merchant accounts with approved third-party CSSs aren't required to claim a website.

(accounts.claimwebsite)

Parameters

string $merchantId

The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.

string $accountId

The ID of the account whose website is claimed.

array $optParams

Optional parameters.

Return Value

AccountsClaimWebsiteResponse

Exceptions

Exception

AccountsCustomBatchResponse custombatch(AccountsCustomBatchRequest $postBody, array $optParams = [])

Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. (accounts.custombatch)

Parameters

AccountsCustomBatchRequest $postBody
array $optParams

Optional parameters.

Return Value

AccountsCustomBatchResponse

Exceptions

Exception

delete(string $merchantId, string $accountId, array $optParams = [])

Deletes a Merchant Center sub-account. (accounts.delete)

Parameters

string $merchantId

The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.

string $accountId

The ID of the account.

array $optParams

Optional parameters.

Exceptions

Exception

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

Retrieves a Merchant Center account. (accounts.get)

Parameters

string $merchantId

The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.

string $accountId

The ID of the account.

array $optParams

Optional parameters.

Return Value

Account

Exceptions

Exception

Account insert(string $merchantId, Account $postBody, array $optParams = [])

Creates a Merchant Center sub-account. (accounts.insert)

Parameters

string $merchantId

The ID of the managing account. This must be a multi-client account.

Account $postBody
array $optParams

Optional parameters.

Return Value

Account

Exceptions

Exception

Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId. (accounts.link)

Parameters

string $merchantId

The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.

string $accountId

The ID of the account that should be linked.

AccountsLinkRequest $postBody
array $optParams

Optional parameters.

Return Value

AccountsLinkResponse

Exceptions

Exception

AccountsListResponse listAccounts(string $merchantId, array $optParams = [])

Lists the sub-accounts in your Merchant Center account.

(accounts.listAccounts)

Parameters

string $merchantId

The ID of the managing account. This must be a multi-client account.

array $optParams

Optional parameters.

Return Value

AccountsListResponse

Exceptions

Exception

Returns the list of accounts linked to your Merchant Center account.

(accounts.listlinks)

Parameters

string $merchantId

The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.

string $accountId

The ID of the account for which to list links.

array $optParams

Optional parameters.

Return Value

AccountsListLinksResponse

Exceptions

Exception

RequestPhoneVerificationResponse requestphoneverification(string $merchantId, string $accountId, RequestPhoneVerificationRequest $postBody, array $optParams = [])

Request verification code to start phone verification.

(accounts.requestphoneverification)

Parameters

string $merchantId

Required. The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi- client account and accountId must be the ID of a sub-account of this account.

string $accountId

Required. The ID of the account.

RequestPhoneVerificationRequest $postBody
array $optParams

Optional parameters.

Return Value

RequestPhoneVerificationResponse

Exceptions

Exception

Account update(string $merchantId, string $accountId, Account $postBody, array $optParams = [])

Updates a Merchant Center account. Any fields that are not provided are deleted from the resource. (accounts.update)

Parameters

string $merchantId

The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.

string $accountId

The ID of the account.

Account $postBody
array $optParams

Optional parameters.

Return Value

Account

Exceptions

Exception

AccountsUpdateLabelsResponse updatelabels(string $merchantId, string $accountId, AccountsUpdateLabelsRequest $postBody, array $optParams = [])

Updates labels that are assigned to the Merchant Center account by CSS user.

(accounts.updatelabels)

Parameters

string $merchantId

The ID of the managing account.

string $accountId

The ID of the account whose labels are updated.

AccountsUpdateLabelsRequest $postBody
array $optParams

Optional parameters.

Return Value

AccountsUpdateLabelsResponse

Exceptions

Exception

VerifyPhoneNumberResponse verifyphonenumber(string $merchantId, string $accountId, VerifyPhoneNumberRequest $postBody, array $optParams = [])

Validates verification code to verify phone number for the account. If successful this will overwrite the value of accounts.businessinformation.phoneNumber. Only verified phone number will replace an existing verified phone number. (accounts.verifyphonenumber)

Parameters

string $merchantId

Required. The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi- client account and accountId must be the ID of a sub-account of this account.

string $accountId

Required. The ID of the account.

VerifyPhoneNumberRequest $postBody
array $optParams

Optional parameters.

Return Value

VerifyPhoneNumberResponse

Exceptions

Exception