Reference documentation and code samples for the Google Cloud Retail V2 Client class PurchaseTransaction.
A transaction represents the entire purchase transaction.
Generated from protobuf message google.cloud.retail.v2.PurchaseTransaction
Namespace
Google \ Cloud \ Retail \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ id
string
The transaction ID with a length limit of 128 characters.
↳ revenue
float
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.
↳ tax
float
All the taxes associated with the transaction.
↳ cost
↳ currency_code
string
Required. Currency code. Use three-character ISO-4217 code.
getId
The transaction ID with a length limit of 128 characters.
string
setId
The transaction ID with a length limit of 128 characters.
var
string
$this
getRevenue
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.
float
setRevenue
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.
var
float
$this
getTax
All the taxes associated with the transaction.
float
setTax
All the taxes associated with the transaction.
var
float
$this
getCost
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:
float
setCost
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:
var
float
$this
getCurrencyCode
Required. Currency code. Use three-character ISO-4217 code.
string
setCurrencyCode
Required. Currency code. Use three-character ISO-4217 code.
var
string
$this