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.



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

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



2039
2040
2041
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2039

def additional_item_parameters
  @additional_item_parameters
end

#conversion_valueFloat

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

Returns:

  • (Float)


2045
2046
2047
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2045

def conversion_value
  @conversion_value
end

#custom_variablesArray<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



2052
2053
2054
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2052

def custom_variables
  @custom_variables
end

#item_idString

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

Returns:

  • (String)


2057
2058
2059
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2057

def item_id
  @item_id
end

#merchant_feed_labelString

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

Returns:

  • (String)


2065
2066
2067
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2065

def merchant_feed_label
  @merchant_feed_label
end

#merchant_feed_language_codeString

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

Returns:

  • (String)


2071
2072
2073
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2071

def merchant_feed_language_code
  @merchant_feed_language_code
end

#merchant_idString

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

Returns:

  • (String)


2078
2079
2080
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2078

def merchant_id
  @merchant_id
end

#merchant_product_idString

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

Returns:

  • (String)


2083
2084
2085
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2083

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)


2088
2089
2090
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2088

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)


2094
2095
2096
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2094

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
# File 'lib/google/apis/datamanager_v1/classes.rb', line 2101

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