Interface TransactionInfoOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
TransactionInfo
,TransactionInfo.Builder
public interface TransactionInfoOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description float
getCost()
All the costs associated with the products.String
getCurrency()
Required.com.google.protobuf.ByteString
getCurrencyBytes()
Required.float
getDiscountValue()
The total discount(s) value applied to this transaction.float
getTax()
All the taxes associated with the transaction.String
getTransactionId()
The transaction ID with a length limit of 128 characters.com.google.protobuf.ByteString
getTransactionIdBytes()
The transaction ID with a length limit of 128 characters.float
getValue()
Required.boolean
hasCost()
All the costs associated with the products.boolean
hasDiscountValue()
The total discount(s) value applied to this transaction.boolean
hasTax()
All the taxes associated with the transaction.boolean
hasValue()
Required.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
hasValue
boolean hasValue()
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.
optional float value = 1 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- Whether the value field is set.
-
getValue
float 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.
optional float value = 1 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- The value.
-
getCurrency
String getCurrency()
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- The currency.
-
getCurrencyBytes
com.google.protobuf.ByteString getCurrencyBytes()
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- The bytes for currency.
-
getTransactionId
String getTransactionId()
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;
- Returns:
- The transactionId.
-
getTransactionIdBytes
com.google.protobuf.ByteString getTransactionIdBytes()
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;
- Returns:
- The bytes for transactionId.
-
hasTax
boolean hasTax()
All the taxes associated with the transaction.
optional float tax = 4;
- Returns:
- Whether the tax field is set.
-
getTax
float getTax()
All the taxes associated with the transaction.
optional float tax = 4;
- Returns:
- The tax.
-
hasCost
boolean hasCost()
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: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float cost = 5;
- Returns:
- Whether the cost field is set.
-
getCost
float 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: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float cost = 5;
- Returns:
- The cost.
-
hasDiscountValue
boolean hasDiscountValue()
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]: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float discount_value = 6;
- Returns:
- Whether the discountValue field is set.
-
getDiscountValue
float getDiscountValue()
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]: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float discount_value = 6;
- Returns:
- The discountValue.
-
-