# Google Shopping Merchant Accounts V1beta 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

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Shopping Merchant Accounts V1beta Client class ShippingSettings.

The merchant account's [shipping
setting](https://support.google.com/merchants/answer/6069284).

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

## Namespace

Google \\ Shopping \\ Merchant \\ Accounts \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the shipping setting. Format: `accounts/{account}/shippingSetting` |
| `↳ services` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.Service>` Optional. The target account's list of services. |
| `↳ warehouses` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.Warehouse>` Optional. A list of warehouses which can be referred to in `services`. |
| `↳ etag` | `string` Required. This field is used for avoid async issue. Make sure shipping setting data didn't change between get call and insert call. The user should do following steps： 1. Set etag field as empty string for initial shipping setting creation. 2. After initial creation, call get method to obtain an etag and current shipping setting data before call insert. 3. Modify to wanted shipping setting information. 4. Call insert method with the wanted shipping setting information with the etag obtained from step 2. 5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag. |

### getName

Identifier. The resource name of the shipping setting.

Format: `accounts/{account}/shippingSetting`

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

### setName

Identifier. The resource name of the shipping setting.

Format: `accounts/{account}/shippingSetting`

| **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/V1beta.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/V1beta.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/V1beta.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/V1beta.Warehouse>` |

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

### getEtag

Required. This field is used for avoid async issue. Make sure shipping
setting data
didn't change between get call and insert call. The user should do
following steps：

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

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

3. Modify to wanted shipping setting information.
4. Call insert method with the wanted shipping setting information with the etag obtained from step 2.
5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag.

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

### setEtag

Required. This field is used for avoid async issue. Make sure shipping
setting data
didn't change between get call and insert call. The user should do
following steps：

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

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

3. Modify to wanted shipping setting information.
4. Call insert method with the wanted shipping setting information with the etag obtained from step 2.
5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag.

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

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