Class: Google::Apis::AnalyticsreportingV4::TransactionData

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/analyticsreporting_v4/classes.rb,
generated/google/apis/analyticsreporting_v4/representations.rb,
generated/google/apis/analyticsreporting_v4/representations.rb

Overview

Represents details collected when the visitor performs a transaction on the page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TransactionData

Returns a new instance of TransactionData



2028
2029
2030
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 2028

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#transaction_idString

The transaction ID, supplied by the e-commerce tracking method, for the purchase in the shopping cart. Corresponds to the JSON property transactionId

Returns:

  • (String)


2011
2012
2013
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 2011

def transaction_id
  @transaction_id
end

#transaction_revenueFloat

The total sale revenue (excluding shipping and tax) of the transaction. Corresponds to the JSON property transactionRevenue

Returns:

  • (Float)


2016
2017
2018
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 2016

def transaction_revenue
  @transaction_revenue
end

#transaction_shippingFloat

Total cost of shipping. Corresponds to the JSON property transactionShipping

Returns:

  • (Float)


2021
2022
2023
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 2021

def transaction_shipping
  @transaction_shipping
end

#transaction_taxFloat

Total tax for the transaction. Corresponds to the JSON property transactionTax

Returns:

  • (Float)


2026
2027
2028
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 2026

def transaction_tax
  @transaction_tax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2033
2034
2035
2036
2037
2038
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 2033

def update!(**args)
  @transaction_id = args[:transaction_id] if args.key?(:transaction_id)
  @transaction_revenue = args[:transaction_revenue] if args.key?(:transaction_revenue)
  @transaction_shipping = args[:transaction_shipping] if args.key?(:transaction_shipping)
  @transaction_tax = args[:transaction_tax] if args.key?(:transaction_tax)
end