google-shopping-merchant-accounts-v1beta 0.8.0 → 0.10.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +581 -0
  3. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +49 -0
  4. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +49 -0
  5. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +541 -0
  6. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +206 -0
  7. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +57 -0
  8. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +60 -0
  9. data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +56 -0
  10. data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +52 -0
  11. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +584 -0
  12. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +49 -0
  13. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +71 -0
  14. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +544 -0
  15. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +206 -0
  16. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +56 -0
  17. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +59 -0
  18. data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +55 -0
  19. data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +51 -0
  20. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +875 -0
  21. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +49 -0
  22. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +66 -0
  23. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +814 -0
  24. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +391 -0
  25. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +57 -0
  26. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +60 -0
  27. data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +68 -0
  28. data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb +58 -0
  29. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +8 -1
  30. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +301 -4
  31. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +280 -4
  32. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +185 -0
  33. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +1 -1
  34. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +1 -1
  35. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +9 -3
  36. data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +3 -0
  37. data/lib/google/shopping/merchant/accounts/v1beta/version.rb +1 -1
  38. data/lib/google/shopping/merchant/accounts/v1beta.rb +3 -0
  39. data/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +123 -0
  40. data/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +108 -0
  41. data/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +336 -0
  42. data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +88 -16
  43. metadata +32 -2
@@ -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][google.shopping.merchant.accounts.v1.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 business.
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 business.
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 business account for which to list return policies.
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,261 @@ 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 the return policy will be created.
388
+ # Format: `accounts/{account}`
389
+ # @param online_return_policy [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy, ::Hash]
390
+ # Required. The return policy object 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 online return policy to update.
469
+ # The online return policy's `name` field is used to identify the
470
+ # online return policy to be updated.
471
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
472
+ # Optional. List of fields being updated.
473
+ #
474
+ # The following fields are supported (in both `snake_case` and
475
+ # `lowerCamelCase`):
476
+ #
477
+ # - `accept_defective_only`
478
+ # - `accept_exchange`
479
+ # - `item_conditions`
480
+ # - `policy`
481
+ # - `process_refund_days`
482
+ # - `restocking_fee`
483
+ # - `return_methods`
484
+ # - `return_policy_uri`
485
+ # - `return_shipping_fee`
486
+ # @yield [result, operation] Access the result along with the TransportOperation object
487
+ # @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
488
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
489
+ #
490
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy]
491
+ #
492
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
493
+ #
494
+ # @example Basic example
495
+ # require "google/shopping/merchant/accounts/v1beta"
496
+ #
497
+ # # Create a client object. The client can be reused for multiple calls.
498
+ # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new
499
+ #
500
+ # # Create a request. To set request fields, pass in keyword arguments.
501
+ # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest.new
502
+ #
503
+ # # Call the update_online_return_policy method.
504
+ # result = client.update_online_return_policy request
505
+ #
506
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicy.
507
+ # p result
508
+ #
509
+ def update_online_return_policy request, options = nil
510
+ raise ::ArgumentError, "request must be provided" if request.nil?
511
+
512
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOnlineReturnPolicyRequest
513
+
514
+ # Converts hash and nil to an options object
515
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
516
+
517
+ # Customize the options with defaults
518
+ call_metadata = @config.rpcs.update_online_return_policy.metadata.to_h
519
+
520
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
521
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
522
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
523
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
524
+ transports_version_send: [:rest]
525
+
526
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
527
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
528
+
529
+ options.apply_defaults timeout: @config.rpcs.update_online_return_policy.timeout,
530
+ metadata: call_metadata,
531
+ retry_policy: @config.rpcs.update_online_return_policy.retry_policy
532
+
533
+ options.apply_defaults timeout: @config.timeout,
534
+ metadata: @config.metadata,
535
+ retry_policy: @config.retry_policy
536
+
537
+ @online_return_policy_service_stub.update_online_return_policy request, options do |result, operation|
538
+ yield result, operation if block_given?
539
+ end
540
+ rescue ::Gapic::Rest::Error => e
541
+ raise ::Google::Cloud::Error.from_error(e)
542
+ end
543
+
544
+ ##
545
+ # Deletes an existing return policy.
546
+ #
547
+ # @overload delete_online_return_policy(request, options = nil)
548
+ # Pass arguments to `delete_online_return_policy` via a request object, either of type
549
+ # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest} or an equivalent Hash.
550
+ #
551
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest, ::Hash]
552
+ # A request object representing the call parameters. Required. To specify no
553
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
554
+ # @param options [::Gapic::CallOptions, ::Hash]
555
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
556
+ #
557
+ # @overload delete_online_return_policy(name: nil)
558
+ # Pass arguments to `delete_online_return_policy` via keyword arguments. Note that at
559
+ # least one keyword argument is required. To specify no parameters, or to keep all
560
+ # the default parameter values, pass an empty Hash as a request object (see above).
561
+ #
562
+ # @param name [::String]
563
+ # Required. The name of the return policy to delete.
564
+ # Format: `accounts/{account}/onlineReturnPolicies/{return_policy}`
565
+ # @yield [result, operation] Access the result along with the TransportOperation object
566
+ # @yieldparam result [::Google::Protobuf::Empty]
567
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
568
+ #
569
+ # @return [::Google::Protobuf::Empty]
570
+ #
571
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
572
+ #
573
+ # @example Basic example
574
+ # require "google/shopping/merchant/accounts/v1beta"
575
+ #
576
+ # # Create a client object. The client can be reused for multiple calls.
577
+ # client = Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client.new
578
+ #
579
+ # # Create a request. To set request fields, pass in keyword arguments.
580
+ # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest.new
581
+ #
582
+ # # Call the delete_online_return_policy method.
583
+ # result = client.delete_online_return_policy request
584
+ #
585
+ # # The returned object is of type Google::Protobuf::Empty.
586
+ # p result
587
+ #
588
+ def delete_online_return_policy request, options = nil
589
+ raise ::ArgumentError, "request must be provided" if request.nil?
590
+
591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteOnlineReturnPolicyRequest
592
+
593
+ # Converts hash and nil to an options object
594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
595
+
596
+ # Customize the options with defaults
597
+ call_metadata = @config.rpcs.delete_online_return_policy.metadata.to_h
598
+
599
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
600
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
601
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
602
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
603
+ transports_version_send: [:rest]
604
+
605
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
606
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ options.apply_defaults timeout: @config.rpcs.delete_online_return_policy.timeout,
609
+ metadata: call_metadata,
610
+ retry_policy: @config.rpcs.delete_online_return_policy.retry_policy
611
+
612
+ options.apply_defaults timeout: @config.timeout,
613
+ metadata: @config.metadata,
614
+ retry_policy: @config.retry_policy
615
+
616
+ @online_return_policy_service_stub.delete_online_return_policy request, options do |result, operation|
617
+ yield result, operation if block_given?
618
+ end
619
+ rescue ::Gapic::Rest::Error => e
620
+ raise ::Google::Cloud::Error.from_error(e)
621
+ end
622
+
368
623
  ##
