# Google Shopping Merchant Accounts V1 Client - Class AccountService (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.0 1.0.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.3 0.2.0 0.1.0 Reference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class AccountService.

The `AccountService` message represents a specific service that a provider
account offers to a Merchant Center account.

`AccountService` defines the permissions and capabilities granted to the
provider, allowing for operations such as product management or campaign
management.
The lifecycle of an `AccountService` involves a proposal phase, where one
party suggests the service, and an approval phase, where the other party
accepts or rejects it. This handshake mechanism ensures mutual consent before
any access is granted. This mechanism safeguards both parties by ensuring
that access rights are granted appropriately and that both the business and
provider are aware of the services enabled. In scenarios where a user is an
admin of both accounts, the approval can happen automatically.
The mutability of a service is also managed through `AccountService`. Some
services might be immutable, for example, if they were established through
other systems or APIs, and you cannot alter them through this API.

Generated from protobuf message `google.shopping.merchant.accounts.v1.AccountService`

## Namespace

Google \\ Shopping \\ Merchant \\ Accounts \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ products_management` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.ProductsManagement` Service type for managing products. This allows the provider to handle product data on behalf of the business, including reading and writing product listings. It's commonly used when the provider offers inventory management or catalog synchronization services to keep the business's product information up-to-date across platforms. |
| `↳ campaigns_management` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.CampaignsManagement` Service type for managing advertising campaigns. Grants the provider access to create and manage the business's ad campaigns, including setting up campaigns, adjusting bids, and optimizing performance. |
| `↳ account_management` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountManagement` Service type for account management. Enables the provider to perform administrative actions on the business's account, such as configuring account settings, managing users, or updating business information. |
| `↳ account_aggregation` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountAggregation` Service type for account aggregation. This enables the provider, which is an advanced account, to manage multiple sub-accounts (client accounts). Through this service, the advanced account provider can perform administrative and operational tasks across all linked sub-accounts. This is useful for agencies, aggregators, or large retailers that need centralized control over many Merchant Center accounts. |
| `↳ local_listing_management` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.LocalListingManagement` Service type for local listings management. The business group associated with the external account id will be used to provide local inventory to this Merchant Center account. |
| `↳ comparison_shopping` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.ComparisonShopping` Service type for comparison shopping. The provider is a CSS (Comparison Shopping Service) managing the account. See <https://support.google.com/merchants/answer/12653197> |
| `↳ name` | `string` Identifier. The resource name of the account service. Format: `accounts/{account}/services/{service}` |
| `↳ provider` | `string` Output only. The provider of the service. Either the reference to an account such as `providers/123` or a well-known service provider (one of `providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`). |
| `↳ provider_display_name` | `string` Output only. The human-readable display name of the provider account. |
| `↳ handshake` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Handshake` Output only. Information about the state of the service in terms of establishing it (e.g. is it pending approval or approved). |
| `↳ mutability` | `int` Output only. Whether the service is mutable (e.g. through Approve / Reject RPCs). A service that was created through another system or API might be immutable. |
| `↳ external_account_id` | `string` Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions --- the `external_account_id` differentiates between them, ensuring accurate linking and integration between Google and the provider. |

### getProductsManagement

Service type for managing products. This allows the provider to handle
product data on behalf of the business, including reading and writing
product listings. It's commonly used when the provider offers inventory
management or catalog synchronization services to keep the business's
product information up-to-date across platforms.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.ProductsManagement|null` |   |

### hasProductsManagement

### setProductsManagement

Service type for managing products. This allows the provider to handle
product data on behalf of the business, including reading and writing
product listings. It's commonly used when the provider offers inventory
management or catalog synchronization services to keep the business's
product information up-to-date across platforms.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.ProductsManagement` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCampaignsManagement

Service type for managing advertising campaigns. Grants the provider
access to create and manage the business's ad campaigns, including
setting up campaigns, adjusting bids, and optimizing performance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.CampaignsManagement|null` |   |

### hasCampaignsManagement

### setCampaignsManagement

Service type for managing advertising campaigns. Grants the provider
access to create and manage the business's ad campaigns, including
setting up campaigns, adjusting bids, and optimizing performance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.CampaignsManagement` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccountManagement

