Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetInventoryRequest

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.SetInventory method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaSetInventoryRequest

Returns a new instance of GoogleCloudRetailV2alphaSetInventoryRequest.



8298
8299
8300
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8298

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

Instance Attribute Details

#allow_missingBoolean Also known as: allow_missing?

If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until 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)


8275
8276
8277
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8275

def allow_missing
  @allow_missing
end

#inventoryGoogle::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct

Product captures all metadata information of items to be recommended or searched. Corresponds to the JSON property inventory



8282
8283
8284
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8282

def inventory
  @inventory
end

#set_maskString

Indicates which inventory fields in the provided Product to update. At least one field must be provided. 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 setMask

Returns:

  • (String)


8289
8290
8291
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8289

def set_mask
  @set_mask
end

#set_timeString

The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used. Corresponds to the JSON property setTime

Returns:

  • (String)


8296
8297
8298
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8296

def set_time
  @set_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8303
8304
8305
8306
8307
8308
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8303

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