Class: Google::Apis::MerchantapiAccountsV1beta::Value

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Value

Returns a new instance of Value.



2978
2979
2980
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2978

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

Instance Attribute Details

#carrier_rateString

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

Returns:

  • (String)


2952
2953
2954
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2952

def carrier_rate
  @carrier_rate
end

#flat_rateGoogle::Apis::MerchantapiAccountsV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property flatRate



2957
2958
2959
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2957

def flat_rate
  @flat_rate
end

#no_shippingBoolean 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

Returns:

  • (Boolean)


2963
2964
2965
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2963

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)


2970
2971
2972
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2970

def price_percentage
  @price_percentage
end

#subtableString

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

Returns:

  • (String)


2976
2977
2978
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2976

def subtable
  @subtable
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2983
2984
2985
2986
2987
2988
2989
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2983

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