369
624
  # Configuration class for the OnlineReturnPolicyService REST API.
370
625
  #
@@ -521,6 +776,21 @@ module Google
521
776
  # @return [::Gapic::Config::Method]
522
777
  #
523
778
  attr_reader :list_online_return_policies
779
+ ##
780
+ # RPC-specific configuration for `create_online_return_policy`
781
+ # @return [::Gapic::Config::Method]
782
+ #
783
+ attr_reader :create_online_return_policy
784
+ ##
785
+ # RPC-specific configuration for `update_online_return_policy`
786
+ # @return [::Gapic::Config::Method]
787
+ #
788
+ attr_reader :update_online_return_policy
789
+ ##
790
+ # RPC-specific configuration for `delete_online_return_policy`
791
+ # @return [::Gapic::Config::Method]
792
+ #
793
+ attr_reader :delete_online_return_policy
524
794
 
525
795
  # @private
526
796
  def initialize parent_rpcs = nil
@@ -528,6 +798,12 @@ module Google
528
798
  @get_online_return_policy = ::Gapic::Config::Method.new get_online_return_policy_config
529
799
  list_online_return_policies_config = parent_rpcs.list_online_return_policies if parent_rpcs.respond_to? :list_online_return_policies
530
800
  @list_online_return_policies = ::Gapic::Config::Method.new list_online_return_policies_config
801
+ create_online_return_policy_config = parent_rpcs.create_online_return_policy if parent_rpcs.respond_to? :create_online_return_policy
802
+ @create_online_return_policy = ::Gapic::Config::Method.new create_online_return_policy_config
803
+ update_online_return_policy_config = parent_rpcs.update_online_return_policy if parent_rpcs.respond_to? :update_online_return_policy
804
+ @update_online_return_policy = ::Gapic::Config::Method.new update_online_return_policy_config
805
+ delete_online_return_policy_config = parent_rpcs.delete_online_return_policy if parent_rpcs.respond_to? :delete_online_return_policy
806
+ @delete_online_return_policy = ::Gapic::Config::Method.new delete_online_return_policy_config
531
807
 
532
808
  yield self if block_given?
533
809
  end
@@ -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][google.shopping.merchant.accounts.v1.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][google.shopping.merchant.accounts.v1.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][google.shopping.merchant.accounts.v1.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 business.
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 business.
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.
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"
@@ -22,7 +22,7 @@ module Google
22
22
  module Merchant
23
23
  module Accounts
24
24
  module V1beta
25
- VERSION = "0.8.0"
25
+ VERSION = "0.10.0"
26
26
  end
27
27
  end
28
28
  end
@@ -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"