google-shopping-merchant-accounts 0.5.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: affaa2d20ea7529e6ef8e83978549638b66b18e7d54c92638bfe22dd61899204
4
- data.tar.gz: 897ec2b9f0682c6eaa3cc8ef07adf0aee63697e105b1459a59c71201cb1ac186
3
+ metadata.gz: 16cc5aea6ec9245ed9bca8ad4e06cd3c180097e2595ac05d1857c0a4dd38d540
4
+ data.tar.gz: dee8156f1c24aae2f8191146e5a6575f3585c894231fbe5464a108808c6e8ca5
5
5
  SHA512:
6
- metadata.gz: abf859f5104ec6ef3955c444e16e3bd46acdcc231dffaebc7e881b0d947daed765687efb7577933a3a8c13d3022dfc8adc9694afb23b47dfd3b2ef0e1666b590
7
- data.tar.gz: a93cf1c53f97b66dddc92e276058f73260d5beac34823226e64423207639f06b7aa821238bf12017f3c71a37b2625e0a10e81eee9f7ecf3d2e3579222112f189
6
+ metadata.gz: ce02c8d9876f21b3bd3909f5400889526ab7eebf85e9d9b4513761d7f708d22b47313907061875bfcf6f0869a1d477cfa32d409808f9aaa2f3d48d27092bb6d6
7
+ data.tar.gz: e3ce1f9c1d3bf0a80b665374c2652122731ad4f48ebec1a284af593d28d2cbc6ceddd97b8c95f726a9b008b885fa9628c2aa43f3414337b9d334c63d23b03ac0
@@ -21,7 +21,7 @@ module Google
21
21
  module Shopping
22
22
  module Merchant
23
23
  module Accounts
24
- VERSION = "0.5.0"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -596,6 +596,77 @@ module Google
596
596
  false
597
597
  end
598
598
 
599
+ ##
600
+ # Create a new client object for CheckoutSettingsService.
601
+ #
602
+ # By default, this returns an instance of
603
+ # [Google::Shopping::Merchant::Accounts::V1beta::CheckoutSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/CheckoutSettingsService/Client)
604
+ # for a gRPC client for version V1beta of the API.
605
+ # However, you can specify a different API version by passing it in the
606
+ # `version` parameter. If the CheckoutSettingsService service is
607
+ # supported by that API version, and the corresponding gem is available, the
608
+ # appropriate versioned client will be returned.
609
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
610
+ # the `transport` parameter.
611
+ #
612
+ # Raises an exception if the currently installed versioned client gem for the
613
+ # given API version does not support the given transport of the CheckoutSettingsService service.
614
+ # You can determine whether the method will succeed by calling
615
+ # {Google::Shopping::Merchant::Accounts.checkout_settings_service_available?}.
616
+ #
617
+ # ## About CheckoutSettingsService
618
+ #
619
+ # Service for supporting [checkout
620
+ # settings](https://support.google.com/merchants/answer/13945960).
621
+ #
622
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
623
+ # Defaults to `:v1beta`.
624
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
625
+ # @return [::Object] A client object for the specified version.
626
+ #
627
+ def self.checkout_settings_service version: :v1beta, transport: :grpc, &block
628
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
629
+
630
+ package_name = Google::Shopping::Merchant::Accounts
631
+ .constants
632
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
633
+ .first
634
+ service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:CheckoutSettingsService)
635
+ service_module = service_module.const_get(:Rest) if transport == :rest
636
+ service_module.const_get(:Client).new(&block)
637
+ end
638
+
639
+ ##
640
+ # Determines whether the CheckoutSettingsService service is supported by the current client.
641
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.checkout_settings_service}.
642
+ # If false, that method will raise an exception. This could happen if the given
643
+ # API version does not exist or does not support the CheckoutSettingsService service,
644
+ # or if the versioned client gem needs an update to support the CheckoutSettingsService service.
645
+ #
646
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
647
+ # Defaults to `:v1beta`.
648
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
649
+ # @return [boolean] Whether the service is available.
650
+ #
651
+ def self.checkout_settings_service_available? version: :v1beta, transport: :grpc
652
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
653
+ package_name = Google::Shopping::Merchant::Accounts
654
+ .constants
655
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
656
+ .first
657
+ return false unless package_name
658
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
659
+ return false unless service_module.const_defined? :CheckoutSettingsService
660
+ service_module = service_module.const_get :CheckoutSettingsService
661
+ if transport == :rest
662
+ return false unless service_module.const_defined? :Rest
663
+ service_module = service_module.const_get :Rest
664
+ end
665
+ service_module.const_defined? :Client
666
+ rescue ::LoadError
667
+ false
668
+ end
669
+
599
670
  ##
600
671
  # Create a new client object for EmailPreferencesService.
601
672
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-shopping-merchant-accounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.6.8
89
+ rubygems_version: 3.6.9
90
90
  specification_version: 4
91
91
  summary: Programmatically manage your Merchant Center Accounts.
92
92
  test_files: []