1.0.0-beta25 (latest) 1.0.0-beta24

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

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

A transaction represents the entire purchase transaction.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> TransactionInfo

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TransactionInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.TransactionInfo), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TransactionInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.TransactionInfo), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TransactionInfo](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.TransactionInfo), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.DiscoveryEngine.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)

## Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

## Constructors

### TransactionInfo()

    public TransactionInfo()

### TransactionInfo(TransactionInfo)

    public TransactionInfo(TransactionInfo other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.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.v1beta.TransactionInfo.value\] - \[tax\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.tax\] - \[cost\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.cost\]

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### Currency

    public string Currency { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.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.v1beta.TransactionInfo.value\]

For example, if a user paid
\[TransactionInfo.value\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\]
amount, then nominal (pre-discount) value of the transaction is the sum of
\[TransactionInfo.value\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\]
and
\[TransactionInfo.discount_value\]\[google.cloud.discoveryengine.v1beta.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.v1beta.TransactionInfo.discount_value\]
can be larger than
\[TransactionInfo.value\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\]:

- Profit = \[value\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\] - \[tax\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.tax\] - \[cost\]\[google.cloud.discoveryengine.v1beta.TransactionInfo.cost\]

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### HasCost

    public bool HasCost { get; }

Gets whether the "cost" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasDiscountValue

    public bool HasDiscountValue { get; }

Gets whether the "discount_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasTax

    public bool HasTax { get; }

Gets whether the "tax" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasValue

    public bool HasValue { get; }

Gets whether the "value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Tax

    public float Tax { get; set; }

All the taxes associated with the transaction.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |

### TransactionId

    public string TransactionId { get; set; }

The transaction ID with a length limit of 128 characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.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** |
| `https://learn.microsoft.com/dotnet/api/system.single` |   |