Class: Google::Apis::AnalyticsreportingV4::ProductData

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

Details of the products in an e-commerce transaction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductData

Returns a new instance of ProductData.



1135
1136
1137
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1135

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

Instance Attribute Details

#item_revenueFloat

The total revenue from purchased product items. Corresponds to the JSON property itemRevenue

Returns:

  • (Float)


1117
1118
1119
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1117

def item_revenue
  @item_revenue
end

#product_nameString

The product name, supplied by the e-commerce tracking application, for the purchased items. Corresponds to the JSON property productName

Returns:

  • (String)


1123
1124
1125
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1123

def product_name
  @product_name
end

#product_quantityFixnum

Total number of this product units in the transaction. Corresponds to the JSON property productQuantity

Returns:

  • (Fixnum)


1128
1129
1130
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1128

def product_quantity
  @product_quantity
end

#product_skuString

Unique code that represents the product. Corresponds to the JSON property productSku

Returns:

  • (String)


1133
1134
1135
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1133

def product_sku
  @product_sku
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1140
1141
1142
1143
1144
1145
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1140

def update!(**args)
  @item_revenue = args[:item_revenue] if args.key?(:item_revenue)
  @product_name = args[:product_name] if args.key?(:product_name)
  @product_quantity = args[:product_quantity] if args.key?(:product_quantity)
  @product_sku = args[:product_sku] if args.key?(:product_sku)
end