Class: Google::Apis::DfareportingV5::CartDataItem

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dfareporting_v5/classes.rb,
lib/google/apis/dfareporting_v5/representations.rb,
lib/google/apis/dfareporting_v5/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.



2110
2111
2112
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 2110

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)


2096
2097
2098
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 2096

def item_id
  @item_id
end

#quantityFixnum

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

Returns:

  • (Fixnum)


2101
2102
2103
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 2101

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)


2108
2109
2110
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 2108

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2115
2116
2117
2118
2119
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 2115

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