Class: Google::Apis::ContentV2::InventoryBatchRequestEntry

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InventoryBatchRequestEntry

Returns a new instance of InventoryBatchRequestEntry.



3135
3136
3137
# File 'lib/google/apis/content_v2/classes.rb', line 3135

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)


3112
3113
3114
# File 'lib/google/apis/content_v2/classes.rb', line 3112

def batch_id
  @batch_id
end

#inventoryGoogle::Apis::ContentV2::Inventory

Price and availability of the product. Corresponds to the JSON property inventory



3117
3118
3119
# File 'lib/google/apis/content_v2/classes.rb', line 3117

def inventory
  @inventory
end

#merchant_idFixnum

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

Returns:

  • (Fixnum)


3122
3123
3124
# File 'lib/google/apis/content_v2/classes.rb', line 3122

def merchant_id
  @merchant_id
end

#product_idString

The ID of the product for which to update price and availability. Corresponds to the JSON property productId

Returns:

  • (String)


3127
3128
3129
# File 'lib/google/apis/content_v2/classes.rb', line 3127

def product_id
  @product_id
end

#store_codeString

The code of the store for which to update price and availability. Use online to update price and availability of an online product. Corresponds to the JSON property storeCode

Returns:

  • (String)


3133
3134
3135
# File 'lib/google/apis/content_v2/classes.rb', line 3133

def store_code
  @store_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3140
3141
3142
3143
3144
3145
3146
# File 'lib/google/apis/content_v2/classes.rb', line 3140

def update!(**args)
  @batch_id = args[:batch_id] if args.key?(:batch_id)
  @inventory = args[:inventory] if args.key?(:inventory)
  @merchant_id = args[:merchant_id] if args.key?(:merchant_id)
  @product_id = args[:product_id] if args.key?(:product_id)
  @store_code = args[:store_code] if args.key?(:store_code)
end