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.
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:
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]:
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eTransactionInfo\u003c/code\u003e class in the Discovery Engine v1beta API represents a complete purchase transaction, with its latest version being 1.0.0-beta18.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities for message handling, equality comparisons, deep cloning, and buffer message handling, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransactionInfo\u003c/code\u003e class includes properties for managing financial details such as \u003ccode\u003eCost\u003c/code\u003e, \u003ccode\u003eCurrency\u003c/code\u003e, \u003ccode\u003eDiscountValue\u003c/code\u003e, \u003ccode\u003eTax\u003c/code\u003e, and \u003ccode\u003eValue\u003c/code\u003e, which represent various aspects of the transaction's monetary value and associated costs.\u003c/p\u003e\n"],["\u003cp\u003eIt also contains a \u003ccode\u003eTransactionId\u003c/code\u003e property to store the transaction's unique identifier, limited to 128 characters, along with properties like \u003ccode\u003eHasCost\u003c/code\u003e, \u003ccode\u003eHasDiscountValue\u003c/code\u003e, \u003ccode\u003eHasTax\u003c/code\u003e, and \u003ccode\u003eHasValue\u003c/code\u003e, that indicate whether the respective financial fields have been set.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two constructors: a parameterless \u003ccode\u003eTransactionInfo()\u003c/code\u003e and another one that takes another \u003ccode\u003eTransactionInfo\u003c/code\u003e object as a parameter in order to create a new \u003ccode\u003eTransactionInfo\u003c/code\u003e based on an existing one.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class TransactionInfo (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.TransactionInfo)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.TransactionInfo) \n\n public sealed class TransactionInfo : IMessage\u003cTransactionInfo\u003e, IEquatable\u003cTransactionInfo\u003e, IDeepCloneable\u003cTransactionInfo\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class TransactionInfo.\n\nA transaction represents the entire purchase transaction. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TransactionInfo \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TransactionInfo](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.TransactionInfo), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TransactionInfo](/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](/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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nConstructors\n------------\n\n### TransactionInfo()\n\n public TransactionInfo()\n\n### TransactionInfo(TransactionInfo)\n\n public TransactionInfo(TransactionInfo other)\n\nProperties\n----------\n\n### Cost\n\n public float Cost { get; set; }\n\nAll the costs associated with the products. These can be manufacturing\ncosts, shipping expenses not borne by the end user, or any other costs,\nsuch that:\n\n- Profit = \\[value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\\] - \\[tax\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.tax\\] - \\[cost\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.cost\\]\n\n### Currency\n\n public string Currency { get; set; }\n\nRequired. Currency code. Use three-character ISO-4217 code.\n\n### DiscountValue\n\n public float DiscountValue { get; set; }\n\nThe total discount(s) value applied to this transaction.\nThis figure should be excluded from\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\\]\n\nFor example, if a user paid\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\\]\namount, then nominal (pre-discount) value of the transaction is the sum of\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\\]\nand\n\\[TransactionInfo.discount_value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value\\]\n\nThis means that profit is calculated the same way, regardless of the\ndiscount value, and that\n\\[TransactionInfo.discount_value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value\\]\ncan be larger than\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\\]:\n\n- Profit = \\[value\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.value\\] - \\[tax\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.tax\\] - \\[cost\\]\\[google.cloud.discoveryengine.v1beta.TransactionInfo.cost\\]\n\n### HasCost\n\n public bool HasCost { get; }\n\nGets whether the \"cost\" field is set\n\n### HasDiscountValue\n\n public bool HasDiscountValue { get; }\n\nGets whether the \"discount_value\" field is set\n\n### HasTax\n\n public bool HasTax { get; }\n\nGets whether the \"tax\" field is set\n\n### HasValue\n\n public bool HasValue { get; }\n\nGets whether the \"value\" field is set\n\n### Tax\n\n public float Tax { get; set; }\n\nAll the taxes associated with the transaction.\n\n### TransactionId\n\n public string TransactionId { get; set; }\n\nThe transaction ID with a length limit of 128 characters.\n\n### Value\n\n public float Value { get; set; }\n\nRequired. Total non-zero value associated with the transaction. This value\nmay include shipping, tax, or other adjustments to the total value that you\nwant to include."]]