Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddLocalInventoriesRequest

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 ProductService.AddLocalInventories method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaAddLocalInventoriesRequest

Returns a new instance of GoogleCloudRetailV2alphaAddLocalInventoriesRequest.



1355
1356
1357
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1355

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

Instance Attribute Details

#add_maskString

Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. Corresponds to the JSON property addMask

Returns:

  • (String)


1331
1332
1333
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1331

def add_mask
  @add_mask
end

#add_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 addTime

Returns:

  • (String)


1338
1339
1340
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1338

def add_time
  @add_time
end

#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)


1346
1347
1348
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1346

def allow_missing
  @allow_missing
end

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

Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request. Corresponds to the JSON property localInventories



1353
1354
1355
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1353

def local_inventories
  @local_inventories
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1360
1361
1362
1363
1364
1365
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1360

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