Class: Google::Apis::ContentV2::Inventory

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

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) ⇒ Inventory

Returns a new instance of Inventory.



2446
2447
2448
# File 'generated/google/apis/content_v2/classes.rb', line 2446

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

Instance Attribute Details

#availabilityString

The availability of the product. Corresponds to the JSON property availability

Returns:

  • (String)


2399
2400
2401
# File 'generated/google/apis/content_v2/classes.rb', line 2399

def availability
  @availability
end

#installmentGoogle::Apis::ContentV2::Installment

Number and amount of installments to pay for an item. Brazil only. Corresponds to the JSON property installment



2404
2405
2406
# File 'generated/google/apis/content_v2/classes.rb', line 2404

def installment
  @installment
end

#kindString

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

Returns:

  • (String)


2410
2411
2412
# File 'generated/google/apis/content_v2/classes.rb', line 2410

def kind
  @kind
end

#loyalty_pointsGoogle::Apis::ContentV2::LoyaltyPoints

Loyalty points that users receive after purchasing the item. Japan only. Corresponds to the JSON property loyaltyPoints



2415
2416
2417
# File 'generated/google/apis/content_v2/classes.rb', line 2415

def loyalty_points
  @loyalty_points
end

#priceGoogle::Apis::ContentV2::Price

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



2420
2421
2422
# File 'generated/google/apis/content_v2/classes.rb', line 2420

def price
  @price
end

#quantityFixnum

The quantity of the product. Must be equal to or greater than zero. Supported only for local products. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


2426
2427
2428
# File 'generated/google/apis/content_v2/classes.rb', line 2426

def quantity
  @quantity
end

#sale_priceGoogle::Apis::ContentV2::Price

The sale price of the product. Mandatory if sale_price_effective_date is defined. Corresponds to the JSON property salePrice



2432
2433
2434
# File 'generated/google/apis/content_v2/classes.rb', line 2432

def sale_price
  @sale_price
end

#sale_price_effective_dateString

A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. Corresponds to the JSON property salePriceEffectiveDate

Returns:

  • (String)


2438
2439
2440
# File 'generated/google/apis/content_v2/classes.rb', line 2438

def sale_price_effective_date
  @sale_price_effective_date
end

#sell_on_google_quantityFixnum

The quantity of the product that is reserved for sell-on-google ads. Supported only for online products. Corresponds to the JSON property sellOnGoogleQuantity

Returns:

  • (Fixnum)


2444
2445
2446
# File 'generated/google/apis/content_v2/classes.rb', line 2444

def sell_on_google_quantity
  @sell_on_google_quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
# File 'generated/google/apis/content_v2/classes.rb', line 2451

def update!(**args)
  @availability = args[:availability] if args.key?(:availability)
  @installment = args[:installment] if args.key?(:installment)
  @kind = args[:kind] if args.key?(:kind)
  @loyalty_points = args[:loyalty_points] if args.key?(:loyalty_points)
  @price = args[:price] if args.key?(:price)
  @quantity = args[:quantity] if args.key?(:quantity)
  @sale_price = args[:sale_price] if args.key?(:sale_price)
  @sale_price_effective_date = args[:sale_price_effective_date] if args.key?(:sale_price_effective_date)
  @sell_on_google_quantity = args[:sell_on_google_quantity] if args.key?(:sell_on_google_quantity)
end