Struct gapi_grpc::google::cloud::recommendationengine::v1beta1::PurchaseTransaction[][src]

pub struct PurchaseTransaction {
    pub id: String,
    pub revenue: f32,
    pub taxes: HashMap<String, f32>,
    pub costs: HashMap<String, f32>,
    pub currency_code: String,
}

A transaction represents the entire purchase transaction.

Fields

id: String

Optional. The transaction ID with a length limit of 128 bytes.

revenue: f32

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.

taxes: HashMap<String, f32>

Optional. All the taxes associated with the transaction.

costs: HashMap<String, f32>

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.

currency_code: String

Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is refund.

Trait Implementations

impl Clone for PurchaseTransaction[src]

impl Debug for PurchaseTransaction[src]

impl Default for PurchaseTransaction[src]

impl Message for PurchaseTransaction[src]

impl PartialEq<PurchaseTransaction> for PurchaseTransaction[src]

impl StructuralPartialEq for PurchaseTransaction[src]

Auto Trait Implementations

impl RefUnwindSafe for PurchaseTransaction

impl Send for PurchaseTransaction

impl Sync for PurchaseTransaction

impl Unpin for PurchaseTransaction

impl UnwindSafe for PurchaseTransaction

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]