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.



2152
2153
2154
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2152

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)


2138
2139
2140
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2138

def item_id
  @item_id
end

#quantityFixnum

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

Returns:

  • (Fixnum)


2143
2144
2145
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2143

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)


2150
2151
2152
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2150

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2157
2158
2159
2160
2161
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2157

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