Class: Google::Apis::MerchantapiLfpV1beta::LfpSale

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

A sale for the merchant.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LfpSale

Returns a new instance of LfpSale.



375
376
377
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 375

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

Instance Attribute Details

#content_languageString

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

Returns:

  • (String)


309
310
311
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 309

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)


316
317
318
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 316

def feed_label
  @feed_label
end

#gtinString

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

Returns:

  • (String)


321
322
323
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 321

def gtin
  @gtin
end

#nameString

Output only. Identifier. The name of the LfpSale resource. Format: accounts/ account/lfpSales/sale` Corresponds to the JSON propertyname`

Returns:

  • (String)


327
328
329
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 327

def name
  @name
end

#offer_idString

Required. 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)


335
336
337
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 335

def offer_id
  @offer_id
end

#priceGoogle::Apis::MerchantapiLfpV1beta::Price

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



340
341
342
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 340

def price
  @price
end

#quantityFixnum

Required. The relative change of the available quantity. Negative for items returned. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


346
347
348
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 346

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)


352
353
354
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 352

def region_code
  @region_code
end

#sale_timeString

Required. The timestamp for the sale. Corresponds to the JSON property saleTime

Returns:

  • (String)


357
358
359
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 357

def sale_time
  @sale_time
end

#store_codeString

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

Returns:

  • (String)


363
364
365
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 363

def store_code
  @store_code
end

#target_accountFixnum

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

Returns:

  • (Fixnum)


368
369
370
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 368

def 
  @target_account
end

#uidString

Output only. System generated globally unique ID for the LfpSale. Corresponds to the JSON property uid

Returns:

  • (String)


373
374
375
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 373

def uid
  @uid
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 380

def update!(**args)
  @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)
  @price = args[:price] if args.key?(:price)
  @quantity = args[:quantity] if args.key?(:quantity)
  @region_code = args[:region_code] if args.key?(:region_code)
  @sale_time = args[:sale_time] if args.key?(:sale_time)
  @store_code = args[:store_code] if args.key?(:store_code)
  @target_account = args[:target_account] if args.key?(:target_account)
  @uid = args[:uid] if args.key?(:uid)
end