Class: Google::Apis::MerchantapiAccountsV1beta::Value
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiAccountsV1beta::Value
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_accounts_v1beta/classes.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb
Overview
The single value of a rate group or the value of a rate group table's cell.
Exactly one of no_shipping, flat_rate, price_percentage,
carrier_rateName, subtable_name must be set.
Instance Attribute Summary collapse
-
#carrier_rate ⇒ String
The name of a carrier rate referring to a carrier rate defined in the same rate group.
-
#flat_rate ⇒ Google::Apis::MerchantapiAccountsV1beta::Price
The price represented as a number and currency.
-
#no_shipping ⇒ Boolean
(also: #no_shipping?)
If true, then the product can't be shipped.
-
#price_percentage ⇒ String
A percentage of the price represented as a number in decimal notation (For example,
"5.4"). -
#subtable ⇒ String
The name of a subtable.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Value
constructor
A new instance of Value.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Value
Returns a new instance of Value.
4558 4559 4560 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4558 def initialize(**args) update!(**args) end |
Instance Attribute Details
#carrier_rate ⇒ String
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 carrierRate
4532 4533 4534 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4532 def carrier_rate @carrier_rate end |
#flat_rate ⇒ Google::Apis::MerchantapiAccountsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property flatRate
4537 4538 4539 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4537 def flat_rate @flat_rate end |
#no_shipping ⇒ Boolean Also known as: no_shipping?
If true, then the product can't be shipped. Must be true when set, can only be
set if all other fields are not set.
Corresponds to the JSON property noShipping
4543 4544 4545 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4543 def no_shipping @no_shipping end |
#price_percentage ⇒ String
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
4550 4551 4552 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4550 def price_percentage @price_percentage end |
#subtable ⇒ String
The name of a subtable. Can only be set in table cells (For example, not for
single values), and only if all other fields are not set.
Corresponds to the JSON property subtable
4556 4557 4558 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4556 def subtable @subtable end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4563 4564 4565 4566 4567 4568 4569 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4563 def update!(**args) @carrier_rate = args[:carrier_rate] if args.key?(:carrier_rate) @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 = args[:subtable] if args.key?(:subtable) end |