Class: Google::Apis::DatamanagerV1::Item
- Inherits:
-
Object
- Object
- Google::Apis::DatamanagerV1::Item
- 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
-
#additional_item_parameters ⇒ Array<Google::Apis::DatamanagerV1::ItemParameter>
Optional.
-
#conversion_value ⇒ Float
Optional.
-
#custom_variables ⇒ Array<Google::Apis::DatamanagerV1::ItemCustomVariable>
Optional.
-
#item_id ⇒ String
Optional.
-
#merchant_feed_label ⇒ String
Optional.
-
#merchant_feed_language_code ⇒ String
Optional.
-
#merchant_id ⇒ String
Optional.
-
#merchant_product_id ⇒ String
Optional.
-
#quantity ⇒ Fixnum
Optional.
-
#unit_price ⇒ Float
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Item
constructor
A new instance of Item.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Item
Returns a new instance of Item.
1423 1424 1425 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1423 def initialize(**args) update!(**args) end |
Instance Attribute Details
#additional_item_parameters ⇒ Array<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
1366 1367 1368 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1366 def additional_item_parameters @additional_item_parameters end |
#conversion_value ⇒ Float
Optional. The conversion value associated with this item within the event, for
cases where the conversion value is different for each item.
Corresponds to the JSON property conversionValue
1372 1373 1374 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1372 def conversion_value @conversion_value end |
#custom_variables ⇒ Array<Google::Apis::DatamanagerV1::ItemCustomVariable>
Optional. Additional key/value pair information to send to the conversion
containers (conversion action or Floodlight activity), when tracking per-item
conversions.
Corresponds to the JSON property customVariables
1379 1380 1381 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1379 def custom_variables @custom_variables end |
#item_id ⇒ String
Optional. A unique identifier to reference the item.
Corresponds to the JSON property itemId
1384 1385 1386 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1384 def item_id @item_id end |
#merchant_feed_label ⇒ String
Optional. The feed label of the Merchant Center feed. If countries are still
being used, the 2-letter country code in ISO-3166-1 alpha-2 can be used
instead. For Store Sales events this will override the value set at the cart
level. This field is ignored for other events.
Corresponds to the JSON property merchantFeedLabel
1392 1393 1394 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1392 def merchant_feed_label @merchant_feed_label end |
#merchant_feed_language_code ⇒ String
Optional. The language code in ISO 639-1 associated with the Merchant Center
feed where your items are uploaded.
Corresponds to the JSON property merchantFeedLanguageCode
1398 1399 1400 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1398 def merchant_feed_language_code @merchant_feed_language_code end |
#merchant_id ⇒ String
Optional. The Merchant Center ID associated with the item. For Store Sales
events this will override the value set at the cart level. This field is
ignored for other events.
Corresponds to the JSON property merchantId
1405 1406 1407 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1405 def merchant_id @merchant_id end |
#merchant_product_id ⇒ String
Optional. The product ID within the Merchant Center account.
Corresponds to the JSON property merchantProductId
1410 1411 1412 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1410 def merchant_product_id @merchant_product_id end |
#quantity ⇒ Fixnum
Optional. The number of this item associated with the event.
Corresponds to the JSON property quantity
1415 1416 1417 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1415 def quantity @quantity end |
#unit_price ⇒ Float
Optional. The unit price excluding tax, shipping, and any transaction level
discounts.
Corresponds to the JSON property unitPrice
1421 1422 1423 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1421 def unit_price @unit_price end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 |
# File 'lib/google/apis/datamanager_v1/classes.rb', line 1428 def update!(**args) @additional_item_parameters = args[:additional_item_parameters] if args.key?(:additional_item_parameters) @conversion_value = args[:conversion_value] if args.key?(:conversion_value) @custom_variables = args[:custom_variables] if args.key?(:custom_variables) @item_id = args[:item_id] if args.key?(:item_id) @merchant_feed_label = args[:merchant_feed_label] if args.key?(:merchant_feed_label) @merchant_feed_language_code = args[:merchant_feed_language_code] if args.key?(:merchant_feed_language_code) @merchant_id = args[:merchant_id] if args.key?(:merchant_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 |