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}
-
(::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}
-
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.
-
(::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
-
(::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
-
value (::String) — Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is
refund
.
-
(::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
- (::String) — Optional. The transaction ID with a length limit of 128 bytes.
#id=
def id=(value) -> ::String
- value (::String) — Optional. The transaction ID with a length limit of 128 bytes.
- (::String) — Optional. The transaction ID with a length limit of 128 bytes.
#revenue
def revenue() -> ::Float
-
(::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
-
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
.
-
(::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}
- (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the taxes associated with the transaction.
#taxes=
def taxes=(value) -> ::Google::Protobuf::Map{::String => ::Float}
- value (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the taxes associated with the transaction.
- (::Google::Protobuf::Map{::String => ::Float}) — Optional. All the taxes associated with the transaction.