Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSetInventoryRequest

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

Overview

Request message for SetInventory method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaSetInventoryRequest

Returns a new instance of GoogleCloudRetailV2betaSetInventoryRequest.



3924
3925
3926
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3924

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, an INVALID_ARGUMENT error is returned if the Product is not found. Corresponds to the JSON property allowMissing

Returns:

  • (Boolean)


3900
3901
3902
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3900

def allow_missing
  @allow_missing
end

#inventoryGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct

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



3907
3908
3909
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3907

def inventory
  @inventory
end

#set_maskString

Indicates which inventory fields in the provided Product to update. If 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 setMask

Returns:

  • (String)


3915
3916
3917
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3915

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)


3922
3923
3924
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3922

def set_time
  @set_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3929
3930
3931
3932
3933
3934
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3929

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