Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetLocalInventoriesRequest

Inherits:
Object
  • Object
show all
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

Request message for SetLocalInventories method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaSetLocalInventoriesRequest

Returns a new instance of GoogleCloudRetailV2alphaSetLocalInventoriesRequest.



3872
3873
3874
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3872

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

Instance Attribute Details

#allow_missingBoolean Also known as: allow_missing?

If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found. Corresponds to the JSON property allowMissing

Returns:

  • (Boolean)


3853
3854
3855
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3853

def allow_missing
  @allow_missing
end

#local_inventoriesArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory>

A list of inventory information at difference places. Each place is identified by its place ID. For example, if place1 and place2 are stored, and this list is [place1, place3] with a fresher set timestamp, then the stored places will become place1 and place3. An empty list removes all existing places with staler fields. At most 3000 inventories are allowed per request. Corresponds to the JSON property localInventories



3863
3864
3865
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3863

def local_inventories
  @local_inventories
end

#set_timeString

The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used. Corresponds to the JSON property setTime

Returns:

  • (String)


3870
3871
3872
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3870

def set_time
  @set_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3877
3878
3879
3880
3881
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 3877

def update!(**args)
  @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
  @local_inventories = args[:local_inventories] if args.key?(:local_inventories)
  @set_time = args[:set_time] if args.key?(:set_time)
end