Class: Google::Apis::RetailV2::GoogleCloudRetailV2LocalInventory

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2LocalInventory

Returns a new instance of GoogleCloudRetailV2LocalInventory.



1372
1373
1374
# File 'lib/google/apis/retail_v2/classes.rb', line 1372

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#attributesHash<String,Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute>

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



1348
1349
1350
# File 'lib/google/apis/retail_v2/classes.rb', line 1348

def attributes
  @attributes
end

#fulfillment_typesArray<String>

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. Corresponds to the JSON property fulfillmentTypes

Returns:

  • (Array<String>)


1360
1361
1362
# File 'lib/google/apis/retail_v2/classes.rb', line 1360

def fulfillment_types
  @fulfillment_types
end

#place_idString

The place ID for the current set of inventory information. Corresponds to the JSON property placeId

Returns:

  • (String)


1365
1366
1367
# File 'lib/google/apis/retail_v2/classes.rb', line 1365

def place_id
  @place_id
end

#price_infoGoogle::Apis::RetailV2::GoogleCloudRetailV2PriceInfo

The price information of a Product. Corresponds to the JSON property priceInfo



1370
1371
1372
# File 'lib/google/apis/retail_v2/classes.rb', line 1370

def price_info
  @price_info
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1377
1378
1379
1380
1381
1382
# File 'lib/google/apis/retail_v2/classes.rb', line 1377

def update!(**args)
  @attributes = args[:attributes] if args.key?(:attributes)
  @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