google-shopping-css 0.1.0 → 1.1.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: 637d912b8c6d4ff12d1d155d0dbf512a83b4f78fdfc168d5a555af0196908006
4
- data.tar.gz: 6f9080768c075ccbc657651e20d6fa4673f2eb4512cacecde10495dc8255733e
3
+ metadata.gz: '096ee8c48da8fd37ae2de892eaa4c1ec0480a9da9da3a14cb4b5284ddca946dc'
4
+ data.tar.gz: 4d73066eebb1c21f744d95bcdb8df7e74ab661a8392cdd04378d038306286871
5
5
  SHA512:
6
- metadata.gz: 62925a6405acd0a208757ba3859eece3834c6c43a47feab136f2a201f2f0695e999a6703a32f5ebedc57f56a127a9ca47ca26793cc1bfa2a1d1828b53b0219ba
7
- data.tar.gz: 3d60035ffe6a556052e6afb62cc16c7e733d2e0483703a57ab66f5413c48de58ecfe236d772a45e2b7d72a05cb0bca51dabb35163d1e916879af7485fd63af5d
6
+ metadata.gz: 31da0abbfda58d8fffa3f850c5e256a2fe2d6eb594300e6666edcd6241d9fd198fff412ad652b553a472615ea6104fc2079bd21a7c86e88861a8a7453b00411e
7
+ data.tar.gz: 439b9a0aad76a5c7b3a3fd1eb1b7dc9b6b40db4c559c18b325ab2740ff3ee6c88dd3cf732e410be35fa6efccf1085427e33c9e38476c8798a82b6fd9d5528836
data/README.md CHANGED
@@ -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/css.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-css-v1](https://rubydoc.info/gems/google-shopping-css-v1).
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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Shopping
22
22
  module Css
23
- VERSION = "0.1.0"
23
+ VERSION = "1.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -40,6 +40,11 @@ module Google
40
40
  # You can also specify a different transport by passing `:rest` or `:grpc` in
41
41
  # the `transport` parameter.
42
42
  #
43
+ # Raises an exception if the currently installed versioned client gem for the
44
+ # given API version does not support the given transport of the AccountsService service.
45
+ # You can determine whether the method will succeed by calling
46
+ # {Google::Shopping::Css.accounts_service_available?}.
47
+ #
43
48
  # ## About AccountsService
44
49
  #
45
50
  # Service for managing CSS/MC account information.
@@ -61,6 +66,37 @@ module Google
61
66
  service_module.const_get(:Client).new(&block)
62
67
  end
63
68
 
69
+ ##
70
+ # Determines whether the AccountsService service is supported by the current client.
71
+ # If true, you can retrieve a client object by calling {Google::Shopping::Css.accounts_service}.
72
+ # If false, that method will raise an exception. This could happen if the given
73
+ # API version does not exist or does not support the AccountsService service,
74
+ # or if the versioned client gem needs an update to support the AccountsService service.
75
+ #
76
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
77
+ # Defaults to `:v1`.
78
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
79
+ # @return [boolean] Whether the service is available.
80
+ #
81
+ def self.accounts_service_available? version: :v1, transport: :grpc
82
+ require "google/shopping/css/#{version.to_s.downcase}"
83
+ package_name = Google::Shopping::Css
84
+ .constants
85
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
86
+ .first
87
+ return false unless package_name
88
+ service_module = Google::Shopping::Css.const_get package_name
89
+ return false unless service_module.const_defined? :AccountsService
90
+ service_module = service_module.const_get :AccountsService
91
+ if transport == :rest
92
+ return false unless service_module.const_defined? :Rest
93
+ service_module = service_module.const_get :Rest
94
+ end
95
+ service_module.const_defined? :Client
96
+ rescue ::LoadError
97
+ false
98
+ end
99
+
64
100
  ##
65
101
  # Create a new client object for AccountLabelsService.
66
102
  #
@@ -74,6 +110,11 @@ module Google
74
110
  # You can also specify a different transport by passing `:rest` or `:grpc` in
75
111
  # the `transport` parameter.
76
112
  #
113
+ # Raises an exception if the currently installed versioned client gem for the
114
+ # given API version does not support the given transport of the AccountLabelsService service.
115
+ # You can determine whether the method will succeed by calling
116
+ # {Google::Shopping::Css.account_labels_service_available?}.
117
+ #
77
118
  # ## About AccountLabelsService
78
119
  #
79
120
  # Manages Merchant Center and CSS accounts labels.
@@ -95,6 +136,37 @@ module Google
95
136
  service_module.const_get(:Client).new(&block)
96
137
  end
97
138
 
139
+ ##
140
+ # Determines whether the AccountLabelsService service is supported by the current client.
141
+ # If true, you can retrieve a client object by calling {Google::Shopping::Css.account_labels_service}.
142
+ # If false, that method will raise an exception. This could happen if the given
143
+ # API version does not exist or does not support the AccountLabelsService service,
144
+ # or if the versioned client gem needs an update to support the AccountLabelsService service.
145
+ #
146
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
147
+ # Defaults to `:v1`.
148
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
149
+ # @return [boolean] Whether the service is available.
150
+ #
151
+ def self.account_labels_service_available? version: :v1, transport: :grpc
152
+ require "google/shopping/css/#{version.to_s.downcase}"
153
+ package_name = Google::Shopping::Css
154
+ .constants
155
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
156
+ .first
157
+ return false unless package_name
158
+ service_module = Google::Shopping::Css.const_get package_name
159
+ return false unless service_module.const_defined? :AccountLabelsService
160
+ service_module = service_module.const_get :AccountLabelsService
161
+ if transport == :rest
162
+ return false unless service_module.const_defined? :Rest
163
+ service_module = service_module.const_get :Rest
164
+ end
165
+ service_module.const_defined? :Client
166
+ rescue ::LoadError
167
+ false
168
+ end
169
+
98
170
  ##
99
171
  # Create a new client object for CssProductInputsService.
100
172
  #
@@ -108,6 +180,11 @@ module Google
108
180
  # You can also specify a different transport by passing `:rest` or `:grpc` in
109
181
  # the `transport` parameter.
110
182
  #
183
+ # Raises an exception if the currently installed versioned client gem for the
184
+ # given API version does not support the given transport of the CssProductInputsService service.
185
+ # You can determine whether the method will succeed by calling
186
+ # {Google::Shopping::Css.css_product_inputs_service_available?}.
187
+ #
111
188
  # ## About CssProductInputsService
112
189
  #
113
190
  # Service to use CssProductInput resource.
@@ -130,6 +207,37 @@ module Google
130
207
  service_module.const_get(:Client).new(&block)
131
208
  end
132
209
 
210
+ ##
211
+ # Determines whether the CssProductInputsService service is supported by the current client.
212
+ # If true, you can retrieve a client object by calling {Google::Shopping::Css.css_product_inputs_service}.
213
+ # If false, that method will raise an exception. This could happen if the given
214
+ # API version does not exist or does not support the CssProductInputsService service,
215
+ # or if the versioned client gem needs an update to support the CssProductInputsService service.
216
+ #
217
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
218
+ # Defaults to `:v1`.
219
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
220
+ # @return [boolean] Whether the service is available.
221
+ #
222
+ def self.css_product_inputs_service_available? version: :v1, transport: :grpc
223
+ require "google/shopping/css/#{version.to_s.downcase}"
224
+ package_name = Google::Shopping::Css
225
+ .constants
226
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
227
+ .first
228
+ return false unless package_name
229
+ service_module = Google::Shopping::Css.const_get package_name
230
+ return false unless service_module.const_defined? :CssProductInputsService
231
+ service_module = service_module.const_get :CssProductInputsService
232
+ if transport == :rest
233
+ return false unless service_module.const_defined? :Rest
234
+ service_module = service_module.const_get :Rest
235
+ end
236
+ service_module.const_defined? :Client
237
+ rescue ::LoadError
238
+ false
239
+ end
240
+
133
241
  ##
134
242
  # Create a new client object for CssProductsService.
135
243
  #
@@ -143,6 +251,11 @@ module Google
143
251
  # You can also specify a different transport by passing `:rest` or `:grpc` in
144
252
  # the `transport` parameter.
145
253
  #
254
+ # Raises an exception if the currently installed versioned client gem for the
255
+ # given API version does not support the given transport of the CssProductsService service.
256
+ # You can determine whether the method will succeed by calling
257
+ # {Google::Shopping::Css.css_products_service_available?}.
258
+ #
146
259
  # ## About CssProductsService
147
260
  #
148
261
  # Service for doing get and list on Css Products(a.k.a Aggregate Offers
@@ -164,6 +277,37 @@ module Google
164
277
  service_module = service_module.const_get(:Rest) if transport == :rest
165
278
  service_module.const_get(:Client).new(&block)
166
279
  end
280
+
281
+ ##
282
+ # Determines whether the CssProductsService service is supported by the current client.
283
+ # If true, you can retrieve a client object by calling {Google::Shopping::Css.css_products_service}.
284
+ # If false, that method will raise an exception. This could happen if the given
285
+ # API version does not exist or does not support the CssProductsService service,
286
+ # or if the versioned client gem needs an update to support the CssProductsService service.
287
+ #
288
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
289
+ # Defaults to `:v1`.
290
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
291
+ # @return [boolean] Whether the service is available.
292
+ #
293
+ def self.css_products_service_available? version: :v1, transport: :grpc
294
+ require "google/shopping/css/#{version.to_s.downcase}"
295
+ package_name = Google::Shopping::Css
296
+ .constants
297
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
298
+ .first
299
+ return false unless package_name
300
+ service_module = Google::Shopping::Css.const_get package_name
301
+ return false unless service_module.const_defined? :CssProductsService
302
+ service_module = service_module.const_get :CssProductsService
303
+ if transport == :rest
304
+ return false unless service_module.const_defined? :Rest
305
+ service_module = service_module.const_get :Rest
306
+ end
307
+ service_module.const_defined? :Client
308
+ rescue ::LoadError
309
+ false
310
+ end
167
311
  end
168
312
  end
169
313
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-shopping-css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.1.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-12 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
@@ -62,7 +61,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
61
  licenses:
63
62
  - Apache-2.0
64
63
  metadata: {}
65
- post_install_message:
66
64
  rdoc_options: []
67
65
  require_paths:
68
66
  - lib
@@ -70,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
68
  requirements:
71
69
  - - ">="
72
70
  - !ruby/object:Gem::Version
73
- version: '2.7'
71
+ version: '3.0'
74
72
  required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  requirements:
76
74
  - - ">="
77
75
  - !ruby/object:Gem::Version
78
76
  version: '0'
79
77
  requirements: []
80
- rubygems_version: 3.5.6
81
- signing_key:
78
+ rubygems_version: 3.6.2
82
79
  specification_version: 4
83
80
  summary: Programmatically manage your Comparison Shopping Service (CSS) account data
84
81
  at scale.