Recommendations AI v1beta1 API - Class PurchaseTransaction (2.0.0-beta04)

public sealed class PurchaseTransaction : IMessage<PurchaseTransaction>, IEquatable<PurchaseTransaction>, IDeepCloneable<PurchaseTransaction>, IBufferMessage, IMessage

Reference documentation and code samples for the Recommendations AI v1beta1 API class PurchaseTransaction.

A transaction represents the entire purchase transaction.

Inheritance

object > PurchaseTransaction

Namespace

Google.Cloud.RecommendationEngine.V1Beta1

Assembly

Google.Cloud.RecommendationEngine.V1Beta1.dll

Constructors

PurchaseTransaction()

public PurchaseTransaction()

PurchaseTransaction(PurchaseTransaction)

public PurchaseTransaction(PurchaseTransaction other)
Parameter
NameDescription
otherPurchaseTransaction

Properties

Costs

public MapField<string, float> Costs { get; }

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.

Property Value
TypeDescription
MapFieldstringfloat

CurrencyCode

public string CurrencyCode { get; set; }

Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is refund.

Property Value
TypeDescription
string

Id

public string Id { get; set; }

Optional. The transaction ID with a length limit of 128 bytes.

Property Value
TypeDescription
string

Revenue

public float Revenue { get; set; }

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.

Property Value
TypeDescription
float

Taxes

public MapField<string, float> Taxes { get; }

Optional. All the taxes associated with the transaction.

Property Value
TypeDescription
MapFieldstringfloat