# Google Cloud Retail V2 Client - Class LocalInventory (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.1 2.1.3 2.0.0 1.7.0 1.6.4 1.5.0 1.4.2 1.3.1 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Retail V2 Client class LocalInventory.

The inventory information at a place (e.g. a store) identified
by a place ID.

Generated from protobuf message `google.cloud.retail.v2.LocalInventory`

## Namespace

Google \\ Cloud \\ Retail \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ place_id` | `string` Optional. The place ID for the current set of inventory information. |
| `↳ price_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.PriceInfo` Optional. Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| `↳ attributes` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: \* \* At most 30 attributes are allowed. \* \* The key must be a UTF-8 encoded string with a length limit of 32 characters. \* \* The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, key0LikeThis or KEY_1_LIKE_THIS. \* \* The attribute values must be of the same type (text or number). \* \* Only 1 value is allowed for each attribute. \* \* For text values, the length limit is 256 UTF-8 characters. \* \* The attribute does not support search. The `searchable` field should be unset or set to false. \* \* The max summed total bytes of custom attribute keys and values per product is 5MiB. |
| `↳ fulfillment_types` | `string[]` Optional. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: \* \* "pickup-in-store" \* \* "ship-to-store" \* \* "same-day-delivery" \* \* "next-day-delivery" \* \* "custom-type-1" \* \* "custom-type-2" \* \* "custom-type-3" \* \* "custom-type-4" \* \* "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned. |

### getPlaceId

Optional. The place ID for the current set of inventory information.

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

### setPlaceId

Optional. The place ID for the current set of inventory information.

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

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

### getPriceInfo

Optional. Product price and cost information.

Google Merchant Center property
[price](https://support.google.com/merchants/answer/6324371).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.PriceInfo|null` |   |

### hasPriceInfo

### clearPriceInfo

### setPriceInfo

Optional. Product price and cost information.

Google Merchant Center property
[price](https://support.google.com/merchants/answer/6324371).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.PriceInfo` |

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

### getAttributes

Optional. Additional local inventory attributes, for example, store name,
promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:

- At most 30 attributes are allowed.
- The key must be a UTF-8 encoded string with a length limit of 32 characters.
- The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, key0LikeThis or KEY_1_LIKE_THIS.
- The attribute values must be of the same type (text or number).
- Only 1 value is allowed for each attribute.
- For text values, the length limit is 256 UTF-8 characters.
- The attribute does not support search. The `searchable` field should be unset or set to false.
- The max summed total bytes of custom attribute keys and values per product is 5MiB.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setAttributes

Optional. Additional local inventory attributes, for example, store name,
promotion tags, etc.

This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:

- At most 30 attributes are allowed.
- The key must be a UTF-8 encoded string with a length limit of 32 characters.
- The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, key0LikeThis or KEY_1_LIKE_THIS.
- The attribute values must be of the same type (text or number).
- Only 1 value is allowed for each attribute.
- For text values, the length limit is 256 UTF-8 characters.
- The attribute does not support search. The `searchable` field should be unset or set to false.
- The max summed total bytes of custom attribute keys and values per product is 5MiB.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getFulfillmentTypes

Optional. Supported fulfillment types. Valid fulfillment type values
include commonly used types (such as pickup in store and same day
delivery), and custom types. Customers have to map custom types to their
display names before rendering UI.

Supported values:

- "pickup-in-store"
- "ship-to-store"
- "same-day-delivery"
- "next-day-delivery"
- "custom-type-1"
- "custom-type-2"
- "custom-type-3"
- "custom-type-4"
- "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.

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

### setFulfillmentTypes

Optional. Supported fulfillment types. Valid fulfillment type values
include commonly used types (such as pickup in store and same day
delivery), and custom types. Customers have to map custom types to their
display names before rendering UI.

Supported values:

- "pickup-in-store"
- "ship-to-store"
- "same-day-delivery"
- "next-day-delivery"
- "custom-type-1"
- "custom-type-2"
- "custom-type-3"
- "custom-type-4"
- "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.

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

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