Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItem
- Inherits:
-
Object
- Object
- Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItem
- 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
ProductCatalogItem captures item metadata specific to retail products.
Instance Attribute Summary collapse
-
#available_quantity ⇒ Fixnum
Optional.
-
#canonical_product_uri ⇒ String
Optional.
-
#costs ⇒ Hash<String,Float>
Optional.
-
#currency_code ⇒ String
Optional.
-
#exact_price ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
Exact product price.
-
#images ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Image>
Optional.
-
#price_range ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
Product price range when there are a range of prices for different variations of the same product.
-
#stock_state ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductCatalogItem
constructor
A new instance of GoogleCloudRecommendationengineV1beta1ProductCatalogItem.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductCatalogItem
Returns a new instance of GoogleCloudRecommendationengineV1beta1ProductCatalogItem.
1213 1214 1215 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1213 def initialize(**args) update!(**args) end |
Instance Attribute Details
#available_quantity ⇒ Fixnum
Optional. The available quantity of the item.
Corresponds to the JSON property availableQuantity
1170 1171 1172 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1170 def available_quantity @available_quantity end |
#canonical_product_uri ⇒ String
Optional. Canonical URL directly linking to the item detail page with a length
limit of 5 KiB..
Corresponds to the JSON property canonicalProductUri
1176 1177 1178 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1176 def canonical_product_uri @canonical_product_uri end |
#costs ⇒ Hash<String,Float>
Optional. A map to pass the costs associated with the product. For example: "
manufacturing": 45.5
The profit of selling this item is computed like so: *
If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If '
priceRange' is provided, profit = minPrice - sum(costs)
Corresponds to the JSON property costs
1184 1185 1186 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1184 def costs @costs end |
#currency_code ⇒ String
Optional. Only required if the price is set. Currency code for price/costs.
Use three-character ISO-4217 code.
Corresponds to the JSON property currencyCode
1190 1191 1192 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1190 def currency_code @currency_code end |
#exact_price ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
Exact product price.
Corresponds to the JSON property exactPrice
1195 1196 1197 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1195 def exact_price @exact_price end |
#images ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Image>
Optional. Product images for the catalog item.
Corresponds to the JSON property images
1200 1201 1202 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1200 def images @images end |
#price_range ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
Product price range when there are a range of prices for different variations
of the same product.
Corresponds to the JSON property priceRange
1206 1207 1208 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1206 def price_range @price_range end |
#stock_state ⇒ String
Optional. Online stock state of the catalog item. Default is IN_STOCK
.
Corresponds to the JSON property stockState
1211 1212 1213 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1211 def stock_state @stock_state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1218 def update!(**args) @available_quantity = args[:available_quantity] if args.key?(:available_quantity) @canonical_product_uri = args[:canonical_product_uri] if args.key?(:canonical_product_uri) @costs = args[:costs] if args.key?(:costs) @currency_code = args[:currency_code] if args.key?(:currency_code) @exact_price = args[:exact_price] if args.key?(:exact_price) @images = args[:images] if args.key?(:images) @price_range = args[:price_range] if args.key?(:price_range) @stock_state = args[:stock_state] if args.key?(:stock_state) end |