Class: Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem
- Inherits:
-
Object
- Object
- Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb
Overview
ProductCatalogItem captures item metadata specific to retail products.
Defined Under Namespace
Modules: StockState Classes: CostsEntry, ExactPrice, PriceRange
Instance Attribute Summary collapse
-
#available_quantity ⇒ ::Integer
Optional.
-
#canonical_product_uri ⇒ ::String
Optional.
-
#costs ⇒ ::Google::Protobuf::Map{::String => ::Float}
Optional.
-
#currency_code ⇒ ::String
Optional.
-
#exact_price ⇒ ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice
Optional.
-
#images ⇒ ::Array<::Google::Cloud::RecommendationEngine::V1beta1::Image>
Optional.
-
#price_range ⇒ ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange
Optional.
-
#stock_state ⇒ ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState
Optional.
Instance Attribute Details
#available_quantity ⇒ ::Integer
Returns Optional. The available quantity of the item.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#canonical_product_uri ⇒ ::String
Returns Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#costs ⇒ ::Google::Protobuf::Map{::String => ::Float}
Returns 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).
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#currency_code ⇒ ::String
Returns Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#exact_price ⇒ ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice
Returns Optional. The exact product price.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#images ⇒ ::Array<::Google::Cloud::RecommendationEngine::V1beta1::Image>
Returns Optional. Product images for the catalog item.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#price_range ⇒ ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange
Returns Optional. The product price range.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |
#stock_state ⇒ ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState
Returns Optional. Online stock state of the catalog item. Default is IN_STOCK
.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'proto_docs/google/cloud/recommendationengine/v1beta1/catalog.rb', line 138 class ProductCatalogItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Exact product price. # @!attribute [rw] display_price # @return [::Float] # Optional. Display price of the product. # @!attribute [rw] original_price # @return [::Float] # Optional. Price of the product without any discount. If zero, by default # set to be the 'displayPrice'. class ExactPrice include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Product price range when there are a range of prices for different # variations of the same product. # @!attribute [rw] min # @return [::Float] # Required. The minimum product price. # @!attribute [rw] max # @return [::Float] # Required. The maximum product price. class PriceRange include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Float] class CostsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Item stock state. If this field is unspecified, the item is # assumed to be in stock. module StockState # Default item stock status. Should never be used. STOCK_STATE_UNSPECIFIED = 0 # Item in stock. IN_STOCK = 0 # Item out of stock. OUT_OF_STOCK = 1 # Item that is in pre-order state. PREORDER = 2 # Item that is back-ordered (i.e. temporarily out of stock). BACKORDER = 3 end end |