Class: Google::Apis::MerchantapiLfpV1beta::LfpSale
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiLfpV1beta::LfpSale
- 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
-
#content_language ⇒ String
Required.
-
#feed_label ⇒ String
Optional.
-
#gtin ⇒ String
Required.
-
#name ⇒ String
Output only.
-
#offer_id ⇒ String
Required.
-
#price ⇒ Google::Apis::MerchantapiLfpV1beta::Price
The price represented as a number and currency.
-
#quantity ⇒ Fixnum
Required.
-
#region_code ⇒ String
Required.
-
#sale_time ⇒ String
Required.
-
#store_code ⇒ String
Required.
-
#target_account ⇒ Fixnum
Required.
-
#uid ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LfpSale
constructor
A new instance of LfpSale.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_language ⇒ String
Required. The two-letter ISO 639-1 language code for the item.
Corresponds to the JSON property contentLanguage
309 310 311 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 309 def content_language @content_language end |
#feed_label ⇒ String
Optional. The feed label for the product. If this is not set, it will
default to regionCode.
Corresponds to the JSON property feedLabel
316 317 318 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 316 def feed_label @feed_label end |
#gtin ⇒ String
Required. The Global Trade Item Number of the sold product.
Corresponds to the JSON property gtin
321 322 323 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 321 def gtin @gtin end |
#name ⇒ String
Output only. Identifier. The name of the LfpSale resource. Format: accounts/
account/lfpSales/sale`
Corresponds to the JSON propertyname`
327 328 329 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 327 def name @name end |
#offer_id ⇒ String
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
335 336 337 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 335 def offer_id @offer_id end |
#price ⇒ Google::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 |
#quantity ⇒ Fixnum
Required. The relative change of the available quantity. Negative for items
returned.
Corresponds to the JSON property quantity
346 347 348 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 346 def quantity @quantity end |
#region_code ⇒ String
Required. The CLDR territory code for the country where the product is sold.
Corresponds to the JSON property regionCode
352 353 354 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 352 def region_code @region_code end |
#sale_time ⇒ String
Required. The timestamp for the sale.
Corresponds to the JSON property saleTime
357 358 359 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 357 def sale_time @sale_time end |
#store_code ⇒ String
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
363 364 365 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 363 def store_code @store_code end |
#target_account ⇒ Fixnum
Required. The Merchant Center ID of the merchant to submit the sale for.
Corresponds to the JSON property targetAccount
368 369 370 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 368 def target_account @target_account end |
#uid ⇒ String
Output only. System generated globally unique ID for the LfpSale.
Corresponds to the JSON property uid
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 |