class Google::Apis::ContentV2_1::Product

Required product attributes are primarily defined by the products data specification. See the Products Data Specification Help Center article for information. Product data. After inserting, updating, or deleting a product, it may take several minutes before changes take effect.

Attributes

additional_size_type[RW]

Additional cut of the item. Used together with size_type to represent combined size types for apparel items. Corresponds to the JSON property `additionalSizeType` @return [String]

ads_grouping[RW]

Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. Corresponds to the JSON property `adsGrouping` @return [String]

ads_labels[RW]

Similar to ads_grouping, but only works on CPC. Corresponds to the JSON property `adsLabels` @return [Array<String>]

ads_redirect[RW]

Allows advertisers to override the item URL when the product is shown within the context of Product Ads. Corresponds to the JSON property `adsRedirect` @return [String]

adult[RW]

Should be set to true if the item is targeted towards adults. Corresponds to the JSON property `adult` @return [Boolean]

adult?[RW]

Should be set to true if the item is targeted towards adults. Corresponds to the JSON property `adult` @return [Boolean]

age_group[RW]

Target age group of the item. Corresponds to the JSON property `ageGroup` @return [String]

availability[RW]

Availability status of the item. Corresponds to the JSON property `availability` @return [String]

availability_date[RW]

The day a pre-ordered product becomes available for delivery, in ISO 8601 format. Corresponds to the JSON property `availabilityDate` @return [String]

brand[RW]

Brand of the item. Corresponds to the JSON property `brand` @return [String]

channel[RW]

Required. The item's channel (online or local). Acceptable values are: - “` local`” - “`online`” Corresponds to the JSON property `channel` @return [String]

color[RW]

Color of the item. Corresponds to the JSON property `color` @return [String]

condition[RW]

Condition or state of the item. Corresponds to the JSON property `condition` @return [String]

content_language[RW]

Required. The two-letter ISO 639-1 language code for the item. Corresponds to the JSON property `contentLanguage` @return [String]

cost_of_goods_sold[RW]

Cost of goods sold. Used for gross profit reporting. Corresponds to the JSON property `costOfGoodsSold` @return [Google::Apis::ContentV2_1::Price]

custom_attributes[RW]

A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (e.g., ` ` “name”: “size type”, “value”: “regular” “). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google (formerly known as Shopping Actions). Corresponds to the JSON property `customAttributes` @return [Array<Google::Apis::ContentV2_1::CustomAttribute>]

custom_label0[RW]

Custom label 0 for custom grouping of items in a Shopping campaign. Corresponds to the JSON property `customLabel0` @return [String]

custom_label1[RW]

Custom label 1 for custom grouping of items in a Shopping campaign. Corresponds to the JSON property `customLabel1` @return [String]

custom_label2[RW]

Custom label 2 for custom grouping of items in a Shopping campaign. Corresponds to the JSON property `customLabel2` @return [String]

custom_label3[RW]

Custom label 3 for custom grouping of items in a Shopping campaign. Corresponds to the JSON property `customLabel3` @return [String]

custom_label4[RW]

Custom label 4 for custom grouping of items in a Shopping campaign. Corresponds to the JSON property `customLabel4` @return [String]

description[RW]

Description of the item. Corresponds to the JSON property `description` @return [String]

display_ads_id[RW]

An identifier for an item for dynamic remarketing campaigns. Corresponds to the JSON property `displayAdsId` @return [String]

display_ads_similar_ids[RW]

Advertiser-specified recommendations. Corresponds to the JSON property `displayAdsSimilarIds` @return [Array<String>]

display_ads_title[RW]

Title of an item for dynamic remarketing campaigns. Corresponds to the JSON property `displayAdsTitle` @return [String]

display_ads_value[RW]

Offer margin for dynamic remarketing campaigns. Corresponds to the JSON property `displayAdsValue` @return [Float]

energy_efficiency_class[RW]

The energy efficiency class as defined in EU directive 2010/30/EU. Corresponds to the JSON property `energyEfficiencyClass` @return [String]

