google-shopping-merchant-products 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5eebf61b56e3db71a5da032668016696c4fbfbca6acfa6bcb1f72790251e9fc
4
- data.tar.gz: 1dd5d03de6c6377dfd497749e69ddce7cc5590cb76578327d36b11f61e51f020
3
+ metadata.gz: 23f03e4ec1e03516cfec34200541afb94191002b6480b6c438747712e3f04597
4
+ data.tar.gz: cb67861cb387aa861ecde6aaf4c976f454898744885c3ce69f90e3440de0d297
5
5
  SHA512:
6
- metadata.gz: a0ceb075c269d8430520af60a0e23b5b6ae01ccb9805e02ed0d0535d33c41846a106851174bd32122344fd287d620c673be777fa34b2b07e8e47f81acde6f5c8
7
- data.tar.gz: 8ad7fdab9da5fcc60ba15fb3c9f75368ef3dfe87ea043073be9255b2c68f8dec7a5ea98dce519ef0fb5a9fc24625bdc0226033e166fb76d8b014e255ad7d70d7
6
+ metadata.gz: 852901b971f1815ce5b416849401567a8107dca7f183601d6124f899c60ecb46c0470d4d5d9c04fd0a11b0b922fe56160014e3c97b551cf3fcd7f45b75469f59
7
+ data.tar.gz: 0b8ea52d2097733b1418298c81559f3b3120d335d75a236c5fe0351d436bd8b7b9e5f80e3e33f8281c02557b3b79c08f0dec6c8fc6d20a567b7451a015c523d2
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby Client for the Merchant API
2
2
 
3
- Programmatically manage your Merchant Center accounts.
3
+ Programmatically manage your Merchant Center Accounts.
4
4
 
