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
519 520 521 |
# File 'generated/google/apis/content_v2/classes.rb', line 519 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
476 477 478 |
# File 'generated/google/apis/content_v2/classes.rb', line 476 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
482 483 484 |
# File 'generated/google/apis/content_v2/classes.rb', line 482 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
495 496 497 |
# File 'generated/google/apis/content_v2/classes.rb', line 495 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
501 502 503 |
# File 'generated/google/apis/content_v2/classes.rb', line 501 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
507 508 509 |
# File 'generated/google/apis/content_v2/classes.rb', line 507 def min_days_in_transit @min_days_in_transit end |
#name ⇒ String
The name of this shipping service.
Corresponds to the JSON property name
512 513 514 |
# File 'generated/google/apis/content_v2/classes.rb', line 512 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
517 518 519 |
# File 'generated/google/apis/content_v2/classes.rb', line 517 def sale_country @sale_country end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
524 525 526 527 528 529 530 531 532 |
# File 'generated/google/apis/content_v2/classes.rb', line 524 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 |