google-shopping-merchant-accounts-v1beta 0.8.0 → 0.9.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/v1beta/gbp_accounts_service/client.rb +581 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +541 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +584 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +71 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +544 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +59 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +875 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +814 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +391 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +68 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +8 -1
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +285 -4
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +264 -4
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +185 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +1 -1
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +1 -1
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +9 -3
- data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +3 -0
- data/lib/google/shopping/merchant/accounts/v1beta/version.rb +1 -1
- data/lib/google/shopping/merchant/accounts/v1beta.rb +3 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +123 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +108 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +336 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +64 -10
- metadata +31 -1
data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb
CHANGED
@@ -34,7 +34,7 @@ module Google
|
|
34
34
|
# configuration, encompassing return policies for both ads and free listings
|
35
35
|
# ## programs. This API defines the following resource model:
|
36
36
|
#
|
37
|
-
# [OnlineReturnPolicy]
|
37
|
+
# [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy)
|
38
38
|
#
|
39
39
|
class Client
|
40
40
|
# @private
|
@@ -187,7 +187,7 @@ module Google
|
|
187
187
|
# Service calls
|
188
188
|
|
189
189
|
##
|
190
|
-
# Gets an existing return policy for a given
|
190
|
+
# Gets an existing return policy for a given merchant.
|
191
191
|
#
|
192
192
|
# @overload get_online_return_policy(request, options = nil)
|
193
193
|
# Pass arguments to `get_online_return_policy` via a request object, either of type
|
@@ -266,7 +266,7 @@ module Google
|
|
266
266
|
end
|
267
267
|
|
268
268
|
##
|
269
|
-
# Lists all existing return policies for a given
|
269
|
+
# Lists all existing return policies for a given merchant.
|
270
270
|
#
|
271
271
|
# @overload list_online_return_policies(request, options = nil)
|
272
272
|
# Pass arguments to `list_online_return_policies` via a request object, either of type
|
@@ -284,7 +284,7 @@ module Google
|
|
284
284
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
285
285
|
#
|
286
286
|
# @param parent [::String]
|
287
|
-
# Required. The
|
287
|
+
# Required. The merchant account for which to list return policies.
|
288
288
|
# Format: `accounts/{account}`
|
289
289
|
# @param page_size [::Integer]
|
290
290
|
# Optional. The maximum number of `OnlineReturnPolicy` resources to return.
|
@@ -365,6 +365,245 @@ module Google
|
|
365
365
|
raise ::Google::Cloud::Error.from_error(e)
|
366
366
|
end
|
367
367
|
|
368
|
+
##
|
369
|
+
# Creates a new return policy for a given merchant.
|
370
|
+
#
|
371
|
+
# @overload create_online_return_policy(request, options = nil)
|
372
|
+
# Pass arguments to `create_online_return_policy` via a request object, either of type
|
373
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest} or an equivalent Hash.
|
374
|
+
#
|
375
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Hash]
|
376
|
+
# A request object representing the call parameters. Required. To specify no
|
377
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
378
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
379
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
380
|
+
#
|
381
|
+
# @overload create_online_return_policy(parent: nil, online_return_policy: nil)
|
382
|
+
# Pass arguments to `create_online_return_policy` via keyword arguments. Note that at
|
383
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
384
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
385
|
+
#
|
386
|
+
# @param parent [::String]
|
387
|
+
# Required. The merchant account for which to create a return policy.
|
388
|
+
# Format: `accounts/{account}`
|
389
|
+
# @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash]
|
390
|
+
# Required. The return policy to create.
|
391
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
392
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
393
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
394
|
+
#
|
395
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
396
|
+
#
|
397
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
398
|
+
#
|
399
|
+
# @example Basic example
|
400
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
401
|
+
#
|
402
|
+
# # Create a client object. The client can be reused for multiple calls.
|
403
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new
|
404
|
+
#
|
405
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
406
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest.new
|
407
|
+
#
|
408
|
+
# # Call the create_online_return_policy method.
|
409
|
+
# result = client.create_online_return_policy request
|
410
|
+
#
|
411
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.
|
412
|
+
# p result
|
413
|
+
#
|
414
|
+
def create_online_return_policy request, options = nil
|
415
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
416
|
+
|
417
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest
|
418
|
+
|
419
|
+
# Converts hash and nil to an options object
|
420
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
421
|
+
|
422
|
+
# Customize the options with defaults
|
423
|
+
call_metadata = @config.rpcs.create_online_return_policy.metadata.to_h
|
424
|
+
|
425
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
426
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
427
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
428
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
429
|
+
transports_version_send: [:rest]
|
430
|
+
|
431
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
432
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
433
|
+
|
434
|
+
options.apply_defaults timeout: @config.rpcs.create_online_return_policy.timeout,
|
435
|
+
metadata: call_metadata,
|
436
|
+
retry_policy: @config.rpcs.create_online_return_policy.retry_policy
|
437
|
+
|
438
|
+
options.apply_defaults timeout: @config.timeout,
|
439
|
+
metadata: @config.metadata,
|
440
|
+
retry_policy: @config.retry_policy
|
441
|
+
|
442
|
+
@online_return_policy_service_stub.create_online_return_policy request, options do |result, operation|
|
443
|
+
yield result, operation if block_given?
|
444
|
+
end
|
445
|
+
rescue ::Gapic::Rest::Error => e
|
446
|
+
raise ::Google::Cloud::Error.from_error(e)
|
447
|
+
end
|
448
|
+
|
449
|
+
##
|
450
|
+
# Updates an existing return policy for a given merchant.
|
451
|
+
#
|
452
|
+
# @overload update_online_return_policy(request, options = nil)
|
453
|
+
# Pass arguments to `update_online_return_policy` via a request object, either of type
|
454
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest} or an equivalent Hash.
|
455
|
+
#
|
456
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Hash]
|
457
|
+
# A request object representing the call parameters. Required. To specify no
|
458
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
459
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
460
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
461
|
+
#
|
462
|
+
# @overload update_online_return_policy(online_return_policy: nil, update_mask: nil)
|
463
|
+
# Pass arguments to `update_online_return_policy` via keyword arguments. Note that at
|
464
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
465
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
466
|
+
#
|
467
|
+
# @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash]
|
468
|
+
# Required. The return policy to update.
|
469
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
470
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
471
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
472
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
473
|
+
#
|
474
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
475
|
+
#
|
476
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
477
|
+
#
|
478
|
+
# @example Basic example
|
479
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
480
|
+
#
|
481
|
+
# # Create a client object. The client can be reused for multiple calls.
|
482
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new
|
483
|
+
#
|
484
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
485
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new
|
486
|
+
#
|
487
|
+
# # Call the update_online_return_policy method.
|
488
|
+
# result = client.update_online_return_policy request
|
489
|
+
#
|
490
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.
|
491
|
+
# p result
|
492
|
+
#
|
493
|
+
def update_online_return_policy request, options = nil
|
494
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
495
|
+
|
496
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest
|
497
|
+
|
498
|
+
# Converts hash and nil to an options object
|
499
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
500
|
+
|
501
|
+
# Customize the options with defaults
|
502
|
+
call_metadata = @config.rpcs.update_online_return_policy.metadata.to_h
|
503
|
+
|
504
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
505
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
506
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
507
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
508
|
+
transports_version_send: [:rest]
|
509
|
+
|
510
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
511
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
512
|
+
|
513
|
+
options.apply_defaults timeout: @config.rpcs.update_online_return_policy.timeout,
|
514
|
+
metadata: call_metadata,
|
515
|
+
retry_policy: @config.rpcs.update_online_return_policy.retry_policy
|
516
|
+
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata,
|
519
|
+
retry_policy: @config.retry_policy
|
520
|
+
|
521
|
+
@online_return_policy_service_stub.update_online_return_policy request, options do |result, operation|
|
522
|
+
yield result, operation if block_given?
|
523
|
+
end
|
524
|
+
rescue ::Gapic::Rest::Error => e
|
525
|
+
raise ::Google::Cloud::Error.from_error(e)
|
526
|
+
end
|
527
|
+
|
528
|
+
##
|
529
|
+
# Deletes an existing return policy for a given merchant.
|
530
|
+
#
|
531
|
+
# @overload delete_online_return_policy(request, options = nil)
|
532
|
+
# Pass arguments to `delete_online_return_policy` via a request object, either of type
|
533
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash.
|
534
|
+
#
|
535
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash]
|
536
|
+
# A request object representing the call parameters. Required. To specify no
|
537
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
538
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
539
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
540
|
+
#
|
541
|
+
# @overload delete_online_return_policy(name: nil)
|
542
|
+
# Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at
|
543
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
544
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
545
|
+
#
|
546
|
+
# @param name [::String]
|
547
|
+
# Required. The name of the return policy to delete.
|
548
|
+
# Format: `accounts/{account}/onlineReturnPolicies/{return_policy}`
|
549
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
550
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
551
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
552
|
+
#
|
553
|
+
# @return [::Google::Protobuf::Empty]
|
554
|
+
#
|
555
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
556
|
+
#
|
557
|
+
# @example Basic example
|
558
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
559
|
+
#
|
560
|
+
# # Create a client object. The client can be reused for multiple calls.
|
561
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new
|
562
|
+
#
|
563
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
564
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new
|
565
|
+
#
|
566
|
+
# # Call the delete_online_return_policy method.
|
567
|
+
# result = client.delete_online_return_policy request
|
568
|
+
#
|
569
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
570
|
+
# p result
|
571
|
+
#
|
572
|
+
def delete_online_return_policy request, options = nil
|
573
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
574
|
+
|
575
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest
|
576
|
+
|
577
|
+
# Converts hash and nil to an options object
|
578
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
579
|
+
|
580
|
+
# Customize the options with defaults
|
581
|
+
call_metadata = @config.rpcs.delete_online_return_policy.metadata.to_h
|
582
|
+
|
583
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
584
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
585
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
586
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
587
|
+
transports_version_send: [:rest]
|
588
|
+
|
589
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
590
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
591
|
+
|
592
|
+
options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout,
|
593
|
+
metadata: call_metadata,
|
594
|
+
retry_policy: @config.rpcs.delete_online_return_policy.retry_policy
|
595
|
+
|
596
|
+
options.apply_defaults timeout: @config.timeout,
|
597
|
+
metadata: @config.metadata,
|
598
|
+
retry_policy: @config.retry_policy
|
599
|
+
|
600
|
+
@online_return_policy_service_stub.delete_online_return_policy request, options do |result, operation|
|
601
|
+
yield result, operation if block_given?
|
602
|
+
end
|
603
|
+
rescue ::Gapic::Rest::Error => e
|
604
|
+
raise ::Google::Cloud::Error.from_error(e)
|
605
|
+
end
|
606
|
+
|
368
607
|
##
|
369
608
|
# Configuration class for the OnlineReturnPolicyService REST API.
|
370
609
|
#
|
@@ -521,6 +760,21 @@ module Google
|
|
521
760
|
# @return [::Gapic::Config::Method]
|
522
761
|
#
|
523
762
|
attr_reader :list_online_return_policies
|
763
|
+
##
|
764
|
+
# RPC-specific configuration for `create_online_return_policy`
|
765
|
+
# @return [::Gapic::Config::Method]
|
766
|
+
#
|
767
|
+
attr_reader :create_online_return_policy
|
768
|
+
##
|
769
|
+
# RPC-specific configuration for `update_online_return_policy`
|
770
|
+
# @return [::Gapic::Config::Method]
|
771
|
+
#
|
772
|
+
attr_reader :update_online_return_policy
|
773
|
+
##
|
774
|
+
# RPC-specific configuration for `delete_online_return_policy`
|
775
|
+
# @return [::Gapic::Config::Method]
|
776
|
+
#
|
777
|
+
attr_reader :delete_online_return_policy
|
524
778
|
|
525
779
|
# @private
|
526
780
|
def initialize parent_rpcs = nil
|
@@ -528,6 +782,12 @@ module Google
|
|
528
782
|
@get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config
|
529
783
|
list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies
|
530
784
|
@list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config
|
785
|
+
create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy
|
786
|
+
@create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config
|
787
|
+
update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy
|
788
|
+
@update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config
|
789
|
+
delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy
|
790
|
+
@delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config
|
531
791
|
|
532
792
|
yield self if block_given?
|
533
793
|
end
|
data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb
CHANGED
@@ -154,6 +154,126 @@ module Google
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
+
##
|
158
|
+
# Baseline implementation for the create_online_return_policy REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest]
|
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::V1beta::OnlineReturnPolicy]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def create_online_return_policy 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_create_online_return_policy_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: "create_online_return_policy",
|
187
|
+
options: options
|
188
|
+
)
|
189
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
190
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.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
|
+
|
197
|
+
##
|
198
|
+
# Baseline implementation for the update_online_return_policy REST call
|
199
|
+
#
|
200
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest]
|
201
|
+
# A request object representing the call parameters. Required.
|
202
|
+
# @param options [::Gapic::CallOptions]
|
203
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
204
|
+
#
|
205
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
206
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
207
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
208
|
+
#
|
209
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
|
210
|
+
# A result object deserialized from the server's reply
|
211
|
+
def update_online_return_policy request_pb, options = nil
|
212
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
213
|
+
|
214
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_online_return_policy_request request_pb
|
215
|
+
query_string_params = if query_string_params.any?
|
216
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
217
|
+
else
|
218
|
+
{}
|
219
|
+
end
|
220
|
+
|
221
|
+
response = @client_stub.make_http_request(
|
222
|
+
verb,
|
223
|
+
uri: uri,
|
224
|
+
body: body || "",
|
225
|
+
params: query_string_params,
|
226
|
+
method_name: "update_online_return_policy",
|
227
|
+
options: options
|
228
|
+
)
|
229
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
230
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.decode_json response.body, ignore_unknown_fields: true
|
231
|
+
catch :response do
|
232
|
+
yield result, operation if block_given?
|
233
|
+
result
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
##
|
238
|
+
# Baseline implementation for the delete_online_return_policy REST call
|
239
|
+
#
|
240
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest]
|
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::Protobuf::Empty]
|
247
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
248
|
+
#
|
249
|
+
# @return [::Google::Protobuf::Empty]
|
250
|
+
# A result object deserialized from the server's reply
|
251
|
+
def delete_online_return_policy 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_delete_online_return_policy_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: "delete_online_return_policy",
|
267
|
+
options: options
|
268
|
+
)
|
269
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
270
|
+
result = ::Google::Protobuf::Empty.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
|
+
|
157
277
|
##
|
158
278
|
# @private
|
159
279
|
#
|
@@ -195,6 +315,71 @@ module Google
|
|
195
315
|
)
|
196
316
|
transcoder.transcode request_pb
|
197
317
|
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @private
|
321
|
+
#
|
322
|
+
# GRPC transcoding helper method for the create_online_return_policy REST call
|
323
|
+
#
|
324
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest]
|
325
|
+
# A request object representing the call parameters. Required.
|
326
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
327
|
+
# Uri, Body, Query string parameters
|
328
|
+
def self.transcode_create_online_return_policy_request request_pb
|
329
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
330
|
+
.with_bindings(
|
331
|
+
uri_method: :post,
|
332
|
+
uri_template: "/accounts/v1beta/{parent}/onlineReturnPolicies",
|
333
|
+
body: "online_return_policy",
|
334
|
+
matches: [
|
335
|
+
["parent", %r{^accounts/[^/]+/?$}, false]
|
336
|
+
]
|
337
|
+
)
|
338
|
+
transcoder.transcode request_pb
|
339
|
+
end
|
340
|
+
|
341
|
+
##
|
342
|
+
# @private
|
343
|
+
#
|
344
|
+
# GRPC transcoding helper method for the update_online_return_policy REST call
|
345
|
+
#
|
346
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest]
|
347
|
+
# A request object representing the call parameters. Required.
|
348
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
349
|
+
# Uri, Body, Query string parameters
|
350
|
+
def self.transcode_update_online_return_policy_request request_pb
|
351
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
352
|
+
.with_bindings(
|
353
|
+
uri_method: :patch,
|
354
|
+
uri_template: "/accounts/v1beta/{online_return_policy.name}",
|
355
|
+
body: "online_return_policy",
|
356
|
+
matches: [
|
357
|
+
["online_return_policy.name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false]
|
358
|
+
]
|
359
|
+
)
|
360
|
+
transcoder.transcode request_pb
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# @private
|
365
|
+
#
|
366
|
+
# GRPC transcoding helper method for the delete_online_return_policy REST call
|
367
|
+
#
|
368
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest]
|
369
|
+
# A request object representing the call parameters. Required.
|
370
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
371
|
+
# Uri, Body, Query string parameters
|
372
|
+
def self.transcode_delete_online_return_policy_request request_pb
|
373
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
374
|
+
.with_bindings(
|
375
|
+
uri_method: :delete,
|
376
|
+
uri_template: "/accounts/v1beta/{name}",
|
377
|
+
matches: [
|
378
|
+
["name", %r{^accounts/[^/]+/onlineReturnPolicies/[^/]+/?$}, false]
|
379
|
+
]
|
380
|
+
)
|
381
|
+
transcoder.transcode request_pb
|
382
|
+
end
|
198
383
|
end
|
199
384
|
end
|
200
385
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# configuration, encompassing return policies for both ads and free listings
|
37
37
|
# ## programs. This API defines the following resource model:
|
38
38
|
#
|
39
|
-
# [OnlineReturnPolicy]
|
39
|
+
# [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy)
|
40
40
|
#
|
41
41
|
# To load this service and instantiate a REST client:
|
42
42
|
#
|
@@ -37,7 +37,7 @@ module Google
|
|
37
37
|
# configuration, encompassing return policies for both ads and free listings
|
38
38
|
# ## programs. This API defines the following resource model:
|
39
39
|
#
|
40
|
-
# [OnlineReturnPolicy]
|
40
|
+
# [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy)
|
41
41
|
#
|
42
42
|
# @example Load this service and instantiate a gRPC client
|
43
43
|
#
|
@@ -29,7 +29,7 @@ module Google
|
|
29
29
|
# configuration, encompassing return policies for both ads and free listings
|
30
30
|
# ## programs. This API defines the following resource model:
|
31
31
|
#
|
32
|
-
# [OnlineReturnPolicy]
|
32
|
+
# [OnlineReturnPolicy](/merchant/api/reference/rpc/google.shopping.merchant.accounts.v1beta#google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy)
|
33
33
|
class Service
|
34
34
|
|
35
35
|
include ::GRPC::GenericService
|
@@ -38,10 +38,16 @@ module Google
|
|
38
38
|
self.unmarshal_class_method = :decode
|
39
39
|
self.service_name = 'google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService'
|
40
40
|
|
41
|
-
# Gets an existing return policy for a given
|
41
|
+
# Gets an existing return policy for a given merchant.
|
42
42
|
rpc :GetOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::GetOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy
|
43
|
-
# Lists all existing return policies for a given
|
43
|
+
# Lists all existing return policies for a given merchant.
|
44
44
|
rpc :ListOnlineReturnPolicies, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListOnlineReturnPoliciesResponse
|
45
|
+
# Creates a new return policy for a given merchant.
|
46
|
+
rpc :CreateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::CreateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy
|
47
|
+
# Updates an existing return policy for a given merchant.
|
48
|
+
rpc :UpdateOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest, ::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy
|
49
|
+
# Deletes an existing return policy for a given merchant.
|
50
|
+
rpc :DeleteOnlineReturnPolicy, ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Google::Protobuf::Empty
|
45
51
|
end
|
46
52
|
|
47
53
|
Stub = Service.rpc_stub_class
|
@@ -25,7 +25,10 @@ require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service
|
|
25
25
|
require "google/shopping/merchant/accounts/v1beta/business_identity_service/rest"
|
26
26
|
require "google/shopping/merchant/accounts/v1beta/business_info_service/rest"
|
27
27
|
require "google/shopping/merchant/accounts/v1beta/email_preferences_service/rest"
|
28
|
+
require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest"
|
28
29
|
require "google/shopping/merchant/accounts/v1beta/homepage_service/rest"
|
30
|
+
require "google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest"
|
31
|
+
require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest"
|
29
32
|
require "google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest"
|
30
33
|
require "google/shopping/merchant/accounts/v1beta/programs_service/rest"
|
31
34
|
require "google/shopping/merchant/accounts/v1beta/regions_service/rest"
|
@@ -25,7 +25,10 @@ require "google/shopping/merchant/accounts/v1beta/automatic_improvements_service
|
|
25
25
|
require "google/shopping/merchant/accounts/v1beta/business_identity_service"
|
26
26
|
require "google/shopping/merchant/accounts/v1beta/business_info_service"
|
27
27
|
require "google/shopping/merchant/accounts/v1beta/email_preferences_service"
|
28
|
+
require "google/shopping/merchant/accounts/v1beta/gbp_accounts_service"
|
28
29
|
require "google/shopping/merchant/accounts/v1beta/homepage_service"
|
30
|
+
require "google/shopping/merchant/accounts/v1beta/lfp_providers_service"
|
31
|
+
require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service"
|
29
32
|
require "google/shopping/merchant/accounts/v1beta/online_return_policy_service"
|
30
33
|
require "google/shopping/merchant/accounts/v1beta/programs_service"
|
31
34
|
require "google/shopping/merchant/accounts/v1beta/regions_service"
|