Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductDetail

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

Detailed product information associated with a user event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaProductDetail

Returns a new instance of GoogleCloudRetailV2betaProductDetail.



3184
3185
3186
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3184

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

Instance Attribute Details

#productGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct

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



3174
3175
3176
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3174

def product
  @product
end

#quantityFixnum

Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for purchase- complete event. Required for add-to-cart and purchase-complete event types. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


3182
3183
3184
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3182

def quantity
  @quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3189
3190
3191
3192
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3189

def update!(**args)
  @product = args[:product] if args.key?(:product)
  @quantity = args[:quantity] if args.key?(:quantity)
end