5
- Programmatically manage your Merchant Center accounts.
5
+ Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.
6
6
 
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-shopping-merchant-products-v*`.
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-shopping-merchant-products-v1beta](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Shopping
22
22
  module Merchant
23
23
  module Products
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -41,6 +41,11 @@ module Google
41
41
  # You can also specify a different transport by passing `:rest` or `:grpc` in
42
42
  # the `transport` parameter.
43
43
  #
44
+ # Raises an exception if the currently installed versioned client gem for the
45
+ # given API version does not support the given transport of the ProductInputsService service.
46
+ # You can determine whether the method will succeed by calling
47
+ # {Google::Shopping::Merchant::Products.product_inputs_service_available?}.
48
+ #
44
49
  # ## About ProductInputsService
45
50
  #
46
51
  # Service to use ProductInput resource.
@@ -63,6 +68,37 @@ module Google
63
68
  service_module.const_get(:Client).new(&block)
64
69
  end
65
70
 
71
+ ##
72
+ # Determines whether the ProductInputsService service is supported by the current client.
73
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Products.product_inputs_service}.
74
+ # If false, that method will raise an exception. This could happen if the given
75
+ # API version does not exist or does not support the ProductInputsService service,
76
+ # or if the versioned client gem needs an update to support the ProductInputsService service.
77
+ #
78
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
79
+ # Defaults to `:v1beta`.
80
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
81
+ # @return [boolean] Whether the service is available.
82
+ #
83
+ def self.product_inputs_service_available? version: :v1beta, transport: :grpc
84
+ require "google/shopping/merchant/products/#{version.to_s.downcase}"
85
+ package_name = Google::Shopping::Merchant::Products
86
+ .constants
87
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
88
+ .first
89
+ return false unless package_name
90
+ service_module = Google::Shopping::Merchant::Products.const_get package_name
91
+ return false unless service_module.const_defined? :ProductInputsService
92
+ service_module = service_module.const_get :ProductInputsService
93
+ if transport == :rest
94
+ return false unless service_module.const_defined? :Rest
95
+ service_module = service_module.const_get :Rest
96
+ end
97
+ service_module.const_defined? :Client
98
+ rescue ::LoadError
99
+ false
100
+ end
101
+
66
102
  ##
67
103
  # Create a new client object for ProductsService.
68
104
  #
@@ -76,6 +112,11 @@ module Google
76
112
  # You can also specify a different transport by passing `:rest` or `:grpc` in
77
113
  # the `transport` parameter.
78
114
  #
115
+ # Raises an exception if the currently installed versioned client gem for the
116
+ # given API version does not support the given transport of the ProductsService service.
117
+ # You can determine whether the method will succeed by calling
118
+ # {Google::Shopping::Merchant::Products.products_service_available?}.
119
+ #
79
120
  # ## About ProductsService
80
121
  #
81
122
  # Service to use Product resource.
@@ -97,6 +138,37 @@ module Google
97
138
  service_module = service_module.const_get(:Rest) if transport == :rest
98
139
  service_module.const_get(:Client).new(&block)
99
140
  end
141
+
142
+ ##
143
+ # Determines whether the ProductsService service is supported by the current client.
144
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Products.products_service}.
145
+ # If false, that method will raise an exception. This could happen if the given
146
+ # API version does not exist or does not support the ProductsService service,
147
+ # or if the versioned client gem needs an update to support the ProductsService service.
148
+ #
149
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
150
+ # Defaults to `:v1beta`.
151
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
152
+ # @return [boolean] Whether the service is available.
153
+ #
154
+ def self.products_service_available? version: :v1beta, transport: :grpc
155
+ require "google/shopping/merchant/products/#{version.to_s.downcase}"
156
+ package_name = Google::Shopping::Merchant::Products
157
+ .constants
158
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
159
+ .first
160
+ return false unless package_name
161
+ service_module = Google::Shopping::Merchant::Products.const_get package_name
162
+ return false unless service_module.const_defined? :ProductsService
163
+ service_module = service_module.const_get :ProductsService
164
+ if transport == :rest
165
+ return false unless service_module.const_defined? :Rest
166
+ service_module = service_module.const_get :Rest
167
+ end
168
+ service_module.const_defined? :Client
169
+ rescue ::LoadError
170
+ false
171
+ end
100
172
  end
101
173
  end
102
174
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-shopping-merchant-products
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-06 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -44,7 +43,19 @@ dependencies:
44
43
  - - "<"
45
44
  - !ruby/object:Gem::Version
46
45
  version: 2.a
47
- description: Programmatically manage your Merchant Center accounts.
46
+ description: 'Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables
47
+ you to programmatically manage your accounts. Conversions Sub-API: Enables you to
48
+ programmatically manage your conversion sources for a merchant account. Datasources
49
+ Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API:
50
+ This bundle enables you to programmatically manage your local and regional inventories.
51
+ Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local
52
+ inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically
53
+ manage your notification subscriptions. Products Sub-API: This bundle enables you
54
+ to programmatically manage your products. Promotions Sub-API: This bundle enables
55
+ you to programmatically manage your promotions for products. Quota Sub-API: This
56
+ bundle enables you to list your quotas for all APIs you are using. Reports Sub-API:
57
+ This bundle enables you to programmatically retrieve reports and insights about
58
+ products, their performance and their competitive environment.'
48
59
  email: googleapis-packages@google.com
49
60
  executables: []
50
61
  extensions: []
@@ -61,7 +72,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
61
72
  licenses:
62
73
  - Apache-2.0
63
74
  metadata: {}
64
- post_install_message:
65
75
  rdoc_options: []
66
76
  require_paths:
67
77
  - lib
@@ -69,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
79
  requirements:
70
80
  - - ">="
71
81
  - !ruby/object:Gem::Version
72
- version: '2.7'
82
+ version: '3.0'
73
83
  required_rubygems_version: !ruby/object:Gem::Requirement
74
84
  requirements:
75
85
  - - ">="
76
86
  - !ruby/object:Gem::Version
77
87
  version: '0'
78
88
  requirements: []
79
- rubygems_version: 3.5.6
80
- signing_key:
89
+ rubygems_version: 3.6.2
81
90
  specification_version: 4
82
- summary: Programmatically manage your Merchant Center accounts.
91
+ summary: Programmatically manage your Merchant Center Accounts.
83
92
  test_files: []