Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::PurchaseTransaction (v0.6.1)

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

A transaction represents the entire purchase transaction.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#costs

def costs() -> ::Google::Protobuf::Map{::String => ::Float}
Returns
  • (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.

    Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).

    If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.

#costs=

def costs=(value) -> ::Google::Protobuf::Map{::String => ::Float}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.

    Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).

    If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.

Returns
  • (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.

    Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).

    If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.

#currency_code

def currency_code() -> ::String
Returns
  • (::String) — Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is refund.

#currency_code=

def currency_code=(value) -> ::String
Parameter
  • value (::String) — Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is refund.
Returns
  • (::String) — Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is refund.

#id

def id() -> ::String
Returns
  • (::String) — Optional. The transaction ID with a length limit of 128 bytes.

#id=

def id=(value) -> ::String
Parameter
  • value (::String) — Optional. The transaction ID with a length limit of 128 bytes.
Returns
  • (::String) — Optional. The transaction ID with a length limit of 128 bytes.

#revenue

def revenue() -> ::Float
Returns
  • (::Float) — Required. Total revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations. This field is not required if the event type is refund.

#revenue=

def revenue=(value) -> ::Float
Parameter
  • value (::Float) — Required. Total revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations. This field is not required if the event type is refund.
Returns
  • (::Float) — Required. Total revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations. This field is not required if the event type is refund.

#taxes

def taxes() -> ::Google::Protobuf::Map{::String => ::Float}
Returns
  • (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the taxes associated with the transaction.

#taxes=

def taxes=(value) -> ::Google::Protobuf::Map{::String => ::Float}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the taxes associated with the transaction.
Returns
  • (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the taxes associated with the transaction.