View Source GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PurchaseTransaction (google_api_recommendation_engine v0.4.6)

A transaction represents the entire purchase transaction.

Attributes

  • costs (type: map(), default: nil) - 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.
  • currencyCode (type: String.t, default: nil) - Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is refund.
  • id (type: String.t, default: nil) - Optional. The transaction ID with a length limit of 128 bytes.
  • revenue (type: number(), default: nil) - 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 (type: map(), default: nil) - Optional. All the taxes associated with the transaction.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() ::
  %GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PurchaseTransaction{
    costs: map() | nil,
    currencyCode: String.t() | nil,
    id: String.t() | nil,
    revenue: number() | nil,
    taxes: map() | nil
  }

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.