Class: Google::Apis::ContentV2_1::RateGroup

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RateGroup

Returns a new instance of RateGroup.



11572
11573
11574
# File 'lib/google/apis/content_v2_1/classes.rb', line 11572

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

Instance Attribute Details

#applicable_shipping_labelsArray<String>

A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required. Corresponds to the JSON property applicableShippingLabels

Returns:

  • (Array<String>)


11539
11540
11541
# File 'lib/google/apis/content_v2_1/classes.rb', line 11539

def applicable_shipping_labels
  @applicable_shipping_labels
end

#carrier_ratesArray<Google::Apis::ContentV2_1::CarrierRate>

A list of carrier rates that can be referred to by mainTable or singleValue . Corresponds to the JSON property carrierRates



11545
11546
11547
# File 'lib/google/apis/content_v2_1/classes.rb', line 11545

def carrier_rates
  @carrier_rates
end

#main_tableGoogle::Apis::ContentV2_1::Table

A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set. Corresponds to the JSON property mainTable



11551
11552
11553
# File 'lib/google/apis/content_v2_1/classes.rb', line 11551

def main_table
  @main_table
end

#nameString

Name of the rate group. Optional. If set has to be unique within shipping service. Corresponds to the JSON property name

Returns:

  • (String)


11557
11558
11559
# File 'lib/google/apis/content_v2_1/classes.rb', line 11557

def name
  @name
end

#single_valueGoogle::Apis::ContentV2_1::Value

The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set. Corresponds to the JSON property singleValue



11564
11565
11566
# File 'lib/google/apis/content_v2_1/classes.rb', line 11564

def single_value
  @single_value
end

#subtablesArray<Google::Apis::ContentV2_1::Table>

A list of subtables referred to by mainTable. Can only be set if mainTable is set. Corresponds to the JSON property subtables



11570
11571
11572
# File 'lib/google/apis/content_v2_1/classes.rb', line 11570

def subtables
  @subtables
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11577
11578
11579
11580
11581
11582
11583
11584
# File 'lib/google/apis/content_v2_1/classes.rb', line 11577

def update!(**args)
  @applicable_shipping_labels = args[:applicable_shipping_labels] if args.key?(:applicable_shipping_labels)
  @carrier_rates = args[:carrier_rates] if args.key?(:carrier_rates)
  @main_table = args[:main_table] if args.key?(:main_table)
  @name = args[:name] if args.key?(:name)
  @single_value = args[:single_value] if args.key?(:single_value)
  @subtables = args[:subtables] if args.key?(:subtables)
end