google-shopping-merchant-accounts 0.3.0 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7877f7e77665f5f7df87201302b722d35bea6a736f9c377d84600be7ada82477
|
4
|
+
data.tar.gz: d5e53710030af3e4e8ec30536307e50a0b483b815464ab1f8999373426809e72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 340e04feb020f85692d4ea11873f00e15b4f0f6ab293a6ac30cc3b3fb3352cc407b0800b1e61b7ab5be5b8d911761eb1d203579275769e0e803e5c29ebfed1fa
|
7
|
+
data.tar.gz: 0c22cd5b0b4757aa05d670a6063e29c432b1bb15e8b4a37fc6d0b95b676eee1e1aeebe907f2a3e14e63570df259f40735b76e054070a3c345fe0a384c8c52929
|
@@ -383,6 +383,78 @@ module Google
|
|
383
383
|
false
|
384
384
|
end
|
385
385
|
|
386
|
+
##
|
387
|
+
# Create a new client object for AutomaticImprovementsService.
|
388
|
+
#
|
389
|
+
# By default, this returns an instance of
|
390
|
+
# [Google::Shopping::Merchant::Accounts::V1beta::AutomaticImprovementsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutomaticImprovementsService/Client)
|
391
|
+
# for a gRPC client for version V1beta of the API.
|
392
|
+
# However, you can specify a different API version by passing it in the
|
393
|
+
# `version` parameter. If the AutomaticImprovementsService service is
|
394
|
+
# supported by that API version, and the corresponding gem is available, the
|
395
|
+
# appropriate versioned client will be returned.
|
396
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
397
|
+
# the `transport` parameter.
|
398
|
+
#
|
399
|
+
# Raises an exception if the currently installed versioned client gem for the
|
400
|
+
# given API version does not support the given transport of the AutomaticImprovementsService service.
|
401
|
+
# You can determine whether the method will succeed by calling
|
402
|
+
# {Google::Shopping::Merchant::Accounts.automatic_improvements_service_available?}.
|
403
|
+
#
|
404
|
+
# ## About AutomaticImprovementsService
|
405
|
+
#
|
406
|
+
# Service to manage the automatic improvements of an account. The automatic
|
407
|
+
# improvements of the account can be used to automatically update products,
|
408
|
+
# improve images and shipping.
|
409
|
+
#
|
410
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
411
|
+
# Defaults to `:v1beta`.
|
412
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
413
|
+
# @return [::Object] A client object for the specified version.
|
414
|
+
#
|
415
|
+
def self.automatic_improvements_service version: :v1beta, transport: :grpc, &block
|
416
|
+
require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
|
417
|
+
|
418
|
+
package_name = Google::Shopping::Merchant::Accounts
|
419
|
+
.constants
|
420
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
421
|
+
.first
|
422
|
+
service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutomaticImprovementsService)
|
423
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
424
|
+
service_module.const_get(:Client).new(&block)
|
425
|
+
end
|
426
|
+
|
427
|
+
##
|
428
|
+
# Determines whether the AutomaticImprovementsService service is supported by the current client.
|
429
|
+
# If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.automatic_improvements_service}.
|
430
|
+
# If false, that method will raise an exception. This could happen if the given
|
431
|
+
# API version does not exist or does not support the AutomaticImprovementsService service,
|
432
|
+
# or if the versioned client gem needs an update to support the AutomaticImprovementsService service.
|
433
|
+
#
|
434
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
435
|
+
# Defaults to `:v1beta`.
|
436
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
437
|
+
# @return [boolean] Whether the service is available.
|
438
|
+
#
|
439
|
+
def self.automatic_improvements_service_available? version: :v1beta, transport: :grpc
|
440
|
+
require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
|
441
|
+
package_name = Google::Shopping::Merchant::Accounts
|
442
|
+
.constants
|
443
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
444
|
+
.first
|
445
|
+
return false unless package_name
|
446
|
+
service_module = Google::Shopping::Merchant::Accounts.const_get package_name
|
447
|
+
return false unless service_module.const_defined? :AutomaticImprovementsService
|
448
|
+
service_module = service_module.const_get :AutomaticImprovementsService
|
449
|
+
if transport == :rest
|
450
|
+
return false unless service_module.const_defined? :Rest
|
451
|
+
service_module = service_module.const_get :Rest
|
452
|
+
end
|
453
|
+
service_module.const_defined? :Client
|
454
|
+
rescue ::LoadError
|
455
|
+
false
|
456
|
+
end
|
457
|
+
|
386
458
|
##
|
387
459
|
# Create a new client object for BusinessIdentityService.
|
388
460
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-shopping-merchant-accounts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-18 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-core
|
@@ -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.
|
89
|
+
rubygems_version: 3.6.5
|
90
90
|
specification_version: 4
|
91
91
|
summary: Programmatically manage your Merchant Center Accounts.
|
92
92
|
test_files: []
|