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.



3948
3949
3950
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3948

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)


3890
3891
3892
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3890

def active
  @active
end

#currency_codeString

Required. 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)


3897
3898
3899
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3897

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


3903
3904
3905
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3903

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



3908
3909
3910
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3908

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



3913
3914
3915
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3913

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



3918
3919
3920
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3918

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



3923
3924
3925
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3923

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



3930
3931
3932
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3930

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)


3935
3936
3937
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3935

def service_name
  @service_name
end

#shipment_typeString

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

Returns:

  • (String)


3940
3941
3942
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3940

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



3946
3947
3948
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3946

def store_config
  @store_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3953

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