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.
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.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]:
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 Google.Cloud.DiscoveryEngine.V1 API represents a complete purchase transaction, offering details like costs, currency, and discounts.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eTransactionInfo\u003c/code\u003e class is 1.6.0, with several prior versions (1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, and 1.0.0-beta06) also available for use.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes properties for managing transaction details such as \u003ccode\u003eCost\u003c/code\u003e, \u003ccode\u003eCurrency\u003c/code\u003e, \u003ccode\u003eDiscountValue\u003c/code\u003e, \u003ccode\u003eTax\u003c/code\u003e, \u003ccode\u003eTransactionId\u003c/code\u003e, and the total \u003ccode\u003eValue\u003c/code\u003e, allowing for in depth management of the transaction.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces like IMessage, IEquatable, IDeepCloneable, and IBufferMessage and inherits from object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransactionInfo\u003c/code\u003e class has constructors for creating a new instance and copying an existing instance, facilitating flexible object instantiation.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class TransactionInfo (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.TransactionInfo)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.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 v1 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.V1/latest/Google.Cloud.DiscoveryEngine.V1.TransactionInfo), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TransactionInfo](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.TransactionInfo), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TransactionInfo](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.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.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.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.v1.TransactionInfo.value\\] - \\[tax\\]\\[google.cloud.discoveryengine.v1.TransactionInfo.tax\\] - \\[cost\\]\\[google.cloud.discoveryengine.v1.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.v1.TransactionInfo.value\\]\n\nFor example, if a user paid\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1.TransactionInfo.value\\]\namount, then nominal (pre-discount) value of the transaction is the sum of\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1.TransactionInfo.value\\]\nand\n\\[TransactionInfo.discount_value\\]\\[google.cloud.discoveryengine.v1.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.v1.TransactionInfo.discount_value\\]\ncan be larger than\n\\[TransactionInfo.value\\]\\[google.cloud.discoveryengine.v1.TransactionInfo.value\\]:\n\n- Profit = \\[value\\]\\[google.cloud.discoveryengine.v1.TransactionInfo.value\\] - \\[tax\\]\\[google.cloud.discoveryengine.v1.TransactionInfo.tax\\] - \\[cost\\]\\[google.cloud.discoveryengine.v1.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."]]