Class: Google::Apis::ContentV2_1::ProductsCustomBatchRequestEntry

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

Overview

A batch entry encoding a single non-batch products request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductsCustomBatchRequestEntry

Returns a new instance of ProductsCustomBatchRequestEntry.



10821
10822
10823
# File 'lib/google/apis/content_v2_1/classes.rb', line 10821

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

Instance Attribute Details

#batch_idFixnum

An entry ID, unique within the batch request. Corresponds to the JSON property batchId

Returns:

  • (Fixnum)


10775
10776
10777
# File 'lib/google/apis/content_v2_1/classes.rb', line 10775

def batch_id
  @batch_id
end

#feed_idFixnum

The Content API Supplemental Feed ID. If present then product insertion or deletion applies to a supplemental feed instead of primary Content API feed. Corresponds to the JSON property feedId

Returns:

  • (Fixnum)


10781
10782
10783
# File 'lib/google/apis/content_v2_1/classes.rb', line 10781

def feed_id
  @feed_id
end

#merchant_idFixnum

The ID of the managing account. Corresponds to the JSON property merchantId

Returns:

  • (Fixnum)


10786
10787
10788
# File 'lib/google/apis/content_v2_1/classes.rb', line 10786

def merchant_id
  @merchant_id
end

#method_propString

The method of the batch entry. Acceptable values are: - "delete" - "get" - "insert" - "update" Corresponds to the JSON property method

Returns:

  • (String)


10792
10793
10794
# File 'lib/google/apis/content_v2_1/classes.rb', line 10792

def method_prop
  @method_prop
end

#productGoogle::Apis::ContentV2_1::Product

Required product attributes are primarily defined by the product data specification. See the Product 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. 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. Corresponds to the JSON property product



10803
10804
10805
# File 'lib/google/apis/content_v2_1/classes.rb', line 10803

def product
  @product
end

#product_idString

The ID of the product to get or mutate. Only defined if the method is get, delete, or update. Corresponds to the JSON property productId

Returns:

  • (String)


10809
10810
10811
# File 'lib/google/apis/content_v2_1/classes.rb', line 10809

def product_id
  @product_id
end

#update_maskString

The comma-separated list of product attributes to be updated. Example: "title, salePrice". Attributes specified in the update mask without a value specified in the body will be deleted from the product. You must specify the update mask to delete attributes. Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged. Only defined if the method is update. Corresponds to the JSON property updateMask

Returns:

  • (String)


10819
10820
10821
# File 'lib/google/apis/content_v2_1/classes.rb', line 10819

def update_mask
  @update_mask
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10826
10827
10828
10829
10830
10831
10832
10833
10834
# File 'lib/google/apis/content_v2_1/classes.rb', line 10826

def update!(**args)
  @batch_id = args[:batch_id] if args.key?(:batch_id)
  @feed_id = args[:feed_id] if args.key?(:feed_id)
  @merchant_id = args[:merchant_id] if args.key?(:merchant_id)
  @method_prop = args[:method_prop] if args.key?(:method_prop)
  @product = args[:product] if args.key?(:product)
  @product_id = args[:product_id] if args.key?(:product_id)
  @update_mask = args[:update_mask] if args.key?(:update_mask)
end