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.
4577 4578 4579 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4577 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
4551 4552 4553 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4551 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
4556 4557 4558 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4556 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
4562 4563 4564 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4562 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
4569 4570 4571 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4569 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
4575 4576 4577 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4575 def subtable @subtable end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4582 4583 4584 4585 4586 4587 4588 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4582 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 |