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.



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

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)


2950
2951
2952
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2950

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



2955
2956
2957
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2955

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)


2961
2962
2963
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2961

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)


2968
2969
2970
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2968

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)


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