Class: Google::Apis::DfareportingV4::CartDataItem

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

Overview

Contains data of the items purchased.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CartDataItem

Returns a new instance of CartDataItem.



2176
2177
2178
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2176

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

Instance Attribute Details

#item_idString

The shopping id of the item. Must be equal to the Merchant Center product identifier. This is a required field. Corresponds to the JSON property itemId

Returns:

  • (String)


2162
2163
2164
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2162

def item_id
  @item_id
end

#quantityFixnum

Number of items sold. This is a required field. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


2167
2168
2169
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2167

def quantity
  @quantity
end

#unit_priceFloat

Unit price excluding tax, shipping, and any transaction level discounts. Interpreted in CM360 Floodlight config parent advertiser's currency code. This is a required field. Corresponds to the JSON property unitPrice

Returns:

  • (Float)


2174
2175
2176
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2174

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2181
2182
2183
2184
2185
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2181

def update!(**args)
  @item_id = args[:item_id] if args.key?(:item_id)
  @quantity = args[:quantity] if args.key?(:quantity)
  @unit_price = args[:unit_price] if args.key?(:unit_price)
end