public final class PurchaseTransaction extends com.google.protobuf.GeneratedMessageV3 implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.Protobuf type
google.cloud.retail.v2alpha.PurchaseTransaction| Modifier and Type | Class and Description |
|---|---|
static class |
PurchaseTransaction.Builder
A transaction represents the entire purchase transaction.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
COST_FIELD_NUMBER |
static int |
CURRENCY_CODE_FIELD_NUMBER |
static int |
ID_FIELD_NUMBER |
static int |
REVENUE_FIELD_NUMBER |
static int |
TAX_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
float |
getCost()
All the costs associated with the products.
|
String |
getCurrencyCode()
Required.
|
com.google.protobuf.ByteString |
getCurrencyCodeBytes()
Required.
|
static PurchaseTransaction |
getDefaultInstance() |
PurchaseTransaction |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getId()
The transaction ID with a length limit of 128 characters.
|
com.google.protobuf.ByteString |
getIdBytes()
The transaction ID with a length limit of 128 characters.
|
com.google.protobuf.Parser<PurchaseTransaction> |
getParserForType() |
float |
getRevenue()
Required.
|
int |
getSerializedSize() |
float |
getTax()
All the taxes associated with the transaction.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static PurchaseTransaction.Builder |
newBuilder() |
static PurchaseTransaction.Builder |
newBuilder(PurchaseTransaction prototype) |
PurchaseTransaction.Builder |
newBuilderForType() |
protected PurchaseTransaction.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static PurchaseTransaction |
parseDelimitedFrom(InputStream input) |
static PurchaseTransaction |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PurchaseTransaction |
parseFrom(byte[] data) |
static PurchaseTransaction |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PurchaseTransaction |
parseFrom(ByteBuffer data) |
static PurchaseTransaction |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PurchaseTransaction |
parseFrom(com.google.protobuf.ByteString data) |
static PurchaseTransaction |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PurchaseTransaction |
parseFrom(com.google.protobuf.CodedInputStream input) |
static PurchaseTransaction |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PurchaseTransaction |
parseFrom(InputStream input) |
static PurchaseTransaction |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<PurchaseTransaction> |
parser() |
PurchaseTransaction.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ID_FIELD_NUMBER
public static final int REVENUE_FIELD_NUMBER
public static final int TAX_FIELD_NUMBER
public static final int COST_FIELD_NUMBER
public static final int CURRENCY_CODE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getId()
The transaction ID with a length limit of 128 characters.
string id = 1;getId in interface PurchaseTransactionOrBuilderpublic com.google.protobuf.ByteString getIdBytes()
The transaction ID with a length limit of 128 characters.
string id = 1;getIdBytes in interface PurchaseTransactionOrBuilderpublic float 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 revenue = 2 [(.google.api.field_behavior) = REQUIRED];getRevenue in interface PurchaseTransactionOrBuilderpublic float getTax()
All the taxes associated with the transaction.
float tax = 3;getTax in interface PurchaseTransactionOrBuilderpublic 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 = [revenue][google.cloud.retail.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;getCost in interface PurchaseTransactionOrBuilderpublic String getCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];getCurrencyCode in interface PurchaseTransactionOrBuilderpublic com.google.protobuf.ByteString getCurrencyCodeBytes()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];getCurrencyCodeBytes in interface PurchaseTransactionOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static PurchaseTransaction parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PurchaseTransaction parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PurchaseTransaction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PurchaseTransaction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PurchaseTransaction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PurchaseTransaction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PurchaseTransaction parseFrom(InputStream input) throws IOException
IOExceptionpublic static PurchaseTransaction parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PurchaseTransaction parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PurchaseTransaction parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PurchaseTransaction parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static PurchaseTransaction parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PurchaseTransaction.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static PurchaseTransaction.Builder newBuilder()
public static PurchaseTransaction.Builder newBuilder(PurchaseTransaction prototype)
public PurchaseTransaction.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected PurchaseTransaction.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static PurchaseTransaction getDefaultInstance()
public static com.google.protobuf.Parser<PurchaseTransaction> parser()
public com.google.protobuf.Parser<PurchaseTransaction> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public PurchaseTransaction getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.