Class: Google::Apis::ContentV2::PosSale

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

Overview

The change of the available quantity of an item at the given store.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PosSale

Returns a new instance of PosSale



6348
6349
6350
# File 'generated/google/apis/content_v2/classes.rb', line 6348

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

Instance Attribute Details

#content_languageString

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

Returns:

  • (String)


6299
6300
6301
# File 'generated/google/apis/content_v2/classes.rb', line 6299

def content_language
  @content_language
end

#gtinString

Global Trade Item Number. Corresponds to the JSON property gtin

Returns:

  • (String)


6304
6305
6306
# File 'generated/google/apis/content_v2/classes.rb', line 6304

def gtin
  @gtin
end

#item_idString

A unique identifier for the item. Corresponds to the JSON property itemId

Returns:

  • (String)


6309
6310
6311
# File 'generated/google/apis/content_v2/classes.rb', line 6309

def item_id
  @item_id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "content# posSale". Corresponds to the JSON property kind

Returns:

  • (String)


6315
6316
6317
# File 'generated/google/apis/content_v2/classes.rb', line 6315

def kind
  @kind
end

#priceGoogle::Apis::ContentV2::Price

The price of the item. Corresponds to the JSON property price



6320
6321
6322
# File 'generated/google/apis/content_v2/classes.rb', line 6320

def price
  @price
end

#quantityFixnum

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

Returns:

  • (Fixnum)


6325
6326
6327
# File 'generated/google/apis/content_v2/classes.rb', line 6325

def quantity
  @quantity
end

#sale_idString

A unique ID to group items from the same sale event. Corresponds to the JSON property saleId

Returns:

  • (String)


6330
6331
6332
# File 'generated/google/apis/content_v2/classes.rb', line 6330

def sale_id
  @sale_id
end

#store_codeString

The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business. Corresponds to the JSON property storeCode

Returns:

  • (String)


6336
6337
6338
# File 'generated/google/apis/content_v2/classes.rb', line 6336

def store_code
  @store_code
end

#target_countryString

The CLDR territory code for the item. Corresponds to the JSON property targetCountry

Returns:

  • (String)


6341
6342
6343
# File 'generated/google/apis/content_v2/classes.rb', line 6341

def target_country
  @target_country
end

#timestampString

The inventory timestamp, in ISO 8601 format. Corresponds to the JSON property timestamp

Returns:

  • (String)


6346
6347
6348
# File 'generated/google/apis/content_v2/classes.rb', line 6346

def timestamp
  @timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
# File 'generated/google/apis/content_v2/classes.rb', line 6353

def update!(**args)
  @content_language = args[:content_language] if args.key?(:content_language)
  @gtin = args[:gtin] if args.key?(:gtin)
  @item_id = args[:item_id] if args.key?(:item_id)
  @kind = args[:kind] if args.key?(:kind)
  @price = args[:price] if args.key?(:price)
  @quantity = args[:quantity] if args.key?(:quantity)
  @sale_id = args[:sale_id] if args.key?(:sale_id)
  @store_code = args[:store_code] if args.key?(:store_code)
  @target_country = args[:target_country] if args.key?(:target_country)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
end