Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductDetail
- Inherits:
-
Object
- Object
- Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductDetail
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/recommendationengine_v1beta1/classes.rb,
lib/google/apis/recommendationengine_v1beta1/representations.rb,
lib/google/apis/recommendationengine_v1beta1/representations.rb
Overview
Detailed product information associated with a user event.
Instance Attribute Summary collapse
-
#available_quantity ⇒ Fixnum
Optional.
-
#currency_code ⇒ String
Optional.
-
#display_price ⇒ Float
Optional.
-
#id ⇒ String
Required.
-
#item_attributes ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1FeatureMap
FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.
-
#original_price ⇒ Float
Optional.
-
#quantity ⇒ Fixnum
Optional.
-
#stock_state ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductDetail
constructor
A new instance of GoogleCloudRecommendationengineV1beta1ProductDetail.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductDetail
Returns a new instance of GoogleCloudRecommendationengineV1beta1ProductDetail.
1341 1342 1343 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1341 def initialize(**args) update!(**args) end |
Instance Attribute Details
#available_quantity ⇒ Fixnum
Optional. Quantity of the products in stock when a user event happens.
Optional. If provided, this overrides the available quantity in Catalog for
this event. and can only be set if stock_status
is set to IN_STOCK
. Note
that if an item is out of stock, you must set the stock_state
field to be
OUT_OF_STOCK
. Leaving this field unspecified / as zero is not sufficient to
mark the item out of stock.
Corresponds to the JSON property availableQuantity
1294 1295 1296 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1294 def available_quantity @available_quantity end |
#currency_code ⇒ String
Optional. Currency code for price/costs. Use three-character ISO-4217 code.
Required only if originalPrice or displayPrice is set.
Corresponds to the JSON property currencyCode
1300 1301 1302 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1300 def currency_code @currency_code end |
#display_price ⇒ Float
Optional. Display price of the product (e.g. discounted price). If provided,
this will override the display price in Catalog for this product.
Corresponds to the JSON property displayPrice
1306 1307 1308 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1306 def display_price @display_price end |
#id ⇒ String
Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
characters.
Corresponds to the JSON property id
1312 1313 1314 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1312 def id @id end |
#item_attributes ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1FeatureMap
FeatureMap represents extra features that customers want to include in the
recommendation model for catalogs/user events as categorical/numerical
features.
Corresponds to the JSON property itemAttributes
1319 1320 1321 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1319 def item_attributes @item_attributes end |
#original_price ⇒ Float
Optional. Original price of the product. If provided, this will override the
original price in Catalog for this product.
Corresponds to the JSON property originalPrice
1325 1326 1327 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1325 def original_price @original_price end |
#quantity ⇒ Fixnum
Optional. 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 add-
to-cart
event. Required for add-to-cart
, add-to-list
, remove-from-cart
,
checkout-start
, purchase-complete
, refund
event types.
Corresponds to the JSON property quantity
1333 1334 1335 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1333 def quantity @quantity end |
#stock_state ⇒ String
Optional. Item stock state. If provided, this overrides the stock state in
Catalog for items in this event.
Corresponds to the JSON property stockState
1339 1340 1341 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1339 def stock_state @stock_state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1346 def update!(**args) @available_quantity = args[:available_quantity] if args.key?(:available_quantity) @currency_code = args[:currency_code] if args.key?(:currency_code) @display_price = args[:display_price] if args.key?(:display_price) @id = args[:id] if args.key?(:id) @item_attributes = args[:item_attributes] if args.key?(:item_attributes) @original_price = args[:original_price] if args.key?(:original_price) @quantity = args[:quantity] if args.key?(:quantity) @stock_state = args[:stock_state] if args.key?(:stock_state) end |