Class: Google::Apis::ContentV2_1::Value

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

Overview

The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Value

Returns a new instance of Value.



14372
14373
14374
# File 'lib/google/apis/content_v2_1/classes.rb', line 14372

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

Instance Attribute Details

#carrier_rate_nameString

The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. Corresponds to the JSON property carrierRateName

Returns:

  • (String)


14346
14347
14348
# File 'lib/google/apis/content_v2_1/classes.rb', line 14346

def carrier_rate_name
  @carrier_rate_name
end

#flat_rateGoogle::Apis::ContentV2_1::Price

A flat rate. Can only be set if all other fields are not set. Corresponds to the JSON property flatRate



14351
14352
14353
# File 'lib/google/apis/content_v2_1/classes.rb', line 14351

def flat_rate
  @flat_rate
end

#no_shippingBoolean Also known as: no_shipping?

If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set. Corresponds to the JSON property noShipping

Returns:

  • (Boolean)


14357
14358
14359
# File 'lib/google/apis/content_v2_1/classes.rb', line 14357

def no_shipping
  @no_shipping
end

#price_percentageString

A percentage of the price represented as a number in decimal notation (for example, "5.4"). Can only be set if all other fields are not set. Corresponds to the JSON property pricePercentage

Returns:

  • (String)


14364
14365
14366
# File 'lib/google/apis/content_v2_1/classes.rb', line 14364

def price_percentage
  @price_percentage
end

#subtable_nameString

The name of a subtable. Can only be set in table cells (not for single values), and only if all other fields are not set. Corresponds to the JSON property subtableName

Returns:

  • (String)


14370
14371
14372
# File 'lib/google/apis/content_v2_1/classes.rb', line 14370

def subtable_name
  @subtable_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



14377
14378
14379
14380
14381
14382
14383
# File 'lib/google/apis/content_v2_1/classes.rb', line 14377

def update!(**args)
  @carrier_rate_name = args[:carrier_rate_name] if args.key?(:carrier_rate_name)
  @flat_rate = args[:flat_rate] if args.key?(:flat_rate)
  @no_shipping = args[:no_shipping] if args.key?(:no_shipping)
  @price_percentage = args[:price_percentage] if args.key?(:price_percentage)
  @subtable_name = args[:subtable_name] if args.key?(:subtable_name)
end