Class: Google::Apis::MerchantapiInventoriesV1beta::RegionalInventory
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiInventoriesV1beta::RegionalInventory
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_inventories_v1beta/classes.rb,
lib/google/apis/merchantapi_inventories_v1beta/representations.rb,
lib/google/apis/merchantapi_inventories_v1beta/representations.rb
Overview
Regional inventory information for the product. Represents specific
information like price and availability for a given product in a specific
region
. For a list of all accepted attribute values, see the regional
product inventory data specification.
Instance Attribute Summary collapse
-
#account ⇒ Fixnum
Output only.
-
#availability ⇒ String
Availability of the product in this region.
-
#custom_attributes ⇒ Array<Google::Apis::MerchantapiInventoriesV1beta::CustomAttribute>
A list of custom (merchant-provided) attributes.
-
#name ⇒ String
Output only.
-
#price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
-
#region ⇒ String
Required.
-
#sale_price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
-
#sale_price_effective_date ⇒ Google::Apis::MerchantapiInventoriesV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
Instance Method Summary collapse
-
#initialize(**args) ⇒ RegionalInventory
constructor
A new instance of RegionalInventory.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RegionalInventory
Returns a new instance of RegionalInventory.
451 452 453 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 451 def initialize(**args) update!(**args) end |
Instance Attribute Details
#account ⇒ Fixnum
Output only. The account that owns the product. This field will be ignored if
set by the client.
Corresponds to the JSON property account
403 404 405 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 403 def account @account end |
#availability ⇒ String
Availability of the product in this region. For accepted attribute values, see
the regional product inventory data specification
Corresponds to the JSON property availability
410 411 412 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 410 def availability @availability end |
#custom_attributes ⇒ Array<Google::Apis::MerchantapiInventoriesV1beta::CustomAttribute>
A list of custom (merchant-provided) attributes. You can also use
CustomAttribute
to submit any attribute of the data specification in its
generic form.
Corresponds to the JSON property customAttributes
417 418 419 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 417 def custom_attributes @custom_attributes end |
#name ⇒ String
Output only. The name of the RegionalInventory
resource. Format:
regional_inventory.name=accounts/`account`/products/`product`/
regionalInventories/`region
Corresponds to the JSON property name
424 425 426 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 424 def name @name end |
#price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property price
429 430 431 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 429 def price @price end |
#region ⇒ String
Required. Immutable. ID of the region for this RegionalInventory
resource.
See the Regional availability and pricing for more details.
Corresponds to the JSON property region
436 437 438 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 436 def region @region end |
#sale_price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property salePrice
441 442 443 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 441 def sale_price @sale_price end |
#sale_price_effective_date ⇒ Google::Apis::MerchantapiInventoriesV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a
Timestamp end (exclusive). The start must be less than or equal to the end.
When the start equals the end, the interval is empty (matches no time). When
both start and end are unspecified, the interval matches any time.
Corresponds to the JSON property salePriceEffectiveDate
449 450 451 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 449 def sale_price_effective_date @sale_price_effective_date end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
456 457 458 459 460 461 462 463 464 465 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 456 def update!(**args) @account = args[:account] if args.key?(:account) @availability = args[:availability] if args.key?(:availability) @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes) @name = args[:name] if args.key?(:name) @price = args[:price] if args.key?(:price) @region = args[:region] if args.key?(:region) @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) end |