- 0.92.0 (latest)
- 0.90.0
- 0.89.0
- 0.87.0
- 0.85.0
- 0.83.0
- 0.82.0
- 0.81.0
- 0.80.0
- 0.79.0
- 0.77.0
- 0.75.0
- 0.74.0
- 0.71.0
- 0.70.0
- 0.69.0
- 0.67.0
- 0.66.0
- 0.65.0
- 0.64.0
- 0.63.0
- 0.62.0
- 0.61.0
- 0.60.0
- 0.59.0
- 0.58.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.4
- 0.8.10
public static final class PurchaseTransaction.Builder extends GeneratedMessage.Builder<PurchaseTransaction.Builder> implements PurchaseTransactionOrBuilderA transaction represents the entire purchase transaction.
Protobuf type google.cloud.recommendationengine.v1beta1.PurchaseTransaction
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > PurchaseTransaction.BuilderImplements
PurchaseTransactionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public PurchaseTransaction build()| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction |
|
buildPartial()
public PurchaseTransaction buildPartial()| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction |
|
clear()
public PurchaseTransaction.Builder clear()| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
clearCosts()
public PurchaseTransaction.Builder clearCosts()| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
clearCurrencyCode()
public PurchaseTransaction.Builder clearCurrencyCode() Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
clearId()
public PurchaseTransaction.Builder clearId()Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
clearRevenue()
public PurchaseTransaction.Builder clearRevenue() Required. Total 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. This field
is not required if the event type is refund.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
clearTaxes()
public PurchaseTransaction.Builder clearTaxes()| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
containsCosts(String key)
public boolean containsCosts(String key)Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
containsTaxes(String key)
public boolean containsTaxes(String key)Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getCosts() (deprecated)
public Map<String,Float> getCosts()Use #getCostsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Float> |
|
getCostsCount()
public int getCostsCount()Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getCostsMap()
public Map<String,Float> getCostsMap()Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Map<String,Float> |
|
getCostsOrDefault(String key, float defaultValue)
public float getCostsOrDefault(String key, float defaultValue)Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
float |
| Returns | |
|---|---|
| Type | Description |
float |
|
getCostsOrThrow(String key)
public float getCostsOrThrow(String key)Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
float |
|
getCurrencyCode()
public String getCurrencyCode() Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The currencyCode. |
getCurrencyCodeBytes()
public ByteString getCurrencyCodeBytes() Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for currencyCode. |
getDefaultInstanceForType()
public PurchaseTransaction getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getId()
public String getId()Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The id. |
getIdBytes()
public ByteString getIdBytes()Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for id. |
getMutableCosts() (deprecated)
public Map<String,Float> getMutableCosts()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Float> |
|
getMutableTaxes() (deprecated)
public Map<String,Float> getMutableTaxes()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Float> |
|
getRevenue()
public float getRevenue() Required. Total 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. This field
is not required if the event type is refund.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
float |
The revenue. |
getTaxes() (deprecated)
public Map<String,Float> getTaxes()Use #getTaxesMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Float> |
|
getTaxesCount()
public int getTaxesCount()Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getTaxesMap()
public Map<String,Float> getTaxesMap()Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Map<String,Float> |
|
getTaxesOrDefault(String key, float defaultValue)
public float getTaxesOrDefault(String key, float defaultValue)Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
float |
| Returns | |
|---|---|
| Type | Description |
float |
|
getTaxesOrThrow(String key)
public float getTaxesOrThrow(String key)Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
float |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(PurchaseTransaction other)
public PurchaseTransaction.Builder mergeFrom(PurchaseTransaction other)| Parameter | |
|---|---|
| Name | Description |
other |
PurchaseTransaction |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PurchaseTransaction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public PurchaseTransaction.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
putAllCosts(Map<String,Float> values)
public PurchaseTransaction.Builder putAllCosts(Map<String,Float> values)Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,Float> |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
putAllTaxes(Map<String,Float> values)
public PurchaseTransaction.Builder putAllTaxes(Map<String,Float> values)Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,Float> |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
putCosts(String key, float value)
public PurchaseTransaction.Builder putCosts(String key, float value)Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
float |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
putTaxes(String key, float value)
public PurchaseTransaction.Builder putTaxes(String key, float value)Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
float |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
removeCosts(String key)
public PurchaseTransaction.Builder removeCosts(String key)Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs.
Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
removeTaxes(String key)
public PurchaseTransaction.Builder removeTaxes(String key)Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
|
setCurrencyCode(String value)
public PurchaseTransaction.Builder setCurrencyCode(String value) Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe currencyCode to set. |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
setCurrencyCodeBytes(ByteString value)
public PurchaseTransaction.Builder setCurrencyCodeBytes(ByteString value) Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for currencyCode to set. |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
setId(String value)
public PurchaseTransaction.Builder setId(String value)Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe id to set. |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
setIdBytes(ByteString value)
public PurchaseTransaction.Builder setIdBytes(ByteString value)Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for id to set. |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |
setRevenue(float value)
public PurchaseTransaction.Builder setRevenue(float value) Required. Total 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. This field
is not required if the event type is refund.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
floatThe revenue to set. |
| Returns | |
|---|---|
| Type | Description |
PurchaseTransaction.Builder |
This builder for chaining. |