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 account's [shipping setting]((https://support.google.com/ merchants/answer/6069284).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ShippingSettings

Returns a new instance of ShippingSettings.



2414
2415
2416
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2414

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

Instance Attribute Details

#etagString

Required. This field is used for avoid async issue. Make sure shipping setting data didn't change between get call and insert call. The user should do following steps: 1. Set etag field as empty string for initial shipping setting creation. 2. After initial creation, call get method to obtain an etag and current shipping setting data before call insert. 3. Modify to wanted shipping setting information. 4. Call insert method with the wanted shipping setting information with the etag obtained from step 2. 5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag. Corresponds to the JSON property etag

Returns:

  • (String)


2396
2397
2398
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2396

def etag
  @etag
end

#nameString

Identifier. The resource name of the shipping setting. Format: accounts/ account/shippingSetting Corresponds to the JSON property name

Returns:

  • (String)


2402
2403
2404
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2402

def name
  @name
end

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

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



2407
2408
2409
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2407

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



2412
2413
2414
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2412

def warehouses
  @warehouses
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2419
2420
2421
2422
2423
2424
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2419

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