View Source GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1TransactionInfo (google_api_discovery_engine v0.27.0)

A transaction represents the entire purchase transaction.

Attributes

  • cost (type: number(), default: nil) - 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 - tax - cost
  • currency (type: String.t, default: nil) - Required. Currency code. Use three-character ISO-4217 code.
  • discountValue (type: number(), default: nil) - 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
  • tax (type: number(), default: nil) - All the taxes associated with the transaction.
  • transactionId (type: String.t, default: nil) - The transaction ID with a length limit of 128 characters.
  • value (type: number(), default: nil) - 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.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

t()

@type t() ::
  %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1TransactionInfo{
    cost: number() | nil,
    currency: String.t() | nil,
    discountValue: number() | nil,
    tax: number() | nil,
    transactionId: String.t() | nil,
    value: number() | nil
  }

Functions

decode(value, options)

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.