# Google Shopping Merchant Accounts V1 Client - Class ShippingSettings (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 ShippingSettings.

The Merchant Center account's [shipping
settings](https://support.google.com/merchants/answer/6069284). The
`ShippingSettings` resource lets you retrieve and update the shipping
settings of your advanced account and all its associated sub-accounts.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the shipping settings. Format: `accounts/{account}/shippingSettings`. For example, `accounts/123456/shippingSettings`. |
| `↳ services` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Service>` Optional. The target account's list of services. |
| `↳ warehouses` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Warehouse>` Optional. A list of warehouses which can be referred to in `services`. |
| `↳ etag` | `string` Required. This field helps avoid async issues. It ensures that the shipping setting data doesn't change between the `get` call and the `insert` call. The user should follow these steps: 1. Set the etag field as an empty string for the initial shipping setting creation. 2. After the initial creation, call the `get` method to obtain an etag and the current shipping setting data before calling `insert`. 3. Modify the shipping setting information. 4. Call the `insert` method with the shipping setting information and the etag obtained in step 2. 5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag. |

### getName

Identifier. The resource name of the shipping settings.

Format: `accounts/{account}/shippingSettings`. For example,
`accounts/123456/shippingSettings`.

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

### setName

Identifier. The resource name of the shipping settings.

Format: `accounts/{account}/shippingSettings`. For example,
`accounts/123456/shippingSettings`.

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

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

### getServices

Optional. The target account's list of services.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Service>` |   |

### setServices

Optional. The target account's list of services.

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

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

### getWarehouses

Optional. A list of warehouses which can be referred to in `services`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.Warehouse>` |   |

### setWarehouses

Optional. A list of warehouses which can be referred to in `services`.

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

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

### getEtag

Required. This field helps avoid async issues. It ensures that the shipping
setting
data doesn't change between the `get` call and the `insert` call. The user
should follow these steps:

1. Set the etag field as an empty string for the initial shipping setting
   creation.

2. After the initial creation, call the `get` method to obtain an etag and
   the current shipping setting data before calling `insert`.

3. Modify the shipping setting information.
4. Call the `insert` method with the shipping setting information and the etag obtained in step 2.
5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag.

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

### setEtag

Required. This field helps avoid async issues. It ensures that the shipping
setting
data doesn't change between the `get` call and the `insert` call. The user
should follow these steps:

1. Set the etag field as an empty string for the initial shipping setting
   creation.

2. After the initial creation, call the `get` method to obtain an etag and
   the current shipping setting data before calling `insert`.

3. Modify the shipping setting information.
4. Call the `insert` method with the shipping setting information and the etag obtained in step 2.
5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag.

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

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