Class: Google::Apis::MerchantapiAccountsV1beta::ShippingSettings

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

The Merchant Center account's shipping settings. The ShippingSettings resource lets you retrieve and update the shipping settings of your advanced account and all its associated sub-accounts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ShippingSettings

Returns a new instance of ShippingSettings.



4041
4042
4043
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4041

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

Instance Attribute Details

#etagString

Required. This field helps avoid async issues. It ensures that the shipping setting data doesn't change between the get call and the insert call. The user should follow these steps: 1. Set the etag field as an empty string for the initial shipping setting creation. 2. After the initial creation, call the get method to obtain an etag and the current shipping setting data before calling insert. 3. Modify the shipping setting information. 4. Call the insert method with the shipping setting information and the etag obtained in step 2. 5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag. Corresponds to the JSON property etag

Returns:

  • (String)


4023
4024
4025
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4023

def etag
  @etag
end

#nameString

Identifier. The resource name of the shipping settings. Format: accounts/ account/shippingSettings. For example, accounts/123456/shippingSettings. Corresponds to the JSON property name

Returns:

  • (String)


4029
4030
4031
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4029

def name
  @name
end

#servicesArray<Google::Apis::MerchantapiAccountsV1beta::Service>

Optional. The target account's list of services. Corresponds to the JSON property services



4034
4035
4036
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4034

def services
  @services
end

#warehousesArray<Google::Apis::MerchantapiAccountsV1beta::Warehouse>

Optional. A list of warehouses which can be referred to in services. Corresponds to the JSON property warehouses



4039
4040
4041
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4039

def warehouses
  @warehouses
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4046
4047
4048
4049
4050
4051
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 4046

def update!(**args)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @services = args[:services] if args.key?(:services)
  @warehouses = args[:warehouses] if args.key?(:warehouses)
end