excluded_destinations[RW]

The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center). Corresponds to the JSON property `excludedDestinations` @return [Array<String>]

expiration_date[RW]

Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in ` productstatuses` as `googleExpirationDate` and might be earlier if ` expirationDate` is too far in the future. Corresponds to the JSON property `expirationDate` @return [String]

gender[RW]

Target gender of the item. Corresponds to the JSON property `gender` @return [String]

google_product_category[RW]

Google's category of the item (see [Google product taxonomy](support. google.com/merchants/answer/1705911)). When querying products, this field will contain the user provided value. There is currently no way to get back the auto assigned google product categories through the API. Corresponds to the JSON property `googleProductCategory` @return [String]

gtin[RW]

Global Trade Item Number (GTIN) of the item. Corresponds to the JSON property `gtin` @return [String]

id[RW]

The REST ID of the product. Content API methods that operate on products take this as their `productId` parameter. The REST ID for a product is of the form channel:contentLanguage: targetCountry: offerId. Corresponds to the JSON property `id` @return [String]

identifier_exists[RW]

False when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the Unique Product Identifier Rules for all target countries except for Canada. Corresponds to the JSON property `identifierExists` @return [Boolean]

identifier_exists?[RW]

False when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the Unique Product Identifier Rules for all target countries except for Canada. Corresponds to the JSON property `identifierExists` @return [Boolean]

included_destinations[RW]

The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`. Corresponds to the JSON property `includedDestinations` @return [Array<String>]

installment[RW]

Number and amount of installments to pay for an item. Corresponds to the JSON property `installment` @return [Google::Apis::ContentV2_1::Installment]

is_bundle[RW]

Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. Corresponds to the JSON property `isBundle` @return [Boolean]

is_bundle?[RW]

Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. Corresponds to the JSON property `isBundle` @return [Boolean]

item_group_id[RW]

Shared identifier for all variants of the same product. Corresponds to the JSON property `itemGroupId` @return [String]

kind[RW]

Identifies what kind of resource this is. Value: the fixed string “`content# product`” Corresponds to the JSON property `kind` @return [String]

loyalty_points[RW]

Loyalty points that users receive after purchasing the item. Japan only. Corresponds to the JSON property `loyaltyPoints` @return [Google::Apis::ContentV2_1::LoyaltyPoints]

material[RW]

The material of which the item is made. Corresponds to the JSON property `material` @return [String]

max_energy_efficiency_class[RW]

The energy efficiency class as defined in EU directive 2010/30/EU. Corresponds to the JSON property `maxEnergyEfficiencyClass` @return [String]

max_handling_time[RW]

Maximal product handling time (in business days). Corresponds to the JSON property `maxHandlingTime` @return [Fixnum]

min_energy_efficiency_class[RW]

The energy efficiency class as defined in EU directive 2010/30/EU. Corresponds to the JSON property `minEnergyEfficiencyClass` @return [String]

min_handling_time[RW]

Minimal product handling time (in business days). Corresponds to the JSON property `minHandlingTime` @return [Fixnum]

mpn[RW]

Manufacturer Part Number (MPN) of the item. Corresponds to the JSON property `mpn` @return [String]

multipack[RW]

The number of identical products in a merchant-defined multipack. Corresponds to the JSON property `multipack` @return [Fixnum]

offer_id[RW]

Required. A unique identifier for the item. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. Only valid unicode characters are accepted. See the products feed specification for details. Note: Content API methods that operate on products take the REST ID of the product, not this identifier. Corresponds to the JSON property `offerId` @return [String]

pattern[RW]

The item's pattern (e.g. polka dots). Corresponds to the JSON property `pattern` @return [String]

pickup_method[RW]

The pick up option for the item. Acceptable values are: - “`buy`” - “`reserve`”

  • “`ship to store`” - “`not supported`”

Corresponds to the JSON property `pickupMethod` @return [String]

pickup_sla[RW]

