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

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 feed specification.

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

Namespace

Google \ Shopping \ Merchant \ Inventories \ V1beta

Methods

__construct

Constructor.

Parameters
NameDescription
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. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory feed 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 feed 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 feed 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 feed 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 feed specification in its generic form.

getName

Output only. The name of the LocalInventory resource.

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

Returns
TypeDescription
string

setName

Output only. The name of the LocalInventory resource.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAccount

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

Returns
TypeDescription
int|string

setAccount

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

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getStoreCode

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

Returns
TypeDescription
string

setStoreCode

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPrice

Price of the product at this store.

Returns
TypeDescription
Google\Shopping\Type\Price|null

hasPrice

clearPrice

setPrice

Price of the product at this store.

Parameter
NameDescription
var Google\Shopping\Type\Price
Returns
TypeDescription
$this

getSalePrice

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

Returns
TypeDescription
Google\Shopping\Type\Price|null

hasSalePrice

clearSalePrice

setSalePrice

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

Parameter
NameDescription
var Google\Shopping\Type\Price
Returns
TypeDescription
$this

getSalePriceEffectiveDate

The TimePeriod of the sale at this store.

Returns
TypeDescription
Google\Type\Interval|null

hasSalePriceEffectiveDate

clearSalePriceEffectiveDate

setSalePriceEffectiveDate

The TimePeriod of the sale at this store.

Parameter
NameDescription
var Google\Type\Interval
Returns
TypeDescription
$this

getAvailability

Availability of the product at this store.

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

Returns
TypeDescription
string

hasAvailability

clearAvailability

setAvailability

Availability of the product at this store.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getQuantity

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

Returns
TypeDescription
int|string

hasQuantity

clearQuantity

setQuantity

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

Parameter
NameDescription
var int|string
Returns
TypeDescription
$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 feed specification

Returns
TypeDescription
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 feed specification

Parameter
NameDescription
var string
Returns
TypeDescription
$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 feed specification

Returns
TypeDescription
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 feed specification

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInstoreProductLocation

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

Returns
TypeDescription
string

hasInstoreProductLocation

clearInstoreProductLocation

setInstoreProductLocation

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCustomAttributes

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setCustomAttributes

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

Parameter
NameDescription
var array<Google\Shopping\Type\CustomAttribute>
Returns
TypeDescription
$this