Class: Google::Apis::MerchantapiLfpV1beta::LfpInventory

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

Overview

Local Inventory for the merchant.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LfpInventory

Returns a new instance of LfpInventory.



233
234
235
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 233

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

Instance Attribute Details

#availabilityString

Required. Availability of the product at this store. For accepted attribute values, see the local product inventory data specification Corresponds to the JSON property availability

Returns:

  • (String)


150
151
152
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 150

def availability
  @availability
end

#collection_timeString

Optional. The time when the inventory is collected. If not set, it will be set to the time when the inventory is submitted. Corresponds to the JSON property collectionTime

Returns:

  • (String)


156
157
158
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 156

def collection_time
  @collection_time
end

#content_languageString

Required. The two-letter ISO 639-1 language code for the item. Corresponds to the JSON property contentLanguage

Returns:

  • (String)


161
162
163
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 161

def content_language
  @content_language
end

#feed_labelString

Optional. The feed label for the product. If this is not set, it will default to regionCode. Corresponds to the JSON property feedLabel

Returns:

  • (String)


168
169
170
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 168

def feed_label
  @feed_label
end

#gtinString

Optional. The Global Trade Item Number of the product. Corresponds to the JSON property gtin

Returns:

  • (String)


173
174
175
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 173

def gtin
  @gtin
end

#nameString

Output only. Identifier. The name for the LfpInventory resource. Format: accounts/account/lfpInventories/target_merchant~store_code~offer` Corresponds to the JSON propertyname`

Returns:

  • (String)


179
180
181
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 179

def name
  @name
end

#offer_idString

Required. Immutable. A unique identifier for the product. If both inventories and sales are submitted for a merchant, this id should match for the same product. Note: if the merchant sells the same product new and used, they should have different IDs. Corresponds to the JSON property offerId

Returns:

  • (String)


187
188
189
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 187

def offer_id
  @offer_id
end

#pickup_methodString

Optional. Supported pickup method for this offer. Unless the value is "not supported", this field must be submitted together with pickupSla. For accepted attribute values, see the local product inventory data specification. Corresponds to the JSON property pickupMethod

Returns:

  • (String)


195
196
197
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 195

def pickup_method
  @pickup_method
end

#pickup_slaString

Optional. Expected date that an order will be ready for pickup relative to the order date. Must be submitted together with pickupMethod. For accepted attribute values, see the local product inventory data specification. Corresponds to the JSON property pickupSla

Returns:

  • (String)


203
204
205
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 203

def pickup_sla
  @pickup_sla
end

#priceGoogle::Apis::MerchantapiLfpV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property price



208
209
210
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 208

def price
  @price
end

#quantityFixnum

Optional. Quantity of the product available at this store. Must be greater than or equal to zero. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


214
215
216
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 214

def quantity
  @quantity
end

#region_codeString

Required. The CLDR territory code for the country where the product is sold. Corresponds to the JSON property regionCode

Returns:

  • (String)


220
221
222
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 220

def region_code
  @region_code
end

#store_codeString

Required. The identifier of the merchant's store. Either the store code inserted through InsertLfpStore or the store code in the Business Profile. Corresponds to the JSON property storeCode

Returns:

  • (String)


226
227
228
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 226

def store_code
  @store_code
end

#target_accountFixnum

Required. The Merchant Center ID of the merchant to submit the inventory for. Corresponds to the JSON property targetAccount

Returns:

  • (Fixnum)


231
232
233
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 231

def 
  @target_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 238

def update!(**args)
  @availability = args[:availability] if args.key?(:availability)
  @collection_time = args[:collection_time] if args.key?(:collection_time)
  @content_language = args[:content_language] if args.key?(:content_language)
  @feed_label = args[:feed_label] if args.key?(:feed_label)
  @gtin = args[:gtin] if args.key?(:gtin)
  @name = args[:name] if args.key?(:name)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @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)
  @quantity = args[:quantity] if args.key?(:quantity)
  @region_code = args[:region_code] if args.key?(:region_code)
  @store_code = args[:store_code] if args.key?(:store_code)
  @target_account = args[:target_account] if args.key?(:target_account)
end