Item store pickup timeline. Acceptable values are: - “`same day`” - “`next day` ” - “`2-day`” - “`3-day`” - “`4-day`” - “`5-day`” - “`6-day`” - “`7-day`” - “` multi-week`” Corresponds to the JSON property `pickupSla` @return [String]

price[RW]

Price of the item. Corresponds to the JSON property `price` @return [Google::Apis::ContentV2_1::Price]

product_details[RW]

Technical specification or additional product details. Corresponds to the JSON property `productDetails` @return [Array<Google::Apis::ContentV2_1::ProductProductDetail>]

product_height[RW]

The height of the product in the units provided. The value must be between 0 ( exclusive) and 3000 (inclusive). Corresponds to the JSON property `productHeight` @return [Google::Apis::ContentV2_1::ProductDimension]

product_highlights[RW]

Bullet points describing the most relevant highlights of a product. Corresponds to the JSON property `productHighlights` @return [Array<String>]

product_length[RW]

The length of the product in the units provided. The value must be between 0 ( exclusive) and 3000 (inclusive). Corresponds to the JSON property `productLength` @return [Google::Apis::ContentV2_1::ProductDimension]

product_types[RW]

Categories of the item (formatted as in products data specification). Corresponds to the JSON property `productTypes` @return [Array<String>]

product_weight[RW]

The weight of the product in the units provided. The value must be between 0 ( exclusive) and 2000 (inclusive). Corresponds to the JSON property `productWeight` @return [Google::Apis::ContentV2_1::ProductWeight]

product_width[RW]

The width of the product in the units provided. The value must be between 0 ( exclusive) and 3000 (inclusive). Corresponds to the JSON property `productWidth` @return [Google::Apis::ContentV2_1::ProductDimension]

promotion_ids[RW]

The unique ID of a promotion. Corresponds to the JSON property `promotionIds` @return [Array<String>]

sale_price[RW]

Advertised sale price of the item. Corresponds to the JSON property `salePrice` @return [Google::Apis::ContentV2_1::Price]

sale_price_effective_date[RW]

Date range during which the item is on sale (see products data specification ). Corresponds to the JSON property `salePriceEffectiveDate` @return [String]

sell_on_google_quantity[RW]

The quantity of the product that is available for selling on Google. Supported only for online products. Corresponds to the JSON property `sellOnGoogleQuantity` @return [Fixnum]

shipping[RW]

Shipping rules. Corresponds to the JSON property `shipping` @return [Array<Google::Apis::ContentV2_1::ProductShipping>]

shipping_height[RW]

Height of the item for shipping. Corresponds to the JSON property `shippingHeight` @return [Google::Apis::ContentV2_1::ProductShippingDimension]

shipping_label[RW]

The shipping label of the product, used to group product in account-level shipping rules. Corresponds to the JSON property `shippingLabel` @return [String]

shipping_length[RW]

Length of the item for shipping. Corresponds to the JSON property `shippingLength` @return [Google::Apis::ContentV2_1::ProductShippingDimension]

shipping_weight[RW]

Weight of the item for shipping. Corresponds to the JSON property `shippingWeight` @return [Google::Apis::ContentV2_1::ProductShippingWeight]

shipping_width[RW]

Width of the item for shipping. Corresponds to the JSON property `shippingWidth` @return [Google::Apis::ContentV2_1::ProductShippingDimension]

shopping_ads_excluded_countries[RW]

List of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in MC feed settings. Corresponds to the JSON property `shoppingAdsExcludedCountries` @return [Array<String>]

size_system[RW]

System in which the size is specified. Recommended for apparel items. Corresponds to the JSON property `sizeSystem` @return [String]

size_type[RW]

The cut of the item. Recommended for apparel items. Corresponds to the JSON property `sizeType` @return [String]

sizes[RW]

Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same `itemGroupId` value ( see size definition). Corresponds to the JSON property `sizes` @return [Array<String>]

source[RW]

The source of the offer, i.e., how the offer was created. Acceptable values are: - “`api`” - “`crawl`” - “`feed`” Corresponds to the JSON property `source` @return [String]