Service type for account management. Enables the provider to perform
administrative actions on the business's account, such as
configuring account settings, managing users, or updating business
information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountManagement|null` |   |

### hasAccountManagement

### setAccountManagement

Service type for account management. Enables the provider to perform
administrative actions on the business's account, such as
configuring account settings, managing users, or updating business
information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountManagement` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccountAggregation

Service type for account aggregation. This enables the provider, which is
an advanced account, to manage multiple sub-accounts (client
accounts). Through this service, the advanced account provider can
perform administrative and operational tasks across all linked
sub-accounts.

This is useful for agencies, aggregators, or large retailers that need
centralized control over many Merchant Center accounts.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountAggregation|null` |   |

### hasAccountAggregation

### setAccountAggregation

Service type for account aggregation. This enables the provider, which is
an advanced account, to manage multiple sub-accounts (client
accounts). Through this service, the advanced account provider can
perform administrative and operational tasks across all linked
sub-accounts.

This is useful for agencies, aggregators, or large retailers that need
centralized control over many Merchant Center accounts.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountAggregation` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLocalListingManagement

Service type for local listings management. The business group associated
with the external account id will be used to provide local inventory to
this Merchant Center account.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.LocalListingManagement|null` |   |

### hasLocalListingManagement

### setLocalListingManagement

Service type for local listings management. The business group associated
with the external account id will be used to provide local inventory to
this Merchant Center account.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.LocalListingManagement` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getComparisonShopping

Service type for comparison shopping. The provider is a CSS (Comparison
Shopping Service) managing the account. See
<https://support.google.com/merchants/answer/12653197>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.ComparisonShopping|null` |   |

### hasComparisonShopping

### setComparisonShopping

Service type for comparison shopping. The provider is a CSS (Comparison
Shopping Service) managing the account. See
<https://support.google.com/merchants/answer/12653197>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.ComparisonShopping` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

Identifier. The resource name of the account service.

Format: `accounts/{account}/services/{service}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Identifier. The resource name of the account service.

Format: `accounts/{account}/services/{service}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProvider

Output only. The provider of the service. Either the reference to an
account such as `providers/123` or a well-known service provider (one of
`providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasProvider

### clearProvider

### setProvider

Output only. The provider of the service. Either the reference to an
account such as `providers/123` or a well-known service provider (one of
`providers/GOOGLE_ADS` or `providers/GOOGLE_BUSINESS_PROFILE`).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProviderDisplayName

Output only. The human-readable display name of the provider account.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setProviderDisplayName

Output only. The human-readable display name of the provider account.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHandshake

Output only. Information about the state of the service in terms of
establishing it (e.g. is it pending approval or approved).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Handshake|null` |   |

### hasHandshake

### clearHandshake

### setHandshake

Output only. Information about the state of the service in terms of
establishing it (e.g. is it pending approval or approved).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Handshake` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMutability

Output only. Whether the service is mutable (e.g. through Approve / Reject
RPCs). A service that was created through another system or API might be
immutable.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Mutability](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountService.Mutability). |

### setMutability

Output only. Whether the service is mutable (e.g. through Approve / Reject
RPCs). A service that was created through another system or API might be
immutable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Mutability](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.AccountService.Mutability). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getExternalAccountId

Immutable. An optional, immutable identifier that Google uses to refer to
this account when communicating with the provider. This should be the
unique account ID within the provider's system (for example, your shop ID
in Shopify).

If you have multiple accounts with the same provider - for instance,
different accounts for various regions --- the `external_account_id`
differentiates between them, ensuring accurate linking and integration
between Google and the provider.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setExternalAccountId

Immutable. An optional, immutable identifier that Google uses to refer to
this account when communicating with the provider. This should be the
unique account ID within the provider's system (for example, your shop ID
in Shopify).

If you have multiple accounts with the same provider - for instance,
different accounts for various regions --- the `external_account_id`
differentiates between them, ensuring accurate linking and integration
between Google and the provider.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getServiceType

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |