public sealed class PurchaseTransaction : IMessage<PurchaseTransaction>, IEquatable<PurchaseTransaction>, IDeepCloneable<PurchaseTransaction>, IBufferMessage, IMessage
Reference documentation and code samples for the Retail v2 API class PurchaseTransaction.
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:
Required. Total non-zero 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.
[[["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\u003eThis webpage provides documentation for the \u003ccode\u003ePurchaseTransaction\u003c/code\u003e class within the Google Cloud Retail V2 API, covering versions from 1.0.0 to the latest 2.12.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePurchaseTransaction\u003c/code\u003e represents a complete purchase transaction and is defined as a sealed class implementing multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties such as \u003ccode\u003eCost\u003c/code\u003e, \u003ccode\u003eCurrencyCode\u003c/code\u003e, \u003ccode\u003eId\u003c/code\u003e, \u003ccode\u003eRevenue\u003c/code\u003e, and \u003ccode\u003eTax\u003c/code\u003e to represent the financial aspects of a transaction, with \u003ccode\u003eCurrencyCode\u003c/code\u003e and \u003ccode\u003eRevenue\u003c/code\u003e being required.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation includes constructors for creating \u003ccode\u003ePurchaseTransaction\u003c/code\u003e objects, including an empty constructor and one that takes another \u003ccode\u003ePurchaseTransaction\u003c/code\u003e object as a parameter for copying.\u003c/p\u003e\n"],["\u003cp\u003eThe available versions of the \u003ccode\u003ePurchaseTransaction\u003c/code\u003e object are navigable on this webpage, with the latest being 2.12.0, and going back to 1.0.0.\u003c/p\u003e\n"]]],[],null,[]]