Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductEventDetail
- Inherits:
-
Object
- Object
- Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductEventDetail
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/recommendationengine_v1beta1/classes.rb,
generated/google/apis/recommendationengine_v1beta1/representations.rb,
generated/google/apis/recommendationengine_v1beta1/representations.rb
Overview
ProductEventDetail captures user event information specific to retail products.
Instance Attribute Summary collapse
-
#cart_id ⇒ String
Optional.
-
#list_id ⇒ String
Required for
add-to-list
andremove-from-list
events. -
#page_categories ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy>
Required for
category-page-view
events. -
#product_details ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductDetail>
The main product details related to the event.
-
#purchase_transaction ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PurchaseTransaction
A transaction represents the entire purchase transaction.
-
#search_query ⇒ String
Required for
search
events.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductEventDetail
constructor
A new instance of GoogleCloudRecommendationengineV1beta1ProductEventDetail.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductEventDetail
Returns a new instance of GoogleCloudRecommendationengineV1beta1ProductEventDetail.
1406 1407 1408 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1406 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cart_id ⇒ String
Optional. The id or name of the associated shopping cart. This id is used to
associate multiple items added or present in the cart before purchase. This
can only be set for add-to-cart
, remove-from-cart
, checkout-start
,
purchase-complete
, or shopping-cart-page-view
events.
Corresponds to the JSON property cartId
1360 1361 1362 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1360 def cart_id @cart_id end |
#list_id ⇒ String
Required for add-to-list
and remove-from-list
events. The id or name of
the list that the item is being added to or removed from. Other event types
should not set this field.
Corresponds to the JSON property listId
1367 1368 1369 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1367 def list_id @list_id end |
#page_categories ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy>
Required for category-page-view
events. Other event types should not set
this field. The categories associated with a category page. Category pages
include special pages such as sales or promotions. For instance, a special
sale page may have the category hierarchy: categories : ["Sales", "2017 Black
Friday Deals"].
Corresponds to the JSON property pageCategories
1376 1377 1378 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1376 def page_categories @page_categories end |
#product_details ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductDetail>
The main product details related to the event. This field is required for the
following event types: * add-to-cart
* add-to-list
* checkout-start
*
detail-page-view
* purchase-complete
* refund
* remove-from-cart
*
remove-from-list
This field is optional for the following event types: *
page-visit
* shopping-cart-page-view
- note that 'product_details' should
be set for this unless the shopping cart is empty. * search
(highly
encouraged) In a search
event, this field represents the products returned
to the end user on the current page (the end user may have not finished
broswing the whole page yet). When a new page is returned to the end user,
after pagination/filtering/ordering even for the same query, a new SEARCH
event with different product_details is desired. The end user may have not
finished broswing the whole page yet. This field is not allowed for the
following event types: * category-page-view
* home-page-view
Corresponds to the JSON property productDetails
1393 1394 1395 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1393 def product_details @product_details end |
#purchase_transaction ⇒ Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PurchaseTransaction
A transaction represents the entire purchase transaction.
Corresponds to the JSON property purchaseTransaction
1398 1399 1400 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1398 def purchase_transaction @purchase_transaction end |
#search_query ⇒ String
Required for search
events. Other event types should not set this field. The
user's search query as UTF-8 encoded text with a length limit of 5 KiB.
Corresponds to the JSON property searchQuery
1404 1405 1406 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1404 def search_query @search_query end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1411 1412 1413 1414 1415 1416 1417 1418 |
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1411 def update!(**args) @cart_id = args[:cart_id] if args.key?(:cart_id) @list_id = args[:list_id] if args.key?(:list_id) @page_categories = args[:page_categories] if args.key?(:page_categories) @product_details = args[:product_details] if args.key?(:product_details) @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction) @search_query = args[:search_query] if args.key?(:search_query) end |