class Google::Apis::ContentV2::AccountShippingShippingServiceCostRule
Building block of the cost calculation decision tree.
-
The tree root should have no condition and no calculation method.
-
All the children must have a condition on the same dimension. The first
child matching a condition is entered, therefore, price and weight conditions form contiguous intervals.
-
The last child of an element must have no condition and matches all elements
not previously matched.
-
Children and calculation method are mutually exclusive, and exactly one of
them must be defined; the root must only have children.
Attributes
Shipping cost calculation method. Exactly one of the field is set. Corresponds to the JSON property `calculationMethod` @return [Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod]
Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. Corresponds to the JSON property `children` @return [Array<Google::Apis::ContentV2::AccountShippingShippingServiceCostRule>]
Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. Corresponds to the JSON property `condition` @return [Google::Apis::ContentV2::AccountShippingCondition]
Public Class Methods
# File generated/google/apis/content_v2/classes.rb, line 595 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/content_v2/classes.rb, line 600 def update!(**args) @calculation_method = args[:calculation_method] if args.key?(:calculation_method) @children = args[:children] if args.key?(:children) @condition = args[:condition] if args.key?(:condition) end