Class: Google::Apis::AnalyticsreportingV4::ProductData
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsreportingV4::ProductData
- 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
-
#item_revenue ⇒ Float
The total revenue from purchased product items.
-
#product_name ⇒ String
The product name, supplied by the e-commerce tracking application, for the purchased items.
-
#product_quantity ⇒ Fixnum
Total number of this product units in the transaction.
-
#product_sku ⇒ String
Unique code that represents the product.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ProductData
constructor
A new instance of ProductData.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_revenue ⇒ Float
The total revenue from purchased product items.
Corresponds to the JSON property itemRevenue
1117 1118 1119 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1117 def item_revenue @item_revenue end |
#product_name ⇒ String
The product name, supplied by the e-commerce tracking application, for the
purchased items.
Corresponds to the JSON property productName
1123 1124 1125 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1123 def product_name @product_name end |
#product_quantity ⇒ Fixnum
Total number of this product units in the transaction.
Corresponds to the JSON property productQuantity
1128 1129 1130 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1128 def product_quantity @product_quantity end |
#product_sku ⇒ String
Unique code that represents the product.
Corresponds to the JSON property productSku
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 |