Class: Google::Shopping::Merchant::Products::V1::ProductInput

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/shopping/merchant/products/v1/productinputs.rb

Overview

This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed Product. For more information, see Manage products.

Required product input attributes to pass data validation checks are primarily defined in the Products Data Specification.

The following attributes are required: feedLabel, contentLanguage and offerId.

After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.

All fields in the product input and its sub-messages match the English name of their corresponding attribute in the Products Data Specification with some exceptions. The following reference documentation lists the field names in the camelCase casing style while the Products Data Specification lists the names in the snake_case casing style.

Instance Attribute Summary collapse

Instance Attribute Details

#content_language::String

Returns Required. Immutable. The two-letter ISO 639-1 language code for the product.

Returns:

  • (::String)

    Required. Immutable. The two-letter ISO 639-1 language code for the product.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#custom_attributes::Array<::Google::Shopping::Type::CustomAttribute>

Returns Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.

Returns:

  • (::Array<::Google::Shopping::Type::CustomAttribute>)

    Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#feed_label::String

Returns Required. Immutable. The feed label that lets you categorize and identify your products. The maximum allowed characters are 20, and the supported characters are A-Z, 0-9, hyphen, and underscore. The feed label must not include any spaces. For more information, see Using feed labels.

Returns:

  • (::String)

    Required. Immutable. The feed label that lets you categorize and identify your products. The maximum allowed characters are 20, and the supported characters are A-Z, 0-9, hyphen, and underscore. The feed label must not include any spaces. For more information, see Using feed labels.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#legacy_local::Boolean

Returns Immutable. Determines whether the product is only targeting local destinations and whether the product name should be distinguished with a local~ prefix. For example, accounts/123/productInputs/local~en~US~sku123. If a product that is not legacy_local is already targeting local destinations, creating a legacy_local product with an otherwise matching name will fail.

Returns:

  • (::Boolean)

    Immutable. Determines whether the product is only targeting local destinations and whether the product name should be distinguished with a local~ prefix. For example, accounts/123/productInputs/local~en~US~sku123. If a product that is not legacy_local is already targeting local destinations, creating a legacy_local product with an otherwise matching name will fail.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#name::String

Returns Identifier. The name of the product input. Format: accounts/{account}/productInputs/{productinput} where the last section productinput consists of: content_language~feed_label~offer_id example for product input name is accounts/123/productInputs/en~US~sku123. A legacy local product input name would be accounts/123/productInputs/local~en~US~sku123. Note: For calls to the v1beta version, the productInput section consists of: channel~content_language~feed_label~offer_id, for example: accounts/123/productInputs/online~en~US~sku123.

Returns:

  • (::String)

    Identifier. The name of the product input. Format: accounts/{account}/productInputs/{productinput} where the last section productinput consists of: content_language~feed_label~offer_id example for product input name is accounts/123/productInputs/en~US~sku123. A legacy local product input name would be accounts/123/productInputs/local~en~US~sku123. Note: For calls to the v1beta version, the productInput section consists of: channel~content_language~feed_label~offer_id, for example: accounts/123/productInputs/online~en~US~sku123.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#offer_id::String

Returns Required. Immutable. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the products data specification for details.

Returns:

  • (::String)

    Required. Immutable. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the products data specification for details.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#product::String (readonly)

Returns Output only. The name of the processed product. Format: accounts/{account}/products/{product}.

Returns:

  • (::String)

    Output only. The name of the processed product. Format: accounts/{account}/products/{product}



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#product_attributes::Google::Shopping::Merchant::Products::V1::ProductAttributes

Returns Optional. A list of strongly-typed product attributes.

Returns:



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#version_number::Integer

Returns Optional. Immutable. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current version_number.

Only supported for insertions into primary data sources. Do not set this field for updates. Do not set this field for insertions into supplemental data sources.

If the operation is prevented, the aborted exception will be thrown.

Returns:

  • (::Integer)

    Optional. Immutable. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time.

    If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current version_number.

    Only supported for insertions into primary data sources. Do not set this field for updates. Do not set this field for insertions into supplemental data sources.

    If the operation is prevented, the aborted exception will be thrown.



129
130
131
132
# File 'proto_docs/google/shopping/merchant/products/v1/productinputs.rb', line 129

class ProductInput
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end