Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb
Overview
The inventory information at a place (e.g. a store) identified by a place ID.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>
Optional.
-
#availability ⇒ String
Optional.
-
#fulfillment_types ⇒ Array<String>
Optional.
-
#place_id ⇒ String
Optional.
-
#price_info ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo
The price information of a Product.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaLocalInventory
constructor
A new instance of GoogleCloudRetailV2alphaLocalInventory.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaLocalInventory
Returns a new instance of GoogleCloudRetailV2alphaLocalInventory.
4677 4678 4679 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4677 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>
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*. 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.
Corresponds to the JSON property attributes
4636 4637 4638 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4636 def attributes @attributes end |
#availability ⇒ String
Optional. The availability of the Product at this place_id. Default to
Availability.IN_STOCK. For primary products with variants set the availability
of the primary as Availability.OUT_OF_STOCK and set the true availability at
the variant level. This way the primary product will be considered "in stock"
as long as it has at least one variant in stock. For primary products with no
variants set the true availability at the primary level. Corresponding
properties: Google Merchant Center property availability. Schema.org property Offer.availability. This field is currently only used by the
Recommendations API. For Search, please make use of fulfillment_types or
custom attributes for similar behaviour. See here for more
details.
Corresponds to the JSON property availability
4653 4654 4655 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4653 def availability @availability end |
#fulfillment_types ⇒ Array<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.
Corresponds to the JSON property fulfillmentTypes
4665 4666 4667 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4665 def fulfillment_types @fulfillment_types end |
#place_id ⇒ String
Optional. The place ID for the current set of inventory information.
Corresponds to the JSON property placeId
4670 4671 4672 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4670 def place_id @place_id end |
#price_info ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo
The price information of a Product.
Corresponds to the JSON property priceInfo
4675 4676 4677 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4675 def price_info @price_info end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4682 4683 4684 4685 4686 4687 4688 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 4682 def update!(**args) @attributes = args[:attributes] if args.key?(:attributes) @availability = args[:availability] if args.key?(:availability) @fulfillment_types = args[:fulfillment_types] if args.key?(:fulfillment_types) @place_id = args[:place_id] if args.key?(:place_id) @price_info = args[:price_info] if args.key?(:price_info) end |