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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ProductData

Returns a new instance of ProductData



1173
1174
1175
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1173

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)


1155
1156
1157
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1155

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)


1161
1162
1163
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1161

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)


1166
1167
1168
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1166

def product_quantity
  @product_quantity
end

#product_skuString

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

Returns:

  • (String)


1171
1172
1173
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1171

def product_sku
  @product_sku
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1178
1179
1180
1181
1182
1183
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1178

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