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.
2976 2977 2978 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2976 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
2950 2951 2952 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2950 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
2955 2956 2957 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2955 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
2961 2962 2963 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2961 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
2968 2969 2970 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2968 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
2974 2975 2976 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2974 def subtable @subtable end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2981 2982 2983 2984 2985 2986 2987 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2981 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 |