subscription_cost[RW]

Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract. Corresponds to the JSON property `subscriptionCost` @return [Google::Apis::ContentV2_1::ProductSubscriptionCost]

target_country[RW]

Required. The CLDR territory code for the item. Corresponds to the JSON property `targetCountry` @return [String]

tax_category[RW]

The tax category of the product, used to configure detailed tax nexus in account-level tax settings. Corresponds to the JSON property `taxCategory` @return [String]

taxes[RW]

Tax information. Corresponds to the JSON property `taxes` @return [Array<Google::Apis::ContentV2_1::ProductTax>]

title[RW]

Title of the item. Corresponds to the JSON property `title` @return [String]

transit_time_label[RW]

The transit time label of the product, used to group product in account-level transit time tables. Corresponds to the JSON property `transitTimeLabel` @return [String]

unit_pricing_base_measure[RW]

The preference of the denominator of the unit price. Corresponds to the JSON property `unitPricingBaseMeasure` @return [Google::Apis::ContentV2_1::ProductUnitPricingBaseMeasure]

unit_pricing_measure[RW]

The measure and dimension of an item. Corresponds to the JSON property `unitPricingMeasure` @return [Google::Apis::ContentV2_1::ProductUnitPricingMeasure]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/content_v2_1/classes.rb, line 10488
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/content_v2_1/classes.rb, line 10493
def update!(**args)
  @additional_image_links = args[:additional_image_links] if args.key?(:additional_image_links)
  @additional_size_type = args[:additional_size_type] if args.key?(:additional_size_type)
  @ads_grouping = args[:ads_grouping] if args.key?(:ads_grouping)
  @ads_labels = args[:ads_labels] if args.key?(:ads_labels)
  @ads_redirect = args[:ads_redirect] if args.key?(:ads_redirect)
  @adult = args[:adult] if args.key?(:adult)
  @age_group = args[:age_group] if args.key?(:age_group)
  @availability = args[:availability] if args.key?(:availability)
  @availability_date = args[:availability_date] if args.key?(:availability_date)
  @brand = args[:brand] if args.key?(:brand)
  @canonical_link = args[:canonical_link] if args.key?(:canonical_link)
  @channel = args[:channel] if args.key?(:channel)
  @color = args[:color] if args.key?(:color)
  @condition = args[:condition] if args.key?(:condition)
  @content_language = args[:content_language] if args.key?(:content_language)
  @cost_of_goods_sold = args[:cost_of_goods_sold] if args.key?(:cost_of_goods_sold)
  @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes)
  @custom_label0 = args[:custom_label0] if args.key?(:custom_label0)
  @custom_label1 = args[:custom_label1] if args.key?(:custom_label1)
  @custom_label2 = args[:custom_label2] if args.key?(:custom_label2)
  @custom_label3 = args[:custom_label3] if args.key?(:custom_label3)
  @custom_label4 = args[:custom_label4] if args.key?(:custom_label4)
  @description = args[:description] if args.key?(:description)
  @display_ads_id = args[:display_ads_id] if args.key?(:display_ads_id)
  @display_ads_link = args[:display_ads_link] if args.key?(:display_ads_link)
  @display_ads_similar_ids = args[:display_ads_similar_ids] if args.key?(:display_ads_similar_ids)
  @display_ads_title = args[:display_ads_title] if args.key?(:display_ads_title)
  @display_ads_value = args[:display_ads_value] if args.key?(:display_ads_value)
  @energy_efficiency_class = args[:energy_efficiency_class] if args.key?(:energy_efficiency_class)
  @excluded_destinations = args[:excluded_destinations] if args.key?(:excluded_destinations)
  @expiration_date = args[:expiration_date] if args.key?(:expiration_date)
  @gender = args[:gender] if args.key?(:gender)
  @google_product_category = args[:google_product_category] if args.key?(:google_product_category)
  @gtin = args[:gtin] if args.key?(:gtin)
  @id = args[:id] if args.key?(:id)
  @identifier_exists = args[:identifier_exists] if args.key?(:identifier_exists)
  @image_link = args[:image_link] if args.key?(:image_link)
  @included_destinations = args[:included_destinations] if args.key?(:included_destinations)
  @installment = args[:installment] if args.key?(:installment)
  @is_bundle = args[:is_bundle] if args.key?(:is_bundle)
  @item_group_id = args[:item_group_id] if args.key?(:item_group_id)
  @kind = args[:kind] if args.key?(:kind)
  @link = args[:link] if args.key?(:link)
  @link_template = args[:link_template] if args.key?(:link_template)
  @loyalty_points = args[:loyalty_points] if args.key?(:loyalty_points)
  @material = args[:material] if args.key?(:material)
  @max_energy_efficiency_class = args[:max_energy_efficiency_class] if args.key?(:max_energy_efficiency_class)
  @max_handling_time = args[:max_handling_time] if args.key?(:max_handling_time)
  @min_energy_efficiency_class = args[:min_energy_efficiency_class] if args.key?(:min_energy_efficiency_class)
  @min_handling_time = args[:min_handling_time] if args.key?(:min_handling_time)
  @mobile_link = args[:mobile_link] if args.key?(:mobile_link)
  @mobile_link_template = args[:mobile_link_template] if args.key?(:mobile_link_template)
  @mpn = args[:mpn] if args.key?(:mpn)
  @multipack = args[:multipack] if args.key?(:multipack)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @pattern = args[:pattern] if args.key?(:pattern)
  @pickup_method = args[:pickup_method] if args.key?(:pickup_method)
  @pickup_sla = args[:pickup_sla] if args.key?(:pickup_sla)
  @price = args[:price] if args.key?(:price)
  @product_details = args[:product_details] if args.key?(:product_details)
  @product_height = args[:product_height] if args.key?(:product_height)
  @product_highlights = args[:product_highlights] if args.key?(:product_highlights)
  @product_length = args[:product_length] if args.key?(:product_length)
  @product_types = args[:product_types] if args.key?(:product_types)
  @product_weight = args[:product_weight] if args.key?(:product_weight)
  @product_width = args[:product_width] if args.key?(:product_width)
  @promotion_ids = args[:promotion_ids] if args.key?(:promotion_ids)
  @sale_price = args[:sale_price] if args.key?(:sale_price)
  @sale_price_effective_date = args[:sale_price_effective_date] if args.key?(:sale_price_effective_date)
  @sell_on_google_quantity = args[:sell_on_google_quantity] if args.key?(:sell_on_google_quantity)
  @shipping = args[:shipping] if args.key?(:shipping)
  @shipping_height = args[:shipping_height] if args.key?(:shipping_height)
  @shipping_label = args[:shipping_label] if args.key?(:shipping_label)
  @shipping_length = args[:shipping_length] if args.key?(:shipping_length)
  @shipping_weight = args[:shipping_weight] if args.key?(:shipping_weight)
  @shipping_width = args[:shipping_width] if args.key?(:shipping_width)
  @shopping_ads_excluded_countries = args[:shopping_ads_excluded_countries] if args.key?(:shopping_ads_excluded_countries)
  @size_system = args[:size_system] if args.key?(:size_system)
  @size_type = args[:size_type] if args.key?(:size_type)
  @sizes = args[:sizes] if args.key?(:sizes)
  @source = args[:source] if args.key?(:source)
  @subscription_cost = args[:subscription_cost] if args.key?(:subscription_cost)
  @target_country = args[:target_country] if args.key?(:target_country)
  @tax_category = args[:tax_category] if args.key?(:tax_category)
  @taxes = args[:taxes] if args.key?(:taxes)
  @title = args[:title] if args.key?(:title)
  @transit_time_label = args[:transit_time_label] if args.key?(:transit_time_label)
  @unit_pricing_base_measure = args[:unit_pricing_base_measure] if args.key?(:unit_pricing_base_measure)
  @unit_pricing_measure = args[:unit_pricing_measure] if args.key?(:unit_pricing_measure)
end