Class: Google::Apis::ContentV2::SetInventoryRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SetInventoryRequest

Returns a new instance of SetInventoryRequest.



3278
3279
3280
# File 'lib/google/apis/content_v2/classes.rb', line 3278

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

Instance Attribute Details

#availabilityString

The availability of the product. Acceptable values are: - "in stock" - "out of stock" - "preorder" Corresponds to the JSON property availability

Returns:

  • (String)


3194
3195
3196
# File 'lib/google/apis/content_v2/classes.rb', line 3194

def availability
  @availability
end

#custom_label0String

Custom label 0 for custom grouping of items in a Shopping campaign. Only supported for online products. Corresponds to the JSON property customLabel0

Returns:

  • (String)


3200
3201
3202
# File 'lib/google/apis/content_v2/classes.rb', line 3200

def custom_label0
  @custom_label0
end

#custom_label1String

Custom label 1 for custom grouping of items in a Shopping campaign. Only supported for online products. Corresponds to the JSON property customLabel1

Returns:

  • (String)


3206
3207
3208
# File 'lib/google/apis/content_v2/classes.rb', line 3206

def custom_label1
  @custom_label1
end

#custom_label2String

Custom label 2 for custom grouping of items in a Shopping campaign. Only supported for online products. Corresponds to the JSON property customLabel2

Returns:

  • (String)


3212
3213
3214
# File 'lib/google/apis/content_v2/classes.rb', line 3212

def custom_label2
  @custom_label2
end

#custom_label3String

Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products. Corresponds to the JSON property customLabel3

Returns:

  • (String)


3218
3219
3220
# File 'lib/google/apis/content_v2/classes.rb', line 3218

def custom_label3
  @custom_label3
end

#custom_label4String

Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products. Corresponds to the JSON property customLabel4

Returns:

  • (String)


3224
3225
3226
# File 'lib/google/apis/content_v2/classes.rb', line 3224

def custom_label4
  @custom_label4
end

#installmentGoogle::Apis::ContentV2::Installment

Number and amount of installments to pay for an item. Brazil only. Corresponds to the JSON property installment



3229
3230
3231
# File 'lib/google/apis/content_v2/classes.rb', line 3229

def installment
  @installment
end

#instore_product_locationString

The instore product location. Supported only for local products. Corresponds to the JSON property instoreProductLocation

Returns:

  • (String)


3234
3235
3236
# File 'lib/google/apis/content_v2/classes.rb', line 3234

def instore_product_location
  @instore_product_location
end

#loyalty_pointsGoogle::Apis::ContentV2::LoyaltyPoints

Loyalty points that users receive after purchasing the item. Japan only. Corresponds to the JSON property loyaltyPoints



3239
3240
3241
# File 'lib/google/apis/content_v2/classes.rb', line 3239

def loyalty_points
  @loyalty_points
end

#pickupGoogle::Apis::ContentV2::InventoryPickup

Store pickup information. Only supported for local inventory. Not setting pickup means "don't update" while setting it to the empty value (```in JSON) means "delete". Otherwise,pickupMethodandpickupSlamust be set together, unlesspickupMethodis "not supported". Corresponds to the JSON propertypickup`



3247
3248
3249
# File 'lib/google/apis/content_v2/classes.rb', line 3247

def pickup
  @pickup
end

#priceGoogle::Apis::ContentV2::Price

The price of the product. Corresponds to the JSON property price



3252
3253
3254
# File 'lib/google/apis/content_v2/classes.rb', line 3252

def price
  @price
end

#quantityFixnum

The quantity of the product. Must be equal to or greater than zero. Supported only for local products. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


3258
3259
3260
# File 'lib/google/apis/content_v2/classes.rb', line 3258

def quantity
  @quantity
end

#sale_priceGoogle::Apis::ContentV2::Price

The sale price of the product. Mandatory if sale_price_effective_date is defined. Corresponds to the JSON property salePrice



3264
3265
3266
# File 'lib/google/apis/content_v2/classes.rb', line 3264

def sale_price
  @sale_price
end

#sale_price_effective_dateString

A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. Corresponds to the JSON property salePriceEffectiveDate

Returns:

  • (String)


3270
3271
3272
# File 'lib/google/apis/content_v2/classes.rb', line 3270

def sale_price_effective_date
  @sale_price_effective_date
end

#sell_on_google_quantityFixnum

The quantity of the product that is available for selling on Google. Supported only for online products. Corresponds to the JSON property sellOnGoogleQuantity

Returns:

  • (Fixnum)


3276
3277
3278
# File 'lib/google/apis/content_v2/classes.rb', line 3276

def sell_on_google_quantity
  @sell_on_google_quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
# File 'lib/google/apis/content_v2/classes.rb', line 3283

def update!(**args)
  @availability = args[:availability] if args.key?(:availability)
  @custom_label0 = args[:custom_label0] if args.key?(:custom_label0)
  @custom_label1 = args[:custom_label1] if args.key?(:custom_label1)
  @custom_label2 = args[:custom_label2] if args.key?(:custom_label2)
  @custom_label3 = args[:custom_label3] if args.key?(:custom_label3)
  @custom_label4 = args[:custom_label4] if args.key?(:custom_label4)
  @installment = args[:installment] if args.key?(:installment)
  @instore_product_location = args[:instore_product_location] if args.key?(:instore_product_location)
  @loyalty_points = args[:loyalty_points] if args.key?(:loyalty_points)
  @pickup = args[:pickup] if args.key?(:pickup)
  @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)
  @sell_on_google_quantity = args[:sell_on_google_quantity] if args.key?(:sell_on_google_quantity)
end