Class: Google::Apis::DatamanagerV1::Item

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

Overview

Represents an item in the cart associated with the event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Item

Returns a new instance of Item.



1243
1244
1245
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1243

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

Instance Attribute Details

#additional_item_parametersArray<Google::Apis::DatamanagerV1::ItemParameter>

Optional. A bucket of any event parameters related to an item to be included within the event that were not already specified using other structured fields. Corresponds to the JSON property additionalItemParameters



1220
1221
1222
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1220

def additional_item_parameters
  @additional_item_parameters
end

#item_idString

Optional. A unique identifier to reference the item. Corresponds to the JSON property itemId

Returns:

  • (String)


1225
1226
1227
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1225

def item_id
  @item_id
end

#merchant_product_idString

Optional. The product ID within the Merchant Center account. Corresponds to the JSON property merchantProductId

Returns:

  • (String)


1230
1231
1232
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1230

def merchant_product_id
  @merchant_product_id
end

#quantityFixnum

Optional. The number of this item associated with the event. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


1235
1236
1237
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1235

def quantity
  @quantity
end

#unit_priceFloat

Optional. The unit price excluding tax, shipping, and any transaction level discounts. Corresponds to the JSON property unitPrice

Returns:

  • (Float)


1241
1242
1243
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1241

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1248
1249
1250
1251
1252
1253
1254
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1248

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