Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class TransactionInfo.
A transaction represents the entire purchase transaction.
Generated from protobuf message google.cloud.discoveryengine.v1beta.TransactionInfo
Namespace
Google \ Cloud \ DiscoveryEngine \ V1betaMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ value
float
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.
↳ currency
string
Required. Currency code. Use three-character ISO-4217 code.
↳ transaction_id
string
The transaction ID with a length limit of 128 characters.
↳ tax
float
All the taxes associated with the transaction.
↳ cost
↳ discount_value
float
The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value : * Profit = value - tax - cost
getValue
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.
float
hasValue
clearValue
setValue
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.
var
float
$this
getCurrency
Required. Currency code. Use three-character ISO-4217 code.
string
setCurrency
Required. Currency code. Use three-character ISO-4217 code.
var
string
$this
getTransactionId
The transaction ID with a length limit of 128 characters.
string
setTransactionId
The transaction ID with a length limit of 128 characters.
var
string
$this
getTax
All the taxes associated with the transaction.
float
hasTax
clearTax
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
hasCost
clearCost
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
getDiscountValue
The total discount(s) value applied to this transaction.
This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value :
float
hasDiscountValue
clearDiscountValue
setDiscountValue
The total discount(s) value applied to this transaction.
This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value :
var
float
$this