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

A non-empty list of row or column headers for a table.

Exactly one of `prices`, `weights`,
`num_items`, `postal_code_group_names`, or
`location` must be set.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ prices` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html>` Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "\<= $10", "\<= $500", and "\> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. |
| `↳ weights` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Weight.html>` Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. |
| `↳ number_of_items` | `string[]` Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can only be set if all other fields are not set. |
| `↳ postal_code_group_names` | `string[]` Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. |
| `↳ locations` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1.LocationIdSet>` Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. |

### getPrices

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html>` |   |

### setPrices

Required. A list of inclusive order price upper bounds. The last price's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "currency_code": "USD"},
{"amount_micros": 500000000, "currency_code": "USD"},
{"amount_micros": -1, "currency_code": "USD"}]` represents the headers
"\<= $10", "\<= $500", and "\> $500". All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html>` |

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

### getWeights

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Weight.html>` |   |

### setWeights

Required. A list of inclusive order weight upper bounds. The last weight's
value can be infinity by setting price amount_micros = -1. For example
`[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
"unit": "kg"},
{"amount_micros": -1, "unit": "kg"}]` represents the headers
"\<= 10kg", "\<= 50kg", and "\> 50kg". All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Weight.html>` |

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

### getNumberOfItems

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setNumberOfItems

Required. A list of inclusive number of items upper bounds. The last value
can be
`"infinity"`. For example
`["10", "50", "infinity"]` represents the headers
"\<= 10 items", "\<= 50 items", and "\> 50 items". Must be non-empty. Can
only be set if all other fields are not set.

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

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

### getPostalCodeGroupNames

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setPostalCodeGroupNames

Required. A list of postal group names. The last value can be
`"all other locations"`. Example:
`["zone 1", "zone 2", "all other locations"]`. The referred
postal code groups must match the delivery country of the service. Must
be non-empty. Can only be set if all other fields are not set.

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

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

### getLocations

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

| **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.LocationIdSet>` |   |

### setLocations

Required. A list of location ID sets. Must be non-empty. Can only be set if
all other fields are not set.

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

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