Google Cloud Retail V2 Client - Class LocalInventory (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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ place_id string

The place ID for the current set of inventory information.

↳ price_info Google\Cloud\Retail\V2\PriceInfo

Product price and cost information. Google Merchant Center property price.

↳ attributes array|Google\Protobuf\Internal\MapField

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 array

Input only. 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

The place ID for the current set of inventory information.

Generated from protobuf field string place_id = 1;

Returns
TypeDescription
string

setPlaceId

The place ID for the current set of inventory information.

Generated from protobuf field string place_id = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPriceInfo

Product price and cost information.

Google Merchant Center property price.

Generated from protobuf field .google.cloud.retail.v2.PriceInfo price_info = 2;

Returns
TypeDescription
Google\Cloud\Retail\V2\PriceInfo|null

hasPriceInfo

clearPriceInfo

setPriceInfo

Product price and cost information.

Google Merchant Center property price.

Generated from protobuf field .google.cloud.retail.v2.PriceInfo price_info = 2;

Parameter
NameDescription
var Google\Cloud\Retail\V2\PriceInfo
Returns
TypeDescription
$this

getAttributes

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.

Generated from protobuf field map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setAttributes

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.

Generated from protobuf field map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 3;

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getFulfillmentTypes

Input only. 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.

Generated from protobuf field repeated string fulfillment_types = 4 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setFulfillmentTypes

Input only. 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.

Generated from protobuf field repeated string fulfillment_types = 4 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this