Class: Google::Apis::MerchantapiInventoriesV1beta::LocalInventory
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiInventoriesV1beta::LocalInventory
- 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
Local inventory information for the product. Represents in-store information
for a specific product at the store specified by storeCode
. For a list of
all accepted attribute values, see the local product inventory data
specification.
Instance Attribute Summary collapse
-
#account ⇒ Fixnum
Output only.
-
#availability ⇒ String
Availability of the product at this store.
-
#custom_attributes ⇒ Array<Google::Apis::MerchantapiInventoriesV1beta::CustomAttribute>
A list of custom (merchant-provided) attributes.
-
#instore_product_location ⇒ String
Location of the product inside the store.
-
#name ⇒ String
Output only.
-
#pickup_method ⇒ String
Supported pickup method for this product.
-
#pickup_sla ⇒ String
Relative time period from the order date for an order for this product, from this store, to be ready for pickup.
-
#price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
-
#quantity ⇒ Fixnum
Quantity of the product available at this store.
-
#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).
-
#store_code ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LocalInventory
constructor
A new instance of LocalInventory.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LocalInventory
Returns a new instance of LocalInventory.
245 246 247 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 245 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
170 171 172 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 170 def account @account end |
#availability ⇒ String
Availability of the product at this store. For accepted attribute values, see
the local product inventory data specification
Corresponds to the JSON property availability
177 178 179 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 177 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
184 185 186 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 184 def custom_attributes @custom_attributes end |
#instore_product_location ⇒ String
Location of the product inside the store. Maximum length is 20 bytes.
Corresponds to the JSON property instoreProductLocation
189 190 191 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 189 def instore_product_location @instore_product_location end |
#name ⇒ String
Output only. The name of the LocalInventory
resource. Format: accounts/
account/products/
product/localInventories/
store_code`
Corresponds to the JSON property
name`
195 196 197 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 195 def name @name end |
#pickup_method ⇒ String
Supported pickup method for this product. Unless the value is "not supported"
, this field must be submitted together with pickupSla
. For accepted
attribute values, see the local product inventory data specification
Corresponds to the JSON property pickupMethod
203 204 205 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 203 def pickup_method @pickup_method end |
#pickup_sla ⇒ String
Relative time period from the order date for an order for this product, from
this store, to be ready for pickup. Must be submitted with pickupMethod
. For
accepted attribute values, see the local product inventory data specification
Corresponds to the JSON property pickupSla
211 212 213 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 211 def pickup_sla @pickup_sla end |
#price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property price
216 217 218 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 216 def price @price end |
#quantity ⇒ Fixnum
Quantity of the product available at this store. Must be greater than or equal
to zero.
Corresponds to the JSON property quantity
222 223 224 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 222 def quantity @quantity end |
#sale_price ⇒ Google::Apis::MerchantapiInventoriesV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property salePrice
227 228 229 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 227 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
235 236 237 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 235 def sale_price_effective_date @sale_price_effective_date end |
#store_code ⇒ String
Required. Immutable. Store code (the store ID from your Business Profile) of
the physical store the product is sold in. See the Local product inventory
data specification for
more information.
Corresponds to the JSON property storeCode
243 244 245 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 243 def store_code @store_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 250 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) @instore_product_location = args[:instore_product_location] if args.key?(:instore_product_location) @name = args[:name] if args.key?(:name) @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 |