Class: Google::Apis::ContentV2::AccountShippingShippingService
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2::AccountShippingShippingService
- Defined in:
- generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/representations.rb
Overview
Shipping services provided in a country.
Instance Attribute Summary collapse
-
#active ⇒ Boolean
(also: #active?)
Whether the shipping service is available.
-
#calculation_method ⇒ Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod
Shipping cost calculation method.
-
#cost_rule_tree ⇒ Google::Apis::ContentV2::AccountShippingShippingServiceCostRule
Building block of the cost calculation decision tree.
-
#max_days_in_transit ⇒ String
The maximum number of days in transit.
-
#min_days_in_transit ⇒ String
The minimum number of days in transit.
-
#name ⇒ String
The name of this shipping service.
-
#sale_country ⇒ String
The CLDR territory code of the sale country for which this service can be used.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AccountShippingShippingService
constructor
A new instance of AccountShippingShippingService.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ AccountShippingShippingService
Returns a new instance of AccountShippingShippingService.
518 519 520 |
# File 'generated/google/apis/content_v2/classes.rb', line 518 def initialize(**args) update!(**args) end |
Instance Attribute Details
#active ⇒ Boolean Also known as: active?
Whether the shipping service is available.
Corresponds to the JSON property active
475 476 477 |
# File 'generated/google/apis/content_v2/classes.rb', line 475 def active @active end |
#calculation_method ⇒ Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod
Shipping cost calculation method. Exactly one of the field is set.
Corresponds to the JSON property calculationMethod
481 482 483 |
# File 'generated/google/apis/content_v2/classes.rb', line 481 def calculation_method @calculation_method end |
#cost_rule_tree ⇒ 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.
Corresponds to the JSON property
costRuleTree
494 495 496 |
# File 'generated/google/apis/content_v2/classes.rb', line 494 def cost_rule_tree @cost_rule_tree end |
#max_days_in_transit ⇒ String
The maximum number of days in transit. Must be a value between 0 and 250
included. A value of 0 means same day delivery.
Corresponds to the JSON property maxDaysInTransit
500 501 502 |
# File 'generated/google/apis/content_v2/classes.rb', line 500 def max_days_in_transit @max_days_in_transit end |
#min_days_in_transit ⇒ String
The minimum number of days in transit. Must be a value between 0 and
maxDaysIntransit included. A value of 0 means same day delivery.
Corresponds to the JSON property minDaysInTransit
506 507 508 |
# File 'generated/google/apis/content_v2/classes.rb', line 506 def min_days_in_transit @min_days_in_transit end |
#name ⇒ String
The name of this shipping service.
Corresponds to the JSON property name
511 512 513 |
# File 'generated/google/apis/content_v2/classes.rb', line 511 def name @name end |
#sale_country ⇒ String
The CLDR territory code of the sale country for which this service can be used.
Corresponds to the JSON property saleCountry
516 517 518 |
# File 'generated/google/apis/content_v2/classes.rb', line 516 def sale_country @sale_country end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
523 524 525 526 527 528 529 530 531 |
# File 'generated/google/apis/content_v2/classes.rb', line 523 def update!(**args) @active = args[:active] if args.key?(:active) @calculation_method = args[:calculation_method] if args.key?(:calculation_method) @cost_rule_tree = args[:cost_rule_tree] if args.key?(:cost_rule_tree) @max_days_in_transit = args[:max_days_in_transit] if args.key?(:max_days_in_transit) @min_days_in_transit = args[:min_days_in_transit] if args.key?(:min_days_in_transit) @name = args[:name] if args.key?(:name) @sale_country = args[:sale_country] if args.key?(:sale_country) end |