Discovery Engine v1 API - Class TransactionInfo (1.3.0)

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

Reference documentation and code samples for the Discovery Engine v1 API class TransactionInfo.

A transaction represents the entire purchase transaction.

Inheritance

object > TransactionInfo

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Constructors

TransactionInfo()

public TransactionInfo()

TransactionInfo(TransactionInfo)

public TransactionInfo(TransactionInfo other)
Parameter
Name Description
other TransactionInfo

Properties

Cost

public float Cost { get; set; }

All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that:

  • Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
Property Value
Type Description
float

Currency

public string Currency { get; set; }

Required. Currency code. Use three-character ISO-4217 code.

Property Value
Type Description
string

DiscountValue

public float DiscountValue { get; set; }

The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]

For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value]

This means that profit is calculated the same way, regardless of the discount value, and that [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]:

  • Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
Property Value
Type Description
float

HasCost

public bool HasCost { get; }

Gets whether the "cost" field is set

Property Value
Type Description
bool

HasDiscountValue

public bool HasDiscountValue { get; }

Gets whether the "discount_value" field is set

Property Value
Type Description
bool

HasTax

public bool HasTax { get; }

Gets whether the "tax" field is set

Property Value
Type Description
bool

HasValue

public bool HasValue { get; }

Gets whether the "value" field is set

Property Value
Type Description
bool

Tax

public float Tax { get; set; }

All the taxes associated with the transaction.

Property Value
Type Description
float

TransactionId

public string TransactionId { get; set; }

The transaction ID with a length limit of 128 characters.

Property Value
Type Description
string

Value

public float Value { get; set; }

Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.

Property Value
Type Description
float