google-shopping-merchant-accounts-v1 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/shopping/merchant/accounts/v1/regions_pb.rb +6 -1
- data/lib/google/shopping/merchant/accounts/v1/regions_service/client.rb +291 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/rest/client.rb +270 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_service/rest/service_stub.rb +186 -0
- data/lib/google/shopping/merchant/accounts/v1/regions_services_pb.rb +9 -0
- data/lib/google/shopping/merchant/accounts/v1/version.rb +1 -1
- data/proto_docs/google/shopping/merchant/accounts/v1/regions.rb +60 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4985da6607428844932bea72c026e8170fabc213b6ae9272ebf8f051a5795186
|
4
|
+
data.tar.gz: 56265170844714b047fcf9616b6e893812e4a34b9afe5290b8a75d8b54cbf66b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10fb197409148b07dc025fd0ae176a4a3df09891d8ecfa8cd299fea9fe6d6f47b6947821f7ca3d1401f4d419a11a3d2449470d31dc71d29f0b84e6b565eed58a
|
7
|
+
data.tar.gz: 92600e97b55b26c80f5fe705eaba9d541e5fcb24c1198da672bfca207ec611d8d2a3a5e1195aa5b2e28b8a9845dfb767debe79c1b57b15d73e3597727533720a
|
@@ -13,7 +13,7 @@ require 'google/protobuf/field_mask_pb'
|
|
13
13
|
require 'google/protobuf/wrappers_pb'
|
14
14
|
|
15
15
|
|
16
|
-
descriptor_data = "\n2google/shopping/merchant/accounts/v1/regions.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xac\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x06region\x18\x03 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\"\x8e\x01\n\x13UpdateRegionRequest\x12\x41\n\x06region\x18\x01 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe5\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12Z\n\x10postal_code_area\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12W\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcb\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32K.google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\
|
16
|
+
descriptor_data = "\n2google/shopping/merchant/accounts/v1/regions.proto\x12$google.shopping.merchant.accounts.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xac\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x06region\x18\x03 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\"\xa9\x01\n\x19\x42\x61tchCreateRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.CreateRegionRequestB\x03\xe0\x41\x02\"[\n\x1a\x42\x61tchCreateRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\"\x8e\x01\n\x13UpdateRegionRequest\x12\x41\n\x06region\x18\x01 \x01(\x0b\x32,.google.shopping.merchant.accounts.v1.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xa9\x01\n\x19\x42\x61tchUpdateRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequestB\x03\xe0\x41\x02\"[\n\x1a\x42\x61tchUpdateRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xa9\x01\n\x19\x42\x61tchDeleteRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12P\n\x08requests\x18\x02 \x03(\x0b\x32\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequestB\x03\xe0\x41\x02\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListRegionsResponse\x12=\n\x07regions\x18\x01 \x03(\x0b\x32,.google.shopping.merchant.accounts.v1.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe5\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12Z\n\x10postal_code_area\x18\x03 \x01(\x0b\x32;.google.shopping.merchant.accounts.v1.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12W\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32:.google.shopping.merchant.accounts.v1.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcb\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32K.google.shopping.merchant.accounts.v1.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xe8\x0c\n\x0eRegionsService\x12\xaa\x01\n\tGetRegion\x12\x36.google.shopping.merchant.accounts.v1.GetRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{name=accounts/*/regions/*}\x12\xcb\x01\n\x0c\x43reateRegion\x12\x39.google.shopping.merchant.accounts.v1.CreateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"R\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x32\"(/accounts/v1/{parent=accounts/*}/regions:\x06region\x12\xd8\x01\n\x12\x42\x61tchCreateRegions\x12?.google.shopping.merchant.accounts.v1.BatchCreateRegionsRequest\x1a@.google.shopping.merchant.accounts.v1.BatchCreateRegionsResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchCreate:\x01*\x12\xcd\x01\n\x0cUpdateRegion\x12\x39.google.shopping.merchant.accounts.v1.UpdateRegionRequest\x1a,.google.shopping.merchant.accounts.v1.Region\"T\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02\x39\x32//accounts/v1/{region.name=accounts/*/regions/*}:\x06region\x12\xd8\x01\n\x12\x42\x61tchUpdateRegions\x12?.google.shopping.merchant.accounts.v1.BatchUpdateRegionsRequest\x1a@.google.shopping.merchant.accounts.v1.BatchUpdateRegionsResponse\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchUpdate:\x01*\x12\x9a\x01\n\x0c\x44\x65leteRegion\x12\x39.google.shopping.merchant.accounts.v1.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/accounts/v1/{name=accounts/*/regions/*}\x12\xae\x01\n\x12\x42\x61tchDeleteRegions\x12?.google.shopping.merchant.accounts.v1.BatchDeleteRegionsRequest\x1a\x16.google.protobuf.Empty\"?\x82\xd3\xe4\x93\x02\x39\"4/accounts/v1/{parent=accounts/*}/regions:batchDelete:\x01*\x12\xbd\x01\n\x0bListRegions\x12\x38.google.shopping.merchant.accounts.v1.ListRegionsRequest\x1a\x39.google.shopping.merchant.accounts.v1.ListRegionsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/accounts/v1/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xff\x01\n(com.google.shopping.merchant.accounts.v1B\x0cRegionsProtoP\x01ZJcloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb;accountspb\xaa\x02$Google.Shopping.Merchant.Accounts.V1\xca\x02$Google\\Shopping\\Merchant\\Accounts\\V1\xea\x02(Google::Shopping::Merchant::Accounts::V1b\x06proto3"
|
17
17
|
|
18
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
19
|
|
@@ -48,8 +48,13 @@ module Google
|
|
48
48
|
module V1
|
49
49
|
GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.GetRegionRequest").msgclass
|
50
50
|
CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.CreateRegionRequest").msgclass
|
51
|
+
BatchCreateRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchCreateRegionsRequest").msgclass
|
52
|
+
BatchCreateRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchCreateRegionsResponse").msgclass
|
51
53
|
UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.UpdateRegionRequest").msgclass
|
54
|
+
BatchUpdateRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchUpdateRegionsRequest").msgclass
|
55
|
+
BatchUpdateRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchUpdateRegionsResponse").msgclass
|
52
56
|
DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.DeleteRegionRequest").msgclass
|
57
|
+
BatchDeleteRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.BatchDeleteRegionsRequest").msgclass
|
53
58
|
ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsRequest").msgclass
|
54
59
|
ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.ListRegionsResponse").msgclass
|
55
60
|
Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1.Region").msgclass
|
@@ -371,6 +371,96 @@ module Google
|
|
371
371
|
raise ::Google::Cloud::Error.from_error(e)
|
372
372
|
end
|
373
373
|
|
374
|
+
##
|
375
|
+
# Creates one or more regions in your Merchant Center account.
|
376
|
+
# Executing this method requires admin access.
|
377
|
+
#
|
378
|
+
# @overload batch_create_regions(request, options = nil)
|
379
|
+
# Pass arguments to `batch_create_regions` via a request object, either of type
|
380
|
+
# {::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest} or an equivalent Hash.
|
381
|
+
#
|
382
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Hash]
|
383
|
+
# A request object representing the call parameters. Required. To specify no
|
384
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
385
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
386
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
387
|
+
#
|
388
|
+
# @overload batch_create_regions(parent: nil, requests: nil)
|
389
|
+
# Pass arguments to `batch_create_regions` via keyword arguments. Note that at
|
390
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
391
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
392
|
+
#
|
393
|
+
# @param parent [::String]
|
394
|
+
# Required. The account to create one or more regions for.
|
395
|
+
# Format: `accounts/{account}`
|
396
|
+
# @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash>]
|
397
|
+
# Required. The region(s) to create.
|
398
|
+
# The maximum number of regions that can be created in a batch is 100.
|
399
|
+
#
|
400
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
401
|
+
# @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse]
|
402
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
403
|
+
#
|
404
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse]
|
405
|
+
#
|
406
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
407
|
+
#
|
408
|
+
# @example Basic example
|
409
|
+
# require "google/shopping/merchant/accounts/v1"
|
410
|
+
#
|
411
|
+
# # Create a client object. The client can be reused for multiple calls.
|
412
|
+
# client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new
|
413
|
+
#
|
414
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
415
|
+
# request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new
|
416
|
+
#
|
417
|
+
# # Call the batch_create_regions method.
|
418
|
+
# result = client.batch_create_regions request
|
419
|
+
#
|
420
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.
|
421
|
+
# p result
|
422
|
+
#
|
423
|
+
def batch_create_regions request, options = nil
|
424
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
425
|
+
|
426
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest
|
427
|
+
|
428
|
+
# Converts hash and nil to an options object
|
429
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
430
|
+
|
431
|
+
# Customize the options with defaults
|
432
|
+
metadata = @config.rpcs.batch_create_regions.metadata.to_h
|
433
|
+
|
434
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
435
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
436
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
437
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
|
438
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
439
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
440
|
+
|
441
|
+
header_params = {}
|
442
|
+
if request.parent
|
443
|
+
header_params["parent"] = request.parent
|
444
|
+
end
|
445
|
+
|
446
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
447
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
448
|
+
|
449
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_regions.timeout,
|
450
|
+
metadata: metadata,
|
451
|
+
retry_policy: @config.rpcs.batch_create_regions.retry_policy
|
452
|
+
|
453
|
+
options.apply_defaults timeout: @config.timeout,
|
454
|
+
metadata: @config.metadata,
|
455
|
+
retry_policy: @config.retry_policy
|
456
|
+
|
457
|
+
@regions_service_stub.call_rpc :batch_create_regions, request, options: options do |response, operation|
|
458
|
+
yield response, operation if block_given?
|
459
|
+
end
|
460
|
+
rescue ::GRPC::BadStatus => e
|
461
|
+
raise ::Google::Cloud::Error.from_error(e)
|
462
|
+
end
|
463
|
+
|
374
464
|
##
|
375
465
|
# Updates a region definition in your Merchant Center account.
|
376
466
|
# Executing this method requires admin access.
|
@@ -461,6 +551,96 @@ module Google
|
|
461
551
|
raise ::Google::Cloud::Error.from_error(e)
|
462
552
|
end
|
463
553
|
|
554
|
+
##
|
555
|
+
# Updates one or more regions in your Merchant Center account.
|
556
|
+
# Executing this method requires admin access.
|
557
|
+
#
|
558
|
+
# @overload batch_update_regions(request, options = nil)
|
559
|
+
# Pass arguments to `batch_update_regions` via a request object, either of type
|
560
|
+
# {::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest} or an equivalent Hash.
|
561
|
+
#
|
562
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Hash]
|
563
|
+
# A request object representing the call parameters. Required. To specify no
|
564
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
565
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
566
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
567
|
+
#
|
568
|
+
# @overload batch_update_regions(parent: nil, requests: nil)
|
569
|
+
# Pass arguments to `batch_update_regions` via keyword arguments. Note that at
|
570
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
571
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
572
|
+
#
|
573
|
+
# @param parent [::String]
|
574
|
+
# Required. The account to update one or more regions for.
|
575
|
+
# Format: `accounts/{account}`
|
576
|
+
# @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash>]
|
577
|
+
# Required. The region(s) to update.
|
578
|
+
# The maximum number of regions that can be updated in a batch is 100.
|
579
|
+
#
|
580
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
581
|
+
# @yieldparam response [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse]
|
582
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
583
|
+
#
|
584
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse]
|
585
|
+
#
|
586
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
587
|
+
#
|
588
|
+
# @example Basic example
|
589
|
+
# require "google/shopping/merchant/accounts/v1"
|
590
|
+
#
|
591
|
+
# # Create a client object. The client can be reused for multiple calls.
|
592
|
+
# client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new
|
593
|
+
#
|
594
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
595
|
+
# request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new
|
596
|
+
#
|
597
|
+
# # Call the batch_update_regions method.
|
598
|
+
# result = client.batch_update_regions request
|
599
|
+
#
|
600
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.
|
601
|
+
# p result
|
602
|
+
#
|
603
|
+
def batch_update_regions request, options = nil
|
604
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
605
|
+
|
606
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest
|
607
|
+
|
608
|
+
# Converts hash and nil to an options object
|
609
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
610
|
+
|
611
|
+
# Customize the options with defaults
|
612
|
+
metadata = @config.rpcs.batch_update_regions.metadata.to_h
|
613
|
+
|
614
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
615
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
616
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
617
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
|
618
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
619
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
620
|
+
|
621
|
+
header_params = {}
|
622
|
+
if request.parent
|
623
|
+
header_params["parent"] = request.parent
|
624
|
+
end
|
625
|
+
|
626
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
627
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
628
|
+
|
629
|
+
options.apply_defaults timeout: @config.rpcs.batch_update_regions.timeout,
|
630
|
+
metadata: metadata,
|
631
|
+
retry_policy: @config.rpcs.batch_update_regions.retry_policy
|
632
|
+
|
633
|
+
options.apply_defaults timeout: @config.timeout,
|
634
|
+
metadata: @config.metadata,
|
635
|
+
retry_policy: @config.retry_policy
|
636
|
+
|
637
|
+
@regions_service_stub.call_rpc :batch_update_regions, request, options: options do |response, operation|
|
638
|
+
yield response, operation if block_given?
|
639
|
+
end
|
640
|
+
rescue ::GRPC::BadStatus => e
|
641
|
+
raise ::Google::Cloud::Error.from_error(e)
|
642
|
+
end
|
643
|
+
|
464
644
|
##
|
465
645
|
# Deletes a region definition from your Merchant Center account. Executing
|
466
646
|
# this method requires admin access.
|
@@ -548,6 +728,96 @@ module Google
|
|
548
728
|
raise ::Google::Cloud::Error.from_error(e)
|
549
729
|
end
|
550
730
|
|
731
|
+
##
|
732
|
+
# Deletes multiple regions by name from your Merchant Center account.
|
733
|
+
# Executing this method requires admin access.
|
734
|
+
#
|
735
|
+
# @overload batch_delete_regions(request, options = nil)
|
736
|
+
# Pass arguments to `batch_delete_regions` via a request object, either of type
|
737
|
+
# {::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest} or an equivalent Hash.
|
738
|
+
#
|
739
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Hash]
|
740
|
+
# A request object representing the call parameters. Required. To specify no
|
741
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
742
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
743
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
744
|
+
#
|
745
|
+
# @overload batch_delete_regions(parent: nil, requests: nil)
|
746
|
+
# Pass arguments to `batch_delete_regions` via keyword arguments. Note that at
|
747
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
748
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
749
|
+
#
|
750
|
+
# @param parent [::String]
|
751
|
+
# Required. The account to delete one or more regions from.
|
752
|
+
# Format: `accounts/{account}`
|
753
|
+
# @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash>]
|
754
|
+
# Required. The names of the regions to delete.
|
755
|
+
# A maximum of 100 regions can be deleted in a batch.
|
756
|
+
#
|
757
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
758
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
759
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
760
|
+
#
|
761
|
+
# @return [::Google::Protobuf::Empty]
|
762
|
+
#
|
763
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
764
|
+
#
|
765
|
+
# @example Basic example
|
766
|
+
# require "google/shopping/merchant/accounts/v1"
|
767
|
+
#
|
768
|
+
# # Create a client object. The client can be reused for multiple calls.
|
769
|
+
# client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Client.new
|
770
|
+
#
|
771
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
772
|
+
# request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new
|
773
|
+
#
|
774
|
+
# # Call the batch_delete_regions method.
|
775
|
+
# result = client.batch_delete_regions request
|
776
|
+
#
|
777
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
778
|
+
# p result
|
779
|
+
#
|
780
|
+
def batch_delete_regions request, options = nil
|
781
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
782
|
+
|
783
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest
|
784
|
+
|
785
|
+
# Converts hash and nil to an options object
|
786
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
787
|
+
|
788
|
+
# Customize the options with defaults
|
789
|
+
metadata = @config.rpcs.batch_delete_regions.metadata.to_h
|
790
|
+
|
791
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
792
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
793
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
794
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION
|
795
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
796
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
797
|
+
|
798
|
+
header_params = {}
|
799
|
+
if request.parent
|
800
|
+
header_params["parent"] = request.parent
|
801
|
+
end
|
802
|
+
|
803
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
804
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
805
|
+
|
806
|
+
options.apply_defaults timeout: @config.rpcs.batch_delete_regions.timeout,
|
807
|
+
metadata: metadata,
|
808
|
+
retry_policy: @config.rpcs.batch_delete_regions.retry_policy
|
809
|
+
|
810
|
+
options.apply_defaults timeout: @config.timeout,
|
811
|
+
metadata: @config.metadata,
|
812
|
+
retry_policy: @config.retry_policy
|
813
|
+
|
814
|
+
@regions_service_stub.call_rpc :batch_delete_regions, request, options: options do |response, operation|
|
815
|
+
yield response, operation if block_given?
|
816
|
+
end
|
817
|
+
rescue ::GRPC::BadStatus => e
|
818
|
+
raise ::Google::Cloud::Error.from_error(e)
|
819
|
+
end
|
820
|
+
|
551
821
|
##
|
552
822
|
# Lists the regions in your Merchant Center account.
|
553
823
|
#
|
@@ -828,16 +1098,31 @@ module Google
|
|
828
1098
|
#
|
829
1099
|
attr_reader :create_region
|
830
1100
|
##
|
1101
|
+
# RPC-specific configuration for `batch_create_regions`
|
1102
|
+
# @return [::Gapic::Config::Method]
|
1103
|
+
#
|
1104
|
+
attr_reader :batch_create_regions
|
1105
|
+
##
|
831
1106
|
# RPC-specific configuration for `update_region`
|
832
1107
|
# @return [::Gapic::Config::Method]
|
833
1108
|
#
|
834
1109
|
attr_reader :update_region
|
835
1110
|
##
|
1111
|
+
# RPC-specific configuration for `batch_update_regions`
|
1112
|
+
# @return [::Gapic::Config::Method]
|
1113
|
+
#
|
1114
|
+
attr_reader :batch_update_regions
|
1115
|
+
##
|
836
1116
|
# RPC-specific configuration for `delete_region`
|
837
1117
|
# @return [::Gapic::Config::Method]
|
838
1118
|
#
|
839
1119
|
attr_reader :delete_region
|
840
1120
|
##
|
1121
|
+
# RPC-specific configuration for `batch_delete_regions`
|
1122
|
+
# @return [::Gapic::Config::Method]
|
1123
|
+
#
|
1124
|
+
attr_reader :batch_delete_regions
|
1125
|
+
##
|
841
1126
|
# RPC-specific configuration for `list_regions`
|
842
1127
|
# @return [::Gapic::Config::Method]
|
843
1128
|
#
|
@@ -849,10 +1134,16 @@ module Google
|
|
849
1134
|
@get_region = ::Gapic::Config::Method.new get_region_config
|
850
1135
|
create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region
|
851
1136
|
@create_region = ::Gapic::Config::Method.new create_region_config
|
1137
|
+
batch_create_regions_config = parent_rpcs.batch_create_regions if parent_rpcs.respond_to? :batch_create_regions
|
1138
|
+
@batch_create_regions = ::Gapic::Config::Method.new batch_create_regions_config
|
852
1139
|
update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region
|
853
1140
|
@update_region = ::Gapic::Config::Method.new update_region_config
|
1141
|
+
batch_update_regions_config = parent_rpcs.batch_update_regions if parent_rpcs.respond_to? :batch_update_regions
|
1142
|
+
@batch_update_regions = ::Gapic::Config::Method.new batch_update_regions_config
|
854
1143
|
delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region
|
855
1144
|
@delete_region = ::Gapic::Config::Method.new delete_region_config
|
1145
|
+
batch_delete_regions_config = parent_rpcs.batch_delete_regions if parent_rpcs.respond_to? :batch_delete_regions
|
1146
|
+
@batch_delete_regions = ::Gapic::Config::Method.new batch_delete_regions_config
|
856
1147
|
list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions
|
857
1148
|
@list_regions = ::Gapic::Config::Method.new list_regions_config
|
858
1149
|
|
@@ -350,6 +350,89 @@ module Google
|
|
350
350
|
raise ::Google::Cloud::Error.from_error(e)
|
351
351
|
end
|
352
352
|
|
353
|
+
##
|
354
|
+
# Creates one or more regions in your Merchant Center account.
|
355
|
+
# Executing this method requires admin access.
|
356
|
+
#
|
357
|
+
# @overload batch_create_regions(request, options = nil)
|
358
|
+
# Pass arguments to `batch_create_regions` via a request object, either of type
|
359
|
+
# {::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest} or an equivalent Hash.
|
360
|
+
#
|
361
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Hash]
|
362
|
+
# A request object representing the call parameters. Required. To specify no
|
363
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
364
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
365
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
366
|
+
#
|
367
|
+
# @overload batch_create_regions(parent: nil, requests: nil)
|
368
|
+
# Pass arguments to `batch_create_regions` via keyword arguments. Note that at
|
369
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
370
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
371
|
+
#
|
372
|
+
# @param parent [::String]
|
373
|
+
# Required. The account to create one or more regions for.
|
374
|
+
# Format: `accounts/{account}`
|
375
|
+
# @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Hash>]
|
376
|
+
# Required. The region(s) to create.
|
377
|
+
# The maximum number of regions that can be created in a batch is 100.
|
378
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
379
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse]
|
380
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
381
|
+
#
|
382
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse]
|
383
|
+
#
|
384
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
385
|
+
#
|
386
|
+
# @example Basic example
|
387
|
+
# require "google/shopping/merchant/accounts/v1"
|
388
|
+
#
|
389
|
+
# # Create a client object. The client can be reused for multiple calls.
|
390
|
+
# client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new
|
391
|
+
#
|
392
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
393
|
+
# request = Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest.new
|
394
|
+
#
|
395
|
+
# # Call the batch_create_regions method.
|
396
|
+
# result = client.batch_create_regions request
|
397
|
+
#
|
398
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.
|
399
|
+
# p result
|
400
|
+
#
|
401
|
+
def batch_create_regions request, options = nil
|
402
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
403
|
+
|
404
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest
|
405
|
+
|
406
|
+
# Converts hash and nil to an options object
|
407
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
408
|
+
|
409
|
+
# Customize the options with defaults
|
410
|
+
call_metadata = @config.rpcs.batch_create_regions.metadata.to_h
|
411
|
+
|
412
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
413
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
414
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
415
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
416
|
+
transports_version_send: [:rest]
|
417
|
+
|
418
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
419
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
420
|
+
|
421
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_regions.timeout,
|
422
|
+
metadata: call_metadata,
|
423
|
+
retry_policy: @config.rpcs.batch_create_regions.retry_policy
|
424
|
+
|
425
|
+
options.apply_defaults timeout: @config.timeout,
|
426
|
+
metadata: @config.metadata,
|
427
|
+
retry_policy: @config.retry_policy
|
428
|
+
|
429
|
+
@regions_service_stub.batch_create_regions request, options do |result, operation|
|
430
|
+
yield result, operation if block_given?
|
431
|
+
end
|
432
|
+
rescue ::Gapic::Rest::Error => e
|
433
|
+
raise ::Google::Cloud::Error.from_error(e)
|
434
|
+
end
|
435
|
+
|
353
436
|
##
|
354
437
|
# Updates a region definition in your Merchant Center account.
|
355
438
|
# Executing this method requires admin access.
|
@@ -433,6 +516,89 @@ module Google
|
|
433
516
|
raise ::Google::Cloud::Error.from_error(e)
|
434
517
|
end
|
435
518
|
|
519
|
+
##
|
520
|
+
# Updates one or more regions in your Merchant Center account.
|
521
|
+
# Executing this method requires admin access.
|
522
|
+
#
|
523
|
+
# @overload batch_update_regions(request, options = nil)
|
524
|
+
# Pass arguments to `batch_update_regions` via a request object, either of type
|
525
|
+
# {::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest} or an equivalent Hash.
|
526
|
+
#
|
527
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Hash]
|
528
|
+
# A request object representing the call parameters. Required. To specify no
|
529
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
530
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
531
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
532
|
+
#
|
533
|
+
# @overload batch_update_regions(parent: nil, requests: nil)
|
534
|
+
# Pass arguments to `batch_update_regions` via keyword arguments. Note that at
|
535
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
536
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
537
|
+
#
|
538
|
+
# @param parent [::String]
|
539
|
+
# Required. The account to update one or more regions for.
|
540
|
+
# Format: `accounts/{account}`
|
541
|
+
# @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Hash>]
|
542
|
+
# Required. The region(s) to update.
|
543
|
+
# The maximum number of regions that can be updated in a batch is 100.
|
544
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
545
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse]
|
546
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
547
|
+
#
|
548
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse]
|
549
|
+
#
|
550
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
551
|
+
#
|
552
|
+
# @example Basic example
|
553
|
+
# require "google/shopping/merchant/accounts/v1"
|
554
|
+
#
|
555
|
+
# # Create a client object. The client can be reused for multiple calls.
|
556
|
+
# client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new
|
557
|
+
#
|
558
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
559
|
+
# request = Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest.new
|
560
|
+
#
|
561
|
+
# # Call the batch_update_regions method.
|
562
|
+
# result = client.batch_update_regions request
|
563
|
+
#
|
564
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.
|
565
|
+
# p result
|
566
|
+
#
|
567
|
+
def batch_update_regions request, options = nil
|
568
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
569
|
+
|
570
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest
|
571
|
+
|
572
|
+
# Converts hash and nil to an options object
|
573
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
574
|
+
|
575
|
+
# Customize the options with defaults
|
576
|
+
call_metadata = @config.rpcs.batch_update_regions.metadata.to_h
|
577
|
+
|
578
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
579
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
580
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
581
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
582
|
+
transports_version_send: [:rest]
|
583
|
+
|
584
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
585
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
586
|
+
|
587
|
+
options.apply_defaults timeout: @config.rpcs.batch_update_regions.timeout,
|
588
|
+
metadata: call_metadata,
|
589
|
+
retry_policy: @config.rpcs.batch_update_regions.retry_policy
|
590
|
+
|
591
|
+
options.apply_defaults timeout: @config.timeout,
|
592
|
+
metadata: @config.metadata,
|
593
|
+
retry_policy: @config.retry_policy
|
594
|
+
|
595
|
+
@regions_service_stub.batch_update_regions request, options do |result, operation|
|
596
|
+
yield result, operation if block_given?
|
597
|
+
end
|
598
|
+
rescue ::Gapic::Rest::Error => e
|
599
|
+
raise ::Google::Cloud::Error.from_error(e)
|
600
|
+
end
|
601
|
+
|
436
602
|
##
|
437
603
|
# Deletes a region definition from your Merchant Center account. Executing
|
438
604
|
# this method requires admin access.
|
@@ -513,6 +679,89 @@ module Google
|
|
513
679
|
raise ::Google::Cloud::Error.from_error(e)
|
514
680
|
end
|
515
681
|
|
682
|
+
##
|
683
|
+
# Deletes multiple regions by name from your Merchant Center account.
|
684
|
+
# Executing this method requires admin access.
|
685
|
+
#
|
686
|
+
# @overload batch_delete_regions(request, options = nil)
|
687
|
+
# Pass arguments to `batch_delete_regions` via a request object, either of type
|
688
|
+
# {::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest} or an equivalent Hash.
|
689
|
+
#
|
690
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Hash]
|
691
|
+
# A request object representing the call parameters. Required. To specify no
|
692
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
693
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
694
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
695
|
+
#
|
696
|
+
# @overload batch_delete_regions(parent: nil, requests: nil)
|
697
|
+
# Pass arguments to `batch_delete_regions` via keyword arguments. Note that at
|
698
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
699
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
700
|
+
#
|
701
|
+
# @param parent [::String]
|
702
|
+
# Required. The account to delete one or more regions from.
|
703
|
+
# Format: `accounts/{account}`
|
704
|
+
# @param requests [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Hash>]
|
705
|
+
# Required. The names of the regions to delete.
|
706
|
+
# A maximum of 100 regions can be deleted in a batch.
|
707
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
708
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
709
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
710
|
+
#
|
711
|
+
# @return [::Google::Protobuf::Empty]
|
712
|
+
#
|
713
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
714
|
+
#
|
715
|
+
# @example Basic example
|
716
|
+
# require "google/shopping/merchant/accounts/v1"
|
717
|
+
#
|
718
|
+
# # Create a client object. The client can be reused for multiple calls.
|
719
|
+
# client = Google::Shopping::Merchant::Accounts::V1::RegionsService::Rest::Client.new
|
720
|
+
#
|
721
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
722
|
+
# request = Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest.new
|
723
|
+
#
|
724
|
+
# # Call the batch_delete_regions method.
|
725
|
+
# result = client.batch_delete_regions request
|
726
|
+
#
|
727
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
728
|
+
# p result
|
729
|
+
#
|
730
|
+
def batch_delete_regions request, options = nil
|
731
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
732
|
+
|
733
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest
|
734
|
+
|
735
|
+
# Converts hash and nil to an options object
|
736
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
737
|
+
|
738
|
+
# Customize the options with defaults
|
739
|
+
call_metadata = @config.rpcs.batch_delete_regions.metadata.to_h
|
740
|
+
|
741
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
742
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
743
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
744
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1::VERSION,
|
745
|
+
transports_version_send: [:rest]
|
746
|
+
|
747
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
748
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
749
|
+
|
750
|
+
options.apply_defaults timeout: @config.rpcs.batch_delete_regions.timeout,
|
751
|
+
metadata: call_metadata,
|
752
|
+
retry_policy: @config.rpcs.batch_delete_regions.retry_policy
|
753
|
+
|
754
|
+
options.apply_defaults timeout: @config.timeout,
|
755
|
+
metadata: @config.metadata,
|
756
|
+
retry_policy: @config.retry_policy
|
757
|
+
|
758
|
+
@regions_service_stub.batch_delete_regions request, options do |result, operation|
|
759
|
+
yield result, operation if block_given?
|
760
|
+
end
|
761
|
+
rescue ::Gapic::Rest::Error => e
|
762
|
+
raise ::Google::Cloud::Error.from_error(e)
|
763
|
+
end
|
764
|
+
|
516
765
|
##
|
517
766
|
# Lists the regions in your Merchant Center account.
|
518
767
|
#
|
@@ -766,16 +1015,31 @@ module Google
|
|
766
1015
|
#
|
767
1016
|
attr_reader :create_region
|
768
1017
|
##
|
1018
|
+
# RPC-specific configuration for `batch_create_regions`
|
1019
|
+
# @return [::Gapic::Config::Method]
|
1020
|
+
#
|
1021
|
+
attr_reader :batch_create_regions
|
1022
|
+
##
|
769
1023
|
# RPC-specific configuration for `update_region`
|
770
1024
|
# @return [::Gapic::Config::Method]
|
771
1025
|
#
|
772
1026
|
attr_reader :update_region
|
773
1027
|
##
|
1028
|
+
# RPC-specific configuration for `batch_update_regions`
|
1029
|
+
# @return [::Gapic::Config::Method]
|
1030
|
+
#
|
1031
|
+
attr_reader :batch_update_regions
|
1032
|
+
##
|
774
1033
|
# RPC-specific configuration for `delete_region`
|
775
1034
|
# @return [::Gapic::Config::Method]
|
776
1035
|
#
|
777
1036
|
attr_reader :delete_region
|
778
1037
|
##
|
1038
|
+
# RPC-specific configuration for `batch_delete_regions`
|
1039
|
+
# @return [::Gapic::Config::Method]
|
1040
|
+
#
|
1041
|
+
attr_reader :batch_delete_regions
|
1042
|
+
##
|
779
1043
|
# RPC-specific configuration for `list_regions`
|
780
1044
|
# @return [::Gapic::Config::Method]
|
781
1045
|
#
|
@@ -787,10 +1051,16 @@ module Google
|
|
787
1051
|
@get_region = ::Gapic::Config::Method.new get_region_config
|
788
1052
|
create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region
|
789
1053
|
@create_region = ::Gapic::Config::Method.new create_region_config
|
1054
|
+
batch_create_regions_config = parent_rpcs.batch_create_regions if parent_rpcs.respond_to? :batch_create_regions
|
1055
|
+
@batch_create_regions = ::Gapic::Config::Method.new batch_create_regions_config
|
790
1056
|
update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region
|
791
1057
|
@update_region = ::Gapic::Config::Method.new update_region_config
|
1058
|
+
batch_update_regions_config = parent_rpcs.batch_update_regions if parent_rpcs.respond_to? :batch_update_regions
|
1059
|
+
@batch_update_regions = ::Gapic::Config::Method.new batch_update_regions_config
|
792
1060
|
delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region
|
793
1061
|
@delete_region = ::Gapic::Config::Method.new delete_region_config
|
1062
|
+
batch_delete_regions_config = parent_rpcs.batch_delete_regions if parent_rpcs.respond_to? :batch_delete_regions
|
1063
|
+
@batch_delete_regions = ::Gapic::Config::Method.new batch_delete_regions_config
|
794
1064
|
list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions
|
795
1065
|
@list_regions = ::Gapic::Config::Method.new list_regions_config
|
796
1066
|
|
@@ -154,6 +154,46 @@ module Google
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
+
##
|
158
|
+
# Baseline implementation for the batch_create_regions REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def batch_create_regions request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_regions_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
method_name: "batch_create_regions",
|
187
|
+
options: options
|
188
|
+
)
|
189
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
190
|
+
result = ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse.decode_json response.body, ignore_unknown_fields: true
|
191
|
+
catch :response do
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
157
197
|
##
|
158
198
|
# Baseline implementation for the update_region REST call
|
159
199
|
#
|
@@ -194,6 +234,46 @@ module Google
|
|
194
234
|
end
|
195
235
|
end
|
196
236
|
|
237
|
+
##
|
238
|
+
# Baseline implementation for the batch_update_regions REST call
|
239
|
+
#
|
240
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest]
|
241
|
+
# A request object representing the call parameters. Required.
|
242
|
+
# @param options [::Gapic::CallOptions]
|
243
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
244
|
+
#
|
245
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
246
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse]
|
247
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
248
|
+
#
|
249
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse]
|
250
|
+
# A result object deserialized from the server's reply
|
251
|
+
def batch_update_regions request_pb, options = nil
|
252
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
253
|
+
|
254
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_regions_request request_pb
|
255
|
+
query_string_params = if query_string_params.any?
|
256
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
257
|
+
else
|
258
|
+
{}
|
259
|
+
end
|
260
|
+
|
261
|
+
response = @client_stub.make_http_request(
|
262
|
+
verb,
|
263
|
+
uri: uri,
|
264
|
+
body: body || "",
|
265
|
+
params: query_string_params,
|
266
|
+
method_name: "batch_update_regions",
|
267
|
+
options: options
|
268
|
+
)
|
269
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
270
|
+
result = ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse.decode_json response.body, ignore_unknown_fields: true
|
271
|
+
catch :response do
|
272
|
+
yield result, operation if block_given?
|
273
|
+
result
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
197
277
|
##
|
198
278
|
# Baseline implementation for the delete_region REST call
|
199
279
|
#
|
@@ -234,6 +314,46 @@ module Google
|
|
234
314
|
end
|
235
315
|
end
|
236
316
|
|
317
|
+
##
|
318
|
+
# Baseline implementation for the batch_delete_regions REST call
|
319
|
+
#
|
320
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest]
|
321
|
+
# A request object representing the call parameters. Required.
|
322
|
+
# @param options [::Gapic::CallOptions]
|
323
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
324
|
+
#
|
325
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
326
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
327
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
328
|
+
#
|
329
|
+
# @return [::Google::Protobuf::Empty]
|
330
|
+
# A result object deserialized from the server's reply
|
331
|
+
def batch_delete_regions request_pb, options = nil
|
332
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
333
|
+
|
334
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_regions_request request_pb
|
335
|
+
query_string_params = if query_string_params.any?
|
336
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
337
|
+
else
|
338
|
+
{}
|
339
|
+
end
|
340
|
+
|
341
|
+
response = @client_stub.make_http_request(
|
342
|
+
verb,
|
343
|
+
uri: uri,
|
344
|
+
body: body || "",
|
345
|
+
params: query_string_params,
|
346
|
+
method_name: "batch_delete_regions",
|
347
|
+
options: options
|
348
|
+
)
|
349
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
350
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
351
|
+
catch :response do
|
352
|
+
yield result, operation if block_given?
|
353
|
+
result
|
354
|
+
end
|
355
|
+
end
|
356
|
+
|
237
357
|
##
|
238
358
|
# Baseline implementation for the list_regions REST call
|
239
359
|
#
|
@@ -317,6 +437,28 @@ module Google
|
|
317
437
|
transcoder.transcode request_pb
|
318
438
|
end
|
319
439
|
|
440
|
+
##
|
441
|
+
# @private
|
442
|
+
#
|
443
|
+
# GRPC transcoding helper method for the batch_create_regions REST call
|
444
|
+
#
|
445
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest]
|
446
|
+
# A request object representing the call parameters. Required.
|
447
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
448
|
+
# Uri, Body, Query string parameters
|
449
|
+
def self.transcode_batch_create_regions_request request_pb
|
450
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
451
|
+
.with_bindings(
|
452
|
+
uri_method: :post,
|
453
|
+
uri_template: "/accounts/v1/{parent}/regions:batchCreate",
|
454
|
+
body: "*",
|
455
|
+
matches: [
|
456
|
+
["parent", %r{^accounts/[^/]+/?$}, false]
|
457
|
+
]
|
458
|
+
)
|
459
|
+
transcoder.transcode request_pb
|
460
|
+
end
|
461
|
+
|
320
462
|
##
|
321
463
|
# @private
|
322
464
|
#
|
@@ -339,6 +481,28 @@ module Google
|
|
339
481
|
transcoder.transcode request_pb
|
340
482
|
end
|
341
483
|
|
484
|
+
##
|
485
|
+
# @private
|
486
|
+
#
|
487
|
+
# GRPC transcoding helper method for the batch_update_regions REST call
|
488
|
+
#
|
489
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest]
|
490
|
+
# A request object representing the call parameters. Required.
|
491
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
492
|
+
# Uri, Body, Query string parameters
|
493
|
+
def self.transcode_batch_update_regions_request request_pb
|
494
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
495
|
+
.with_bindings(
|
496
|
+
uri_method: :post,
|
497
|
+
uri_template: "/accounts/v1/{parent}/regions:batchUpdate",
|
498
|
+
body: "*",
|
499
|
+
matches: [
|
500
|
+
["parent", %r{^accounts/[^/]+/?$}, false]
|
501
|
+
]
|
502
|
+
)
|
503
|
+
transcoder.transcode request_pb
|
504
|
+
end
|
505
|
+
|
342
506
|
##
|
343
507
|
# @private
|
344
508
|
#
|
@@ -360,6 +524,28 @@ module Google
|
|
360
524
|
transcoder.transcode request_pb
|
361
525
|
end
|
362
526
|
|
527
|
+
##
|
528
|
+
# @private
|
529
|
+
#
|
530
|
+
# GRPC transcoding helper method for the batch_delete_regions REST call
|
531
|
+
#
|
532
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest]
|
533
|
+
# A request object representing the call parameters. Required.
|
534
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
535
|
+
# Uri, Body, Query string parameters
|
536
|
+
def self.transcode_batch_delete_regions_request request_pb
|
537
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
538
|
+
.with_bindings(
|
539
|
+
uri_method: :post,
|
540
|
+
uri_template: "/accounts/v1/{parent}/regions:batchDelete",
|
541
|
+
body: "*",
|
542
|
+
matches: [
|
543
|
+
["parent", %r{^accounts/[^/]+/?$}, false]
|
544
|
+
]
|
545
|
+
)
|
546
|
+
transcoder.transcode request_pb
|
547
|
+
end
|
548
|
+
|
363
549
|
##
|
364
550
|
# @private
|
365
551
|
#
|
@@ -43,12 +43,21 @@ module Google
|
|
43
43
|
# Creates a region definition in your Merchant Center account. Executing this
|
44
44
|
# method requires admin access.
|
45
45
|
rpc :CreateRegion, ::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region
|
46
|
+
# Creates one or more regions in your Merchant Center account.
|
47
|
+
# Executing this method requires admin access.
|
48
|
+
rpc :BatchCreateRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::BatchCreateRegionsResponse
|
46
49
|
# Updates a region definition in your Merchant Center account.
|
47
50
|
# Executing this method requires admin access.
|
48
51
|
rpc :UpdateRegion, ::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest, ::Google::Shopping::Merchant::Accounts::V1::Region
|
52
|
+
# Updates one or more regions in your Merchant Center account.
|
53
|
+
# Executing this method requires admin access.
|
54
|
+
rpc :BatchUpdateRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::BatchUpdateRegionsResponse
|
49
55
|
# Deletes a region definition from your Merchant Center account. Executing
|
50
56
|
# this method requires admin access.
|
51
57
|
rpc :DeleteRegion, ::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest, ::Google::Protobuf::Empty
|
58
|
+
# Deletes multiple regions by name from your Merchant Center account.
|
59
|
+
# Executing this method requires admin access.
|
60
|
+
rpc :BatchDeleteRegions, ::Google::Shopping::Merchant::Accounts::V1::BatchDeleteRegionsRequest, ::Google::Protobuf::Empty
|
52
61
|
# Lists the regions in your Merchant Center account.
|
53
62
|
rpc :ListRegions, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsRequest, ::Google::Shopping::Merchant::Accounts::V1::ListRegionsResponse
|
54
63
|
end
|
@@ -49,6 +49,29 @@ module Google
|
|
49
49
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
50
50
|
end
|
51
51
|
|
52
|
+
# Request message for the `BatchCreateRegions` method.
|
53
|
+
# @!attribute [rw] parent
|
54
|
+
# @return [::String]
|
55
|
+
# Required. The account to create one or more regions for.
|
56
|
+
# Format: `accounts/{account}`
|
57
|
+
# @!attribute [rw] requests
|
58
|
+
# @return [::Array<::Google::Shopping::Merchant::Accounts::V1::CreateRegionRequest>]
|
59
|
+
# Required. The region(s) to create.
|
60
|
+
# The maximum number of regions that can be created in a batch is 100.
|
61
|
+
class BatchCreateRegionsRequest
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# Response message for the `BatchCreateRegions` method.
|
67
|
+
# @!attribute [rw] regions
|
68
|
+
# @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>]
|
69
|
+
# The created region(s).
|
70
|
+
class BatchCreateRegionsResponse
|
71
|
+
include ::Google::Protobuf::MessageExts
|
72
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
end
|
74
|
+
|
52
75
|
# Request message for the `UpdateRegion` method.
|
53
76
|
# @!attribute [rw] region
|
54
77
|
# @return [::Google::Shopping::Merchant::Accounts::V1::Region]
|
@@ -63,6 +86,29 @@ module Google
|
|
63
86
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
87
|
end
|
65
88
|
|
89
|
+
# Request message for the `BatchUpdateRegions` method.
|
90
|
+
# @!attribute [rw] parent
|
91
|
+
# @return [::String]
|
92
|
+
# Required. The account to update one or more regions for.
|
93
|
+
# Format: `accounts/{account}`
|
94
|
+
# @!attribute [rw] requests
|
95
|
+
# @return [::Array<::Google::Shopping::Merchant::Accounts::V1::UpdateRegionRequest>]
|
96
|
+
# Required. The region(s) to update.
|
97
|
+
# The maximum number of regions that can be updated in a batch is 100.
|
98
|
+
class BatchUpdateRegionsRequest
|
99
|
+
include ::Google::Protobuf::MessageExts
|
100
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
101
|
+
end
|
102
|
+
|
103
|
+
# Response message for the `BatchUpdateRegions` method.
|
104
|
+
# @!attribute [rw] regions
|
105
|
+
# @return [::Array<::Google::Shopping::Merchant::Accounts::V1::Region>]
|
106
|
+
# The updated region(s).
|
107
|
+
class BatchUpdateRegionsResponse
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
end
|
111
|
+
|
66
112
|
# Request message for the `DeleteRegion` method.
|
67
113
|
# @!attribute [rw] name
|
68
114
|
# @return [::String]
|
@@ -73,6 +119,20 @@ module Google
|
|
73
119
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
74
120
|
end
|
75
121
|
|
122
|
+
# Request message for the `BatchDeleteRegions` method.
|
123
|
+
# @!attribute [rw] parent
|
124
|
+
# @return [::String]
|
125
|
+
# Required. The account to delete one or more regions from.
|
126
|
+
# Format: `accounts/{account}`
|
127
|
+
# @!attribute [rw] requests
|
128
|
+
# @return [::Array<::Google::Shopping::Merchant::Accounts::V1::DeleteRegionRequest>]
|
129
|
+
# Required. The names of the regions to delete.
|
130
|
+
# A maximum of 100 regions can be deleted in a batch.
|
131
|
+
class BatchDeleteRegionsRequest
|
132
|
+
include ::Google::Protobuf::MessageExts
|
133
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
134
|
+
end
|
135
|
+
|
76
136
|
# Request message for the `ListRegions` method.
|
77
137
|
# @!attribute [rw] parent
|
78
138
|
# @return [::String]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-shopping-merchant-accounts-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
@@ -15,14 +15,14 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '1.
|
18
|
+
version: '1.1'
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - "~>"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: '1.
|
25
|
+
version: '1.1'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: google-cloud-errors
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|