Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::ProductEventDetail (v0.4.1)

Reference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::ProductEventDetail.

ProductEventDetail captures user event information specific to retail products.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#cart_id

def cart_id() -> ::String
Returns
  • (::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.

#cart_id=

def cart_id=(value) -> ::String
Parameter
  • value (::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.

Returns
  • (::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.

#list_id

def list_id() -> ::String
Returns
  • (::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.

#list_id=

def list_id=(value) -> ::String
Parameter
  • value (::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.
Returns
  • (::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.

#page_categories

def page_categories() -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>
Returns
  • (::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>) — 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"].

#page_categories=

def page_categories=(value) -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>
Parameter
  • value (::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>) — 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"].
Returns
  • (::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>) — 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"].

#product_details

def product_details() -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::ProductDetail>
Returns
  • (::Array<::Google::Cloud::RecommendationEngine::V1beta1::ProductDetail>) —

    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.

    This field is not allowed for the following event types:

    • category-page-view
    • home-page-view
    • search

#product_details=

def product_details=(value) -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::ProductDetail>
Parameter
  • value (::Array<::Google::Cloud::RecommendationEngine::V1beta1::ProductDetail>) —

    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.

    This field is not allowed for the following event types:

    • category-page-view
    • home-page-view
    • search
Returns
  • (::Array<::Google::Cloud::RecommendationEngine::V1beta1::ProductDetail>) —

    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.

    This field is not allowed for the following event types:

    • category-page-view
    • home-page-view
    • search

#purchase_transaction

def purchase_transaction() -> ::Google::Cloud::RecommendationEngine::V1beta1::PurchaseTransaction
Returns

#purchase_transaction=

def purchase_transaction=(value) -> ::Google::Cloud::RecommendationEngine::V1beta1::PurchaseTransaction
Parameter
Returns

#search_query

def search_query() -> ::String
Returns
  • (::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.

#search_query=

def search_query=(value) -> ::String
Parameter
  • value (::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.
Returns
  • (::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.