Class: Google::Apis::ContentV2::AccountShippingShippingService

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
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

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

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

#activeBoolean Also known as: active?

Whether the shipping service is available. Corresponds to the JSON property active

Returns:

  • (Boolean)


475
476
477
# File 'generated/google/apis/content_v2/classes.rb', line 475

def active
  @active
end

#calculation_methodGoogle::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_treeGoogle::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_transitString

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

Returns:

  • (String)


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_transitString

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

Returns:

  • (String)


506
507
508
# File 'generated/google/apis/content_v2/classes.rb', line 506

def min_days_in_transit
  @min_days_in_transit
end

#nameString

The name of this shipping service. Corresponds to the JSON property name

Returns:

  • (String)


511
512
513
# File 'generated/google/apis/content_v2/classes.rb', line 511

def name
  @name
end

#sale_countryString

The CLDR territory code of the sale country for which this service can be used. Corresponds to the JSON property saleCountry

Returns:

  • (String)


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