Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductEventDetail
- Inherits:
-
Object
- Object
- Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductEventDetail
- 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
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
At least one of search_query or page_categories is 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.
1436 1437 1438 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1436 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
1388 1389 1390 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1388 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
1395 1396 1397 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1395 def list_id @list_id end |
#page_categories ⇒ Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy>
Required for category-page-view
events. At least one of search_query or
page_categories is required for search
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
1405 1406 1407 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1405 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
1422 1423 1424 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1422 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
1427 1428 1429 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1427 def purchase_transaction @purchase_transaction end |
#search_query ⇒ String
At least one of search_query or page_categories is 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
1434 1435 1436 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1434 def search_query @search_query end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1441 1442 1443 1444 1445 1446 1447 1448 |
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1441 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 |