Class: Google::Apis::MerchantapiLfpV1beta::LfpSale
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiLfpV1beta::LfpSale
- 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
A sale for the merchant.
Instance Attribute Summary collapse
-
#content_language ⇒ String
Required.
-
#feed_label ⇒ String
Optional.
-
#gtin ⇒ String
Required.
-
#name ⇒ String
Output only.
-
#offer_id ⇒ String
Required.
-
#price ⇒ Google::Apis::MerchantapiLfpV1beta::Price
The price represented as a number and currency.
-
#quantity ⇒ Fixnum
Required.
-
#region_code ⇒ String
Required.
-
#sale_time ⇒ String
Required.
-
#store_code ⇒ String
Required.
-
#target_account ⇒ Fixnum
Required.
-
#uid ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LfpSale
constructor
A new instance of LfpSale.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LfpSale
Returns a new instance of LfpSale.
229 230 231 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 229 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content_language ⇒ String
Required. The two-letter ISO 639-1 language code for the item.
Corresponds to the JSON property contentLanguage
163 164 165 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 163 def content_language @content_language end |
#feed_label ⇒ String
Optional. The feed label for the product. If this is not set, it will
default to regionCode
.
Corresponds to the JSON property feedLabel
170 171 172 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 170 def feed_label @feed_label end |
#gtin ⇒ String
Required. The Global Trade Item Number of the sold product.
Corresponds to the JSON property gtin
175 176 177 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 175 def gtin @gtin end |
#name ⇒ String
Output only. Identifier. The name of the LfpSale
resource. Format: accounts/
account/lfpSales/
sale`
Corresponds to the JSON property
name`
181 182 183 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 181 def name @name end |
#offer_id ⇒ String
Required. 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
189 190 191 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 189 def offer_id @offer_id end |
#price ⇒ Google::Apis::MerchantapiLfpV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property price
194 195 196 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 194 def price @price end |
#quantity ⇒ Fixnum
Required. The relative change of the available quantity. Negative for items
returned.
Corresponds to the JSON property quantity
200 201 202 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 200 def quantity @quantity end |
#region_code ⇒ String
Required. The CLDR territory code for the country where the product is sold.
Corresponds to the JSON property regionCode
206 207 208 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 206 def region_code @region_code end |
#sale_time ⇒ String
Required. The timestamp for the sale.
Corresponds to the JSON property saleTime
211 212 213 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 211 def sale_time @sale_time end |
#store_code ⇒ String
Required. The identifier of the merchant's store. Either a storeCode
inserted through the API or the code of the store in the Business Profile.
Corresponds to the JSON property storeCode
217 218 219 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 217 def store_code @store_code end |
#target_account ⇒ Fixnum
Required. The Merchant Center ID of the merchant to submit the sale for.
Corresponds to the JSON property targetAccount
222 223 224 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 222 def target_account @target_account end |
#uid ⇒ String
Output only. System generated globally unique ID for the LfpSale
.
Corresponds to the JSON property uid
227 228 229 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 227 def uid @uid end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/google/apis/merchantapi_lfp_v1beta/classes.rb', line 234 def update!(**args) @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) @price = args[:price] if args.key?(:price) @quantity = args[:quantity] if args.key?(:quantity) @region_code = args[:region_code] if args.key?(:region_code) @sale_time = args[:sale_time] if args.key?(:sale_time) @store_code = args[:store_code] if args.key?(:store_code) @target_account = args[:target_account] if args.key?(:target_account) @uid = args[:uid] if args.key?(:uid) end |