Class: Google::Apis::ContentV2_1::LocalInventory

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

Overview

Local inventory resource. For accepted attribute values, see the local product inventory feed specification.

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

Returns a new instance of LocalInventory.



3563
3564
3565
# File 'generated/google/apis/content_v2_1/classes.rb', line 3563

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

Instance Attribute Details

#availabilityString

Availability of the product. Corresponds to the JSON property availability

Returns:

  • (String)


3512
3513
3514
# File 'generated/google/apis/content_v2_1/classes.rb', line 3512

def availability
  @availability
end

#instore_product_locationString

In-store product location. Corresponds to the JSON property instoreProductLocation

Returns:

  • (String)


3517
3518
3519
# File 'generated/google/apis/content_v2_1/classes.rb', line 3517

def instore_product_location
  @instore_product_location
end

#kindString

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

Returns:

  • (String)


3523
3524
3525
# File 'generated/google/apis/content_v2_1/classes.rb', line 3523

def kind
  @kind
end

#pickup_methodString

Supported pickup method for this offer. Unless the value is "not supported", this field must be submitted together with pickupSla. Corresponds to the JSON property pickupMethod

Returns:

  • (String)


3529
3530
3531
# File 'generated/google/apis/content_v2_1/classes.rb', line 3529

def pickup_method
  @pickup_method
end

#pickup_slaString

Expected date that an order will be ready for pickup relative to the order date. Must be submitted together with pickupMethod. Corresponds to the JSON property pickupSla

Returns:

  • (String)


3535
3536
3537
# File 'generated/google/apis/content_v2_1/classes.rb', line 3535

def pickup_sla
  @pickup_sla
end

#priceGoogle::Apis::ContentV2_1::Price

Price of the product. Corresponds to the JSON property price



3540
3541
3542
# File 'generated/google/apis/content_v2_1/classes.rb', line 3540

def price
  @price
end

#quantityFixnum

Quantity of the product. Must be nonnegative. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


3545
3546
3547
# File 'generated/google/apis/content_v2_1/classes.rb', line 3545

def quantity
  @quantity
end

#sale_priceGoogle::Apis::ContentV2_1::Price

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



3550
3551
3552
# File 'generated/google/apis/content_v2_1/classes.rb', line 3550

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 may be specified as 'null' if undecided. Corresponds to the JSON property salePriceEffectiveDate

Returns:

  • (String)


3556
3557
3558
# File 'generated/google/apis/content_v2_1/classes.rb', line 3556

def sale_price_effective_date
  @sale_price_effective_date
end

#store_codeString

Required. Store code of this local inventory resource. Corresponds to the JSON property storeCode

Returns:

  • (String)


3561
3562
3563
# File 'generated/google/apis/content_v2_1/classes.rb', line 3561

def store_code
  @store_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
# File 'generated/google/apis/content_v2_1/classes.rb', line 3568

def update!(**args)
  @availability = args[:availability] if args.key?(:availability)
  @instore_product_location = args[:instore_product_location] if args.key?(:instore_product_location)
  @kind = args[:kind] if args.key?(:kind)
  @pickup_method = args[:pickup_method] if args.key?(:pickup_method)
  @pickup_sla = args[:pickup_sla] if args.key?(:pickup_sla)
  @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)
  @store_code = args[:store_code] if args.key?(:store_code)
end