Class: Google::Apis::MerchantapiInventoriesV1beta::LocalInventory

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#accountFixnum

Output only. The account that owns the product. This field will be ignored if set by the client. Corresponds to the JSON property account

Returns:

  • (Fixnum)


170
171
172
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 170

def 
  @account
end

#availabilityString

Availability of the product at this store. For accepted attribute values, see the local product inventory data specification Corresponds to the JSON property availability

Returns:

  • (String)


177
178
179
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 177

def availability
  @availability
end

#custom_attributesArray<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_locationString

Location of the product inside the store. Maximum length is 20 bytes. Corresponds to the JSON property instoreProductLocation

Returns:

  • (String)


189
190
191
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 189

def instore_product_location
  @instore_product_location
end

#nameString

Output only. The name of the LocalInventory resource. Format: accounts/ account/products/product/localInventories/store_code` Corresponds to the JSON propertyname`

Returns:

  • (String)


195
196
197
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 195

def name
  @name
end

#pickup_methodString

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

Returns:

  • (String)


203
204
205
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 203

def pickup_method
  @pickup_method
end

#pickup_slaString

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

Returns:

  • (String)


211
212
213
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 211

def pickup_sla
  @pickup_sla
end

#priceGoogle::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

#quantityFixnum

Quantity of the product available at this store. Must be greater than or equal to zero. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


222
223
224
# File 'lib/google/apis/merchantapi_inventories_v1beta/classes.rb', line 222

def quantity
  @quantity
end

#sale_priceGoogle::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_dateGoogle::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_codeString

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

Returns:

  • (String)


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