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.



229
230
231
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 229

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)


163
164
165
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 163

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)


170
171
172
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 170

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)


175
176
177
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 175

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)


181
182
183
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 181

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)


189
190
191
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 189

def offer_id
  @offer_id
end

#priceGoogle::Apis::MerchantapiLfpV1beta::Price

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



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

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)


200
201
202
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 200

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)


206
207
208
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 206

def region_code
  @region_code
end

#sale_timeString

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

Returns:

  • (String)


211
212
213
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 211

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)


217
218
219
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 217

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)


222
223
224
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 222

def 
  @target_account
end

#uidString

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

Returns:

  • (String)


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

def uid
  @uid
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 234

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