Class: Google::Apis::MerchantapiAccountsV1beta::Service

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_accounts_v1beta/classes.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb

Overview

Shipping service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Service

Returns a new instance of Service.



2359
2360
2361
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2359

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

Instance Attribute Details

#activeBoolean Also known as: active?

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

Returns:

  • (Boolean)


2301
2302
2303
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2301

def active
  @active
end

#currency_codeString

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 currencyCode

Returns:

  • (String)


2308
2309
2310
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2308

def currency_code
  @currency_code
end

#delivery_countriesArray<String>

Required. The CLDR territory code of the countries to which the service applies. Corresponds to the JSON property deliveryCountries

Returns:

  • (Array<String>)


2314
2315
2316
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2314

def delivery_countries
  @delivery_countries
end

#delivery_timeGoogle::Apis::MerchantapiAccountsV1beta::DeliveryTime

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



2319
2320
2321
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2319

def delivery_time
  @delivery_time
end

#loyalty_programsArray<Google::Apis::MerchantapiAccountsV1beta::LoyaltyProgram>

Optional. Loyalty programs that this shipping service is limited to. Corresponds to the JSON property loyaltyPrograms



2324
2325
2326
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2324

def loyalty_programs
  @loyalty_programs
end

#minimum_order_valueGoogle::Apis::MerchantapiAccountsV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property minimumOrderValue



2329
2330
2331
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2329

def minimum_order_value
  @minimum_order_value
end

#minimum_order_value_tableGoogle::Apis::MerchantapiAccountsV1beta::MinimumOrderValueTable

Table of per store minimum order values for the pickup fulfillment type. Corresponds to the JSON property minimumOrderValueTable



2334
2335
2336
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2334

def minimum_order_value_table
  @minimum_order_value_table
end

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

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



2341
2342
2343
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2341

def rate_groups
  @rate_groups
end

#service_nameString

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

Returns:

  • (String)


2346
2347
2348
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2346

def service_name
  @service_name
end

#shipment_typeString

Type of locations this service ships orders to. Corresponds to the JSON property shipmentType

Returns:

  • (String)


2351
2352
2353
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2351

def shipment_type
  @shipment_type
end

#store_configGoogle::Apis::MerchantapiAccountsV1beta::StoreConfig

A list of stores your products are delivered from. This is only valid for the local delivery shipment type. Corresponds to the JSON property storeConfig



2357
2358
2359
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2357

def store_config
  @store_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2364

def update!(**args)
  @active = args[:active] if args.key?(:active)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @delivery_countries = args[:delivery_countries] if args.key?(:delivery_countries)
  @delivery_time = args[:delivery_time] if args.key?(:delivery_time)
  @loyalty_programs = args[:loyalty_programs] if args.key?(:loyalty_programs)
  @minimum_order_value = args[:minimum_order_value] if args.key?(:minimum_order_value)
  @minimum_order_value_table = args[:minimum_order_value_table] if args.key?(:minimum_order_value_table)
  @rate_groups = args[:rate_groups] if args.key?(:rate_groups)
  @service_name = args[:service_name] if args.key?(:service_name)
  @shipment_type = args[:shipment_type] if args.key?(:shipment_type)
  @store_config = args[:store_config] if args.key?(:store_config)
end