Class: Google::Apis::ContentV2::Service

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

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) ⇒ Service

Returns a new instance of Service



8109
8110
8111
# File 'generated/google/apis/content_v2/classes.rb', line 8109

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

Instance Attribute Details

#activeBoolean Also known as: active?

A boolean exposing the active status of the shipping service. Required. Corresponds to the JSON property active

Returns:

  • (Boolean)


8070
8071
8072
# File 'generated/google/apis/content_v2/classes.rb', line 8070

def active
  @active
end

#currencyString

The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups. Corresponds to the JSON property currency

Returns:

  • (String)


8077
8078
8079
# File 'generated/google/apis/content_v2/classes.rb', line 8077

def currency
  @currency
end

#delivery_countryString

The CLDR territory code of the country to which the service applies. Required. Corresponds to the JSON property deliveryCountry

Returns:

  • (String)


8082
8083
8084
# File 'generated/google/apis/content_v2/classes.rb', line 8082

def delivery_country
  @delivery_country
end

#delivery_timeGoogle::Apis::ContentV2::DeliveryTime

Time spent in various aspects from order to the delivery of the product. Required. Corresponds to the JSON property deliveryTime



8088
8089
8090
# File 'generated/google/apis/content_v2/classes.rb', line 8088

def delivery_time
  @delivery_time
end

#minimum_order_valueGoogle::Apis::ContentV2::Price

Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency. Corresponds to the JSON property minimumOrderValue



8095
8096
8097
# File 'generated/google/apis/content_v2/classes.rb', line 8095

def minimum_order_value
  @minimum_order_value
end

#nameString

Free-form name of the service. Must be unique within target account. Required. Corresponds to the JSON property name

Returns:

  • (String)


8100
8101
8102
# File 'generated/google/apis/content_v2/classes.rb', line 8100

def name
  @name
end

#rate_groupsArray<Google::Apis::ContentV2::RateGroup>

Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other applicableShippingLabels must not overlap. Corresponds to the JSON property rateGroups



8107
8108
8109
# File 'generated/google/apis/content_v2/classes.rb', line 8107

def rate_groups
  @rate_groups
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8114
8115
8116
8117
8118
8119
8120
8121
8122
# File 'generated/google/apis/content_v2/classes.rb', line 8114

def update!(**args)
  @active = args[:active] if args.key?(:active)
  @currency = args[:currency] if args.key?(:currency)
  @delivery_country = args[:delivery_country] if args.key?(:delivery_country)
  @delivery_time = args[:delivery_time] if args.key?(:delivery_time)
  @minimum_order_value = args[:minimum_order_value] if args.key?(:minimum_order_value)
  @name = args[:name] if args.key?(:name)
  @rate_groups = args[:rate_groups] if args.key?(:rate_groups)
end