Google Shopping Merchant Inventories V1beta Client - Class LocalInventory (0.4.5)

Reference documentation and code samples for the Google Shopping Merchant Inventories V1beta Client class LocalInventory.

Local inventory information for the product. Represents in-store information for a specific product at the store specified by storeCode.

For a list of all accepted attribute values, see the local product inventory data specification.

Generated from protobuf message google.shopping.merchant.inventories.v1beta.LocalInventory

Namespace

Google \ Shopping \ Merchant \ Inventories \ V1beta

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

↳ account int|string

Output only. The account that owns the product. This field will be ignored if set by the client.

↳ store_code string

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

↳ price Google\Shopping\Type\Price

Price of the product at this store.

↳ sale_price Google\Shopping\Type\Price

Sale price of the product at this store. Mandatory if salePriceEffectiveDate is defined.

↳ sale_price_effective_date Google\Type\Interval

The TimePeriod of the sale at this store.

↳ availability string

Availability of the product at this store. For accepted attribute values, see the local product inventory data specification

↳ quantity int|string

Quantity of the product available at this store. Must be greater than or equal to zero.

↳ pickup_method string

Supported pickup method for this product. Unless the value is "not supported", this field must be submitted together with pickupSla. For accepted attribute values, see the local product inventory data specification

↳ pickup_sla string

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod. For accepted attribute values, see the local product inventory data specification

↳ instore_product_location string

Location of the product inside the store. Maximum length is 20 bytes.

↳ custom_attributes array<Google\Shopping\Type\CustomAttribute>

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

getName

Output only. The name of the LocalInventory resource.

Format: accounts/{account}/products/{product}/localInventories/{store_code}

Returns
Type Description
string

setName

Output only. The name of the LocalInventory resource.

Format: accounts/{account}/products/{product}/localInventories/{store_code}

Parameter
Name Description
var string
Returns
Type Description
$this

getAccount

Output only. The account that owns the product. This field will be ignored if set by the client.

Returns
Type Description
int|string

setAccount

Output only. The account that owns the product. This field will be ignored if set by the client.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getStoreCode

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

Returns
Type Description
string

setStoreCode

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

Parameter
Name Description
var string
Returns
Type Description
$this

getPrice

Price of the product at this store.

Returns
Type Description
Google\Shopping\Type\Price|null

hasPrice

clearPrice

setPrice

Price of the product at this store.

Parameter
Name Description
var Google\Shopping\Type\Price
Returns
Type Description
$this

getSalePrice

Sale price of the product at this store. Mandatory if salePriceEffectiveDate is defined.

Returns
Type Description
Google\Shopping\Type\Price|null

hasSalePrice

clearSalePrice

setSalePrice

Sale price of the product at this store. Mandatory if salePriceEffectiveDate is defined.

Parameter
Name Description
var Google\Shopping\Type\Price
Returns
Type Description
$this

getSalePriceEffectiveDate

The TimePeriod of the sale at this store.

Returns
Type Description
Google\Type\Interval|null

hasSalePriceEffectiveDate

clearSalePriceEffectiveDate

setSalePriceEffectiveDate

The TimePeriod of the sale at this store.

Parameter
Name Description
var Google\Type\Interval
Returns
Type Description
$this

getAvailability

Availability of the product at this store.

For accepted attribute values, see the local product inventory data specification

Returns
Type Description
string

hasAvailability

clearAvailability

setAvailability

Availability of the product at this store.

For accepted attribute values, see the local product inventory data specification

Parameter
Name Description
var string
Returns
Type Description
$this

getQuantity

Quantity of the product available at this store. Must be greater than or equal to zero.

Returns
Type Description
int|string

hasQuantity

clearQuantity

setQuantity

Quantity of the product available at this store. Must be greater than or equal to zero.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getPickupMethod

Supported pickup method for this product. Unless the value is "not supported", this field must be submitted together with pickupSla.

For accepted attribute values, see the local product inventory data specification

Returns
Type Description
string

hasPickupMethod

clearPickupMethod

setPickupMethod

Supported pickup method for this product. Unless the value is "not supported", this field must be submitted together with pickupSla.

For accepted attribute values, see the local product inventory data specification

Parameter
Name Description
var string
Returns
Type Description
$this

getPickupSla

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod.

For accepted attribute values, see the local product inventory data specification

Returns
Type Description
string

hasPickupSla

clearPickupSla

setPickupSla

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod.

For accepted attribute values, see the local product inventory data specification

Parameter
Name Description
var string
Returns
Type Description
$this

getInstoreProductLocation

Location of the product inside the store. Maximum length is 20 bytes.

Returns
Type Description
string

hasInstoreProductLocation

clearInstoreProductLocation

setInstoreProductLocation

Location of the product inside the store. Maximum length is 20 bytes.

Parameter
Name Description
var string
Returns
Type Description
$this

getCustomAttributes

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setCustomAttributes

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

Parameter
Name Description
var array<Google\Shopping\Type\CustomAttribute>
Returns
Type Description
$this