Class: Google::Apis::MerchantapiLfpV1beta::LfpInventory

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_lfp_v1beta/classes.rb,
lib/google/apis/merchantapi_lfp_v1beta/representations.rb,
lib/google/apis/merchantapi_lfp_v1beta/representations.rb

Overview

Local Inventory for the merchant.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LfpInventory

Returns a new instance of LfpInventory.



133
134
135
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 133

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

Instance Attribute Details

#availabilityString

Required. 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)


50
51
52
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 50

def availability
  @availability
end

#collection_timeString

Optional. The time when the inventory is collected. If not set, it will be set to the time when the inventory is submitted. Corresponds to the JSON property collectionTime

Returns:

  • (String)


56
57
58
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 56

def collection_time
  @collection_time
end

#content_languageString

Required. The two-letter ISO 639-1 language code for the item. Corresponds to the JSON property contentLanguage

Returns:

  • (String)


61
62
63
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 61

def content_language
  @content_language
end

#feed_labelString

Optional. The feed label for the product. If this is not set, it will default to regionCode. Corresponds to the JSON property feedLabel

Returns:

  • (String)


68
69
70
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 68

def feed_label
  @feed_label
end

#gtinString

Optional. The Global Trade Item Number of the product. Corresponds to the JSON property gtin

Returns:

  • (String)


73
74
75
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 73

def gtin
  @gtin
end

#nameString

Output only. Identifier. The name for the LfpInventory resource. Format: accounts/account/lfpInventories/target_merchant~store_code~offer` Corresponds to the JSON propertyname`

Returns:

  • (String)


79
80
81
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 79

def name
  @name
end

#offer_idString

Required. Immutable. A unique identifier for the product. If both inventories and sales are submitted for a merchant, this id should match for the same product. Note: if the merchant sells the same product new and used, they should have different IDs. Corresponds to the JSON property offerId

Returns:

  • (String)


87
88
89
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 87

def offer_id
  @offer_id
end

#pickup_methodString

Optional. Supported pickup method for this offer. 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)


95
96
97
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 95

def pickup_method
  @pickup_method
end

#pickup_slaString

Optional. Expected date that an order will be ready for pickup relative to the order date. Must be submitted together with pickupMethod. For accepted attribute values, see the local product inventory data specification. Corresponds to the JSON property pickupSla

Returns:

  • (String)


103
104
105
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 103

def pickup_sla
  @pickup_sla
end

#priceGoogle::Apis::MerchantapiLfpV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property price



108
109
110
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 108

def price
  @price
end

#quantityFixnum

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

Returns:

  • (Fixnum)


114
115
116
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 114

def quantity
  @quantity
end

#region_codeString

Required. The CLDR territory code for the country where the product is sold. Corresponds to the JSON property regionCode

Returns:

  • (String)


120
121
122
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 120

def region_code
  @region_code
end

#store_codeString

Required. The identifier of the merchant's store. Either the store code inserted through InsertLfpStore or the store code in the Business Profile. Corresponds to the JSON property storeCode

Returns:

  • (String)


126
127
128
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 126

def store_code
  @store_code
end

#target_accountFixnum

Required. The Merchant Center ID of the merchant to submit the inventory for. Corresponds to the JSON property targetAccount

Returns:

  • (Fixnum)


131
132
133
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 131

def 
  @target_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 138

def update!(**args)
  @availability = args[:availability] if args.key?(:availability)
  @collection_time = args[:collection_time] if args.key?(:collection_time)
  @content_language = args[:content_language] if args.key?(:content_language)
  @feed_label = args[:feed_label] if args.key?(:feed_label)
  @gtin = args[:gtin] if args.key?(:gtin)
  @name = args[:name] if args.key?(:name)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @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)
  @region_code = args[:region_code] if args.key?(:region_code)
  @store_code = args[:store_code] if args.key?(:store_code)
  @target_account = args[:target_account] if args.key?(:target_account)
end