Class: Google::Apis::DfareportingV4::CartDataItem
- Inherits:
-
Object
- Object
- Google::Apis::DfareportingV4::CartDataItem
- 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
-
#item_id ⇒ String
The shopping id of the item.
-
#quantity ⇒ Fixnum
Number of items sold.
-
#unit_price ⇒ Float
Unit price excluding tax, shipping, and any transaction level discounts.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CartDataItem
constructor
A new instance of CartDataItem.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_id ⇒ String
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
2138 2139 2140 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2138 def item_id @item_id end |
#quantity ⇒ Fixnum
Number of items sold. This is a required field.
Corresponds to the JSON property quantity
2143 2144 2145 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 2143 def quantity @quantity end |
#unit_price ⇒ Float
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
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 |