google-shopping-merchant-accounts 0.2.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: dad646f7c9e0010cbfca48f41495ac5e77e646b3da56766c224b19d972428688
4
- data.tar.gz: 9210c031b0a38e07d763a55a587d658008c6fe38d80db2af216f877637b14631
3
+ metadata.gz: 7877f7e77665f5f7df87201302b722d35bea6a736f9c377d84600be7ada82477
4
+ data.tar.gz: d5e53710030af3e4e8ec30536307e50a0b483b815464ab1f8999373426809e72
5
5
  SHA512:
6
- metadata.gz: 8fd0aea4ddebc43d102828fc8b280e17d23ed3c08113c4491b4bfc29601659230763bf12f563328c9a893963343fcdb7ac9b264086029496f0834b57dd8352c4
7
- data.tar.gz: 3f173a3da96febc399782430210576cce3cf319c8601be6404b631524a2ffe8cf0f2e24e89b568386c62392281f230cdaf5ab253936fab7d3ecf69124c816c71
6
+ metadata.gz: 340e04feb020f85692d4ea11873f00e15b4f0f6ab293a6ac30cc3b3fb3352cc407b0800b1e61b7ab5be5b8d911761eb1d203579275769e0e803e5c29ebfed1fa
7
+ data.tar.gz: 0c22cd5b0b4757aa05d670a6063e29c432b1bb15e8b4a37fc6d0b95b676eee1e1aeebe907f2a3e14e63570df259f40735b76e054070a3c345fe0a384c8c52929
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/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-accounts-v1beta](https://rubydoc.info/gems/google-shopping-merchant-accounts-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 Accounts
24
- VERSION = "0.2.0"
24
+ VERSION = "0.4.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 AccountTaxService service.
46
+ # You can determine whether the method will succeed by calling
47
+ # {Google::Shopping::Merchant::Accounts.account_tax_service_available?}.
48
+ #
44
49
  # ## About AccountTaxService
45
50
  #
46
51
  # Manages account level tax setting data.
@@ -66,6 +71,37 @@ module Google
66
71
  service_module.const_get(:Client).new(&block)
67
72
  end
68
73
 
74
+ ##
75
+ # Determines whether the AccountTaxService service is supported by the current client.
76
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.account_tax_service}.
77
+ # If false, that method will raise an exception. This could happen if the given
78
+ # API version does not exist or does not support the AccountTaxService service,
79
+ # or if the versioned client gem needs an update to support the AccountTaxService service.
80
+ #
81
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
82
+ # Defaults to `:v1beta`.
83
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
84
+ # @return [boolean] Whether the service is available.
85
+ #
86
+ def self.account_tax_service_available? version: :v1beta, transport: :grpc
87
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
88
+ package_name = Google::Shopping::Merchant::Accounts
89
+ .constants
90
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
91
+ .first
92
+ return false unless package_name
93
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
94
+ return false unless service_module.const_defined? :AccountTaxService
95
+ service_module = service_module.const_get :AccountTaxService
96
+ if transport == :rest
97
+ return false unless service_module.const_defined? :Rest
98
+ service_module = service_module.const_get :Rest
99
+ end
100
+ service_module.const_defined? :Client
101
+ rescue ::LoadError
102
+ false
103
+ end
104
+
69
105
  ##
70
106
  # Create a new client object for AccountIssueService.
71
107
  #
@@ -79,6 +115,11 @@ module Google
79
115
  # You can also specify a different transport by passing `:rest` or `:grpc` in
80
116
  # the `transport` parameter.
81
117
  #
118
+ # Raises an exception if the currently installed versioned client gem for the
119
+ # given API version does not support the given transport of the AccountIssueService service.
120
+ # You can determine whether the method will succeed by calling
121
+ # {Google::Shopping::Merchant::Accounts.account_issue_service_available?}.
122
+ #
82
123
  # ## About AccountIssueService
83
124
  #
84
125
  # Service to support `AccountIssueService` API.
@@ -100,6 +141,37 @@ module Google
100
141
  service_module.const_get(:Client).new(&block)
101
142
  end
102
143
 
144
+ ##
145
+ # Determines whether the AccountIssueService service is supported by the current client.
146
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.account_issue_service}.
147
+ # If false, that method will raise an exception. This could happen if the given
148
+ # API version does not exist or does not support the AccountIssueService service,
149
+ # or if the versioned client gem needs an update to support the AccountIssueService service.
150
+ #
151
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
152
+ # Defaults to `:v1beta`.
153
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
154
+ # @return [boolean] Whether the service is available.
155
+ #
156
+ def self.account_issue_service_available? version: :v1beta, transport: :grpc
157
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
158
+ package_name = Google::Shopping::Merchant::Accounts
159
+ .constants
160
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
161
+ .first
162
+ return false unless package_name
163
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
164
+ return false unless service_module.const_defined? :AccountIssueService
165
+ service_module = service_module.const_get :AccountIssueService
166
+ if transport == :rest
167
+ return false unless service_module.const_defined? :Rest
168
+ service_module = service_module.const_get :Rest
169
+ end
170
+ service_module.const_defined? :Client
171
+ rescue ::LoadError
172
+ false
173
+ end
174
+
103
175
  ##
104
176
  # Create a new client object for UserService.
105
177
  #
@@ -113,6 +185,11 @@ module Google
113
185
  # You can also specify a different transport by passing `:rest` or `:grpc` in
114
186
  # the `transport` parameter.
115
187
  #
188
+ # Raises an exception if the currently installed versioned client gem for the
189
+ # given API version does not support the given transport of the UserService service.
190
+ # You can determine whether the method will succeed by calling
191
+ # {Google::Shopping::Merchant::Accounts.user_service_available?}.
192
+ #
116
193
  # ## About UserService
117
194
  #
118
195
  # Service to support user API.
@@ -134,6 +211,37 @@ module Google
134
211
  service_module.const_get(:Client).new(&block)
135
212
  end
136
213
 
214
+ ##
215
+ # Determines whether the UserService service is supported by the current client.
216
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.user_service}.
217
+ # If false, that method will raise an exception. This could happen if the given
218
+ # API version does not exist or does not support the UserService service,
219
+ # or if the versioned client gem needs an update to support the UserService service.
220
+ #
221
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
222
+ # Defaults to `:v1beta`.
223
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
224
+ # @return [boolean] Whether the service is available.
225
+ #
226
+ def self.user_service_available? version: :v1beta, transport: :grpc
227
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
228
+ package_name = Google::Shopping::Merchant::Accounts
229
+ .constants
230
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
231
+ .first
232
+ return false unless package_name
233
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
234
+ return false unless service_module.const_defined? :UserService
235
+ service_module = service_module.const_get :UserService
236
+ if transport == :rest
237
+ return false unless service_module.const_defined? :Rest
238
+ service_module = service_module.const_get :Rest
239
+ end
240
+ service_module.const_defined? :Client
241
+ rescue ::LoadError
242
+ false
243
+ end
244
+
137
245
  ##
138
246
  # Create a new client object for AccountsService.
139
247
  #
@@ -147,6 +255,11 @@ module Google
147
255
  # You can also specify a different transport by passing `:rest` or `:grpc` in
148
256
  # the `transport` parameter.
149
257
  #
258
+ # Raises an exception if the currently installed versioned client gem for the
259
+ # given API version does not support the given transport of the AccountsService service.
260
+ # You can determine whether the method will succeed by calling
261
+ # {Google::Shopping::Merchant::Accounts.accounts_service_available?}.
262
+ #
150
263
  # ## About AccountsService
151
264
  #
152
265
  # Service to support Accounts API.
@@ -168,6 +281,37 @@ module Google
168
281
  service_module.const_get(:Client).new(&block)
169
282
  end
170
283
 
284
+ ##
285
+ # Determines whether the AccountsService service is supported by the current client.
286
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.accounts_service}.
287
+ # If false, that method will raise an exception. This could happen if the given
288
+ # API version does not exist or does not support the AccountsService service,
289
+ # or if the versioned client gem needs an update to support the AccountsService service.
290
+ #
291
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
292
+ # Defaults to `:v1beta`.
293
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
294
+ # @return [boolean] Whether the service is available.
295
+ #
296
+ def self.accounts_service_available? version: :v1beta, transport: :grpc
297
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
298
+ package_name = Google::Shopping::Merchant::Accounts
299
+ .constants
300
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
301
+ .first
302
+ return false unless package_name
303
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
304
+ return false unless service_module.const_defined? :AccountsService
305
+ service_module = service_module.const_get :AccountsService
306
+ if transport == :rest
307
+ return false unless service_module.const_defined? :Rest
308
+ service_module = service_module.const_get :Rest
309
+ end
310
+ service_module.const_defined? :Client
311
+ rescue ::LoadError
312
+ false
313
+ end
314
+
171
315
  ##
172
316
  # Create a new client object for AutofeedSettingsService.
173
317
  #
@@ -181,6 +325,11 @@ module Google
181
325
  # You can also specify a different transport by passing `:rest` or `:grpc` in
182
326
  # the `transport` parameter.
183
327
  #
328
+ # Raises an exception if the currently installed versioned client gem for the
329
+ # given API version does not support the given transport of the AutofeedSettingsService service.
330
+ # You can determine whether the method will succeed by calling
331
+ # {Google::Shopping::Merchant::Accounts.autofeed_settings_service_available?}.
332
+ #
184
333
  # ## About AutofeedSettingsService
185
334
  #
186
335
  # Service to support
@@ -203,6 +352,109 @@ module Google
203
352
  service_module.const_get(:Client).new(&block)
204
353
  end
205
354
 
355
+ ##
356
+ # Determines whether the AutofeedSettingsService service is supported by the current client.
357
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.autofeed_settings_service}.
358
+ # If false, that method will raise an exception. This could happen if the given
359
+ # API version does not exist or does not support the AutofeedSettingsService service,
360
+ # or if the versioned client gem needs an update to support the AutofeedSettingsService service.
361
+ #
362
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
363
+ # Defaults to `:v1beta`.
364
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
365
+ # @return [boolean] Whether the service is available.
366
+ #
367
+ def self.autofeed_settings_service_available? version: :v1beta, transport: :grpc
368
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
369
+ package_name = Google::Shopping::Merchant::Accounts
370
+ .constants
371
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
372
+ .first
373
+ return false unless package_name
374
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
375
+ return false unless service_module.const_defined? :AutofeedSettingsService
376
+ service_module = service_module.const_get :AutofeedSettingsService
377
+ if transport == :rest
378
+ return false unless service_module.const_defined? :Rest
379
+ service_module = service_module.const_get :Rest
380
+ end
381
+ service_module.const_defined? :Client
382
+ rescue ::LoadError
383
+ false
384
+ end
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
+
206
458
  ##
207
459
  # Create a new client object for BusinessIdentityService.
208
460
  #
@@ -216,6 +468,11 @@ module Google
216
468
  # You can also specify a different transport by passing `:rest` or `:grpc` in
217
469
  # the `transport` parameter.
218
470
  #
471
+ # Raises an exception if the currently installed versioned client gem for the
472
+ # given API version does not support the given transport of the BusinessIdentityService service.
473
+ # You can determine whether the method will succeed by calling
474
+ # {Google::Shopping::Merchant::Accounts.business_identity_service_available?}.
475
+ #
219
476
  # ## About BusinessIdentityService
220
477
  #
221
478
  # Service to support [business
@@ -238,6 +495,37 @@ module Google
238
495
  service_module.const_get(:Client).new(&block)
239
496
  end
240
497
 
498
+ ##
499
+ # Determines whether the BusinessIdentityService service is supported by the current client.
500
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.business_identity_service}.
501
+ # If false, that method will raise an exception. This could happen if the given
502
+ # API version does not exist or does not support the BusinessIdentityService service,
503
+ # or if the versioned client gem needs an update to support the BusinessIdentityService service.
504
+ #
505
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
506
+ # Defaults to `:v1beta`.
507
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
508
+ # @return [boolean] Whether the service is available.
509
+ #
510
+ def self.business_identity_service_available? version: :v1beta, transport: :grpc
511
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
512
+ package_name = Google::Shopping::Merchant::Accounts
513
+ .constants
514
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
515
+ .first
516
+ return false unless package_name
517
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
518
+ return false unless service_module.const_defined? :BusinessIdentityService
519
+ service_module = service_module.const_get :BusinessIdentityService
520
+ if transport == :rest
521
+ return false unless service_module.const_defined? :Rest
522
+ service_module = service_module.const_get :Rest
523
+ end
524
+ service_module.const_defined? :Client
525
+ rescue ::LoadError
526
+ false
527
+ end
528
+
241
529
  ##
242
530
  # Create a new client object for BusinessInfoService.
243
531
  #
@@ -251,6 +539,11 @@ module Google
251
539
  # You can also specify a different transport by passing `:rest` or `:grpc` in
252
540
  # the `transport` parameter.
253
541
  #
542
+ # Raises an exception if the currently installed versioned client gem for the
543
+ # given API version does not support the given transport of the BusinessInfoService service.
544
+ # You can determine whether the method will succeed by calling
545
+ # {Google::Shopping::Merchant::Accounts.business_info_service_available?}.
546
+ #
254
547
  # ## About BusinessInfoService
255
548
  #
256
549
  # Service to support business info API.
@@ -272,6 +565,37 @@ module Google
272
565
  service_module.const_get(:Client).new(&block)
273
566
  end
274
567
 
568
+ ##
569
+ # Determines whether the BusinessInfoService service is supported by the current client.
570
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.business_info_service}.
571
+ # If false, that method will raise an exception. This could happen if the given
572
+ # API version does not exist or does not support the BusinessInfoService service,
573
+ # or if the versioned client gem needs an update to support the BusinessInfoService service.
574
+ #
575
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
576
+ # Defaults to `:v1beta`.
577
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
578
+ # @return [boolean] Whether the service is available.
579
+ #
580
+ def self.business_info_service_available? version: :v1beta, transport: :grpc
581
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
582
+ package_name = Google::Shopping::Merchant::Accounts
583
+ .constants
584
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
585
+ .first
586
+ return false unless package_name
587
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
588
+ return false unless service_module.const_defined? :BusinessInfoService
589
+ service_module = service_module.const_get :BusinessInfoService
590
+ if transport == :rest
591
+ return false unless service_module.const_defined? :Rest
592
+ service_module = service_module.const_get :Rest
593
+ end
594
+ service_module.const_defined? :Client
595
+ rescue ::LoadError
596
+ false
597
+ end
598
+
275
599
  ##
276
600
  # Create a new client object for EmailPreferencesService.
277
601
  #
@@ -285,6 +609,11 @@ module Google
285
609
  # You can also specify a different transport by passing `:rest` or `:grpc` in
286
610
  # the `transport` parameter.
287
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 EmailPreferencesService service.
614
+ # You can determine whether the method will succeed by calling
615
+ # {Google::Shopping::Merchant::Accounts.email_preferences_service_available?}.
616
+ #
288
617
  # ## About EmailPreferencesService
289
618
  #
290
619
  # Service to support the `EmailPreferences` API.
@@ -309,6 +638,37 @@ module Google
309
638
  service_module.const_get(:Client).new(&block)
310
639
  end
311
640
 
641
+ ##
642
+ # Determines whether the EmailPreferencesService service is supported by the current client.
643
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.email_preferences_service}.
644
+ # If false, that method will raise an exception. This could happen if the given
645
+ # API version does not exist or does not support the EmailPreferencesService service,
646
+ # or if the versioned client gem needs an update to support the EmailPreferencesService service.
647
+ #
648
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
649
+ # Defaults to `:v1beta`.
650
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
651
+ # @return [boolean] Whether the service is available.
652
+ #
653
+ def self.email_preferences_service_available? version: :v1beta, transport: :grpc
654
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
655
+ package_name = Google::Shopping::Merchant::Accounts
656
+ .constants
657
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
658
+ .first
659
+ return false unless package_name
660
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
661
+ return false unless service_module.const_defined? :EmailPreferencesService
662
+ service_module = service_module.const_get :EmailPreferencesService
663
+ if transport == :rest
664
+ return false unless service_module.const_defined? :Rest
665
+ service_module = service_module.const_get :Rest
666
+ end
667
+ service_module.const_defined? :Client
668
+ rescue ::LoadError
669
+ false
670
+ end
671
+
312
672
  ##
313
673
  # Create a new client object for HomepageService.
314
674
  #
@@ -322,6 +682,11 @@ module Google
322
682
  # You can also specify a different transport by passing `:rest` or `:grpc` in
323
683
  # the `transport` parameter.
324
684
  #
685
+ # Raises an exception if the currently installed versioned client gem for the
686
+ # given API version does not support the given transport of the HomepageService service.
687
+ # You can determine whether the method will succeed by calling
688
+ # {Google::Shopping::Merchant::Accounts.homepage_service_available?}.
689
+ #
325
690
  # ## About HomepageService
326
691
  #
327
692
  # Service to support an API for a store's homepage.
@@ -343,6 +708,37 @@ module Google
343
708
  service_module.const_get(:Client).new(&block)
344
709
  end
345
710
 
711
+ ##
712
+ # Determines whether the HomepageService service is supported by the current client.
713
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.homepage_service}.
714
+ # If false, that method will raise an exception. This could happen if the given
715
+ # API version does not exist or does not support the HomepageService service,
716
+ # or if the versioned client gem needs an update to support the HomepageService service.
717
+ #
718
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
719
+ # Defaults to `:v1beta`.
720
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
721
+ # @return [boolean] Whether the service is available.
722
+ #
723
+ def self.homepage_service_available? version: :v1beta, transport: :grpc
724
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
725
+ package_name = Google::Shopping::Merchant::Accounts
726
+ .constants
727
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
728
+ .first
729
+ return false unless package_name
730
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
731
+ return false unless service_module.const_defined? :HomepageService
732
+ service_module = service_module.const_get :HomepageService
733
+ if transport == :rest
734
+ return false unless service_module.const_defined? :Rest
735
+ service_module = service_module.const_get :Rest
736
+ end
737
+ service_module.const_defined? :Client
738
+ rescue ::LoadError
739
+ false
740
+ end
741
+
346
742
  ##
347
743
  # Create a new client object for OnlineReturnPolicyService.
348
744
  #
@@ -356,6 +752,11 @@ module Google
356
752
  # You can also specify a different transport by passing `:rest` or `:grpc` in
357
753
  # the `transport` parameter.
358
754
  #
755
+ # Raises an exception if the currently installed versioned client gem for the
756
+ # given API version does not support the given transport of the OnlineReturnPolicyService service.
757
+ # You can determine whether the method will succeed by calling
758
+ # {Google::Shopping::Merchant::Accounts.online_return_policy_service_available?}.
759
+ #
359
760
  # ## About OnlineReturnPolicyService
360
761
  #
361
762
  # The service facilitates the management of a merchant's remorse return policy
@@ -381,6 +782,37 @@ module Google
381
782
  service_module.const_get(:Client).new(&block)
382
783
  end
383
784
 
785
+ ##
786
+ # Determines whether the OnlineReturnPolicyService service is supported by the current client.
787
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.online_return_policy_service}.
788
+ # If false, that method will raise an exception. This could happen if the given
789
+ # API version does not exist or does not support the OnlineReturnPolicyService service,
790
+ # or if the versioned client gem needs an update to support the OnlineReturnPolicyService service.
791
+ #
792
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
793
+ # Defaults to `:v1beta`.
794
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
795
+ # @return [boolean] Whether the service is available.
796
+ #
797
+ def self.online_return_policy_service_available? version: :v1beta, transport: :grpc
798
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
799
+ package_name = Google::Shopping::Merchant::Accounts
800
+ .constants
801
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
802
+ .first
803
+ return false unless package_name
804
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
805
+ return false unless service_module.const_defined? :OnlineReturnPolicyService
806
+ service_module = service_module.const_get :OnlineReturnPolicyService
807
+ if transport == :rest
808
+ return false unless service_module.const_defined? :Rest
809
+ service_module = service_module.const_get :Rest
810
+ end
811
+ service_module.const_defined? :Client
812
+ rescue ::LoadError
813
+ false
814
+ end
815
+
384
816
  ##
385
817
  # Create a new client object for ProgramsService.
386
818
  #
@@ -394,6 +826,11 @@ module Google
394
826
  # You can also specify a different transport by passing `:rest` or `:grpc` in
395
827
  # the `transport` parameter.
396
828
  #
829
+ # Raises an exception if the currently installed versioned client gem for the
830
+ # given API version does not support the given transport of the ProgramsService service.
831
+ # You can determine whether the method will succeed by calling
832
+ # {Google::Shopping::Merchant::Accounts.programs_service_available?}.
833
+ #
397
834
  # ## About ProgramsService
398
835
  #
399
836
  # Service for program management.
@@ -425,6 +862,37 @@ module Google
425
862
  service_module.const_get(:Client).new(&block)
426
863
  end
427
864
 
865
+ ##
866
+ # Determines whether the ProgramsService service is supported by the current client.
867
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.programs_service}.
868
+ # If false, that method will raise an exception. This could happen if the given
869
+ # API version does not exist or does not support the ProgramsService service,
870
+ # or if the versioned client gem needs an update to support the ProgramsService service.
871
+ #
872
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
873
+ # Defaults to `:v1beta`.
874
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
875
+ # @return [boolean] Whether the service is available.
876
+ #
877
+ def self.programs_service_available? version: :v1beta, transport: :grpc
878
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
879
+ package_name = Google::Shopping::Merchant::Accounts
880
+ .constants
881
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
882
+ .first
883
+ return false unless package_name
884
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
885
+ return false unless service_module.const_defined? :ProgramsService
886
+ service_module = service_module.const_get :ProgramsService
887
+ if transport == :rest
888
+ return false unless service_module.const_defined? :Rest
889
+ service_module = service_module.const_get :Rest
890
+ end
891
+ service_module.const_defined? :Client
892
+ rescue ::LoadError
893
+ false
894
+ end
895
+
428
896
  ##
429
897
  # Create a new client object for RegionsService.
430
898
  #
@@ -438,6 +906,11 @@ module Google
438
906
  # You can also specify a different transport by passing `:rest` or `:grpc` in
439
907
  # the `transport` parameter.
440
908
  #
909
+ # Raises an exception if the currently installed versioned client gem for the
910
+ # given API version does not support the given transport of the RegionsService service.
911
+ # You can determine whether the method will succeed by calling
912
+ # {Google::Shopping::Merchant::Accounts.regions_service_available?}.
913
+ #
441
914
  # ## About RegionsService
442
915
  #
443
916
  # Manages regions configuration.
@@ -463,6 +936,37 @@ module Google
463
936
  service_module.const_get(:Client).new(&block)
464
937
  end
465
938
 
939
+ ##
940
+ # Determines whether the RegionsService service is supported by the current client.
941
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.regions_service}.
942
+ # If false, that method will raise an exception. This could happen if the given
943
+ # API version does not exist or does not support the RegionsService service,
944
+ # or if the versioned client gem needs an update to support the RegionsService service.
945
+ #
946
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
947
+ # Defaults to `:v1beta`.
948
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
949
+ # @return [boolean] Whether the service is available.
950
+ #
951
+ def self.regions_service_available? version: :v1beta, transport: :grpc
952
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
953
+ package_name = Google::Shopping::Merchant::Accounts
954
+ .constants
955
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
956
+ .first
957
+ return false unless package_name
958
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
959
+ return false unless service_module.const_defined? :RegionsService
960
+ service_module = service_module.const_get :RegionsService
961
+ if transport == :rest
962
+ return false unless service_module.const_defined? :Rest
963
+ service_module = service_module.const_get :Rest
964
+ end
965
+ service_module.const_defined? :Client
966
+ rescue ::LoadError
967
+ false
968
+ end
969
+
466
970
  ##
467
971
  # Create a new client object for ShippingSettingsService.
468
972
  #
@@ -476,6 +980,11 @@ module Google
476
980
  # You can also specify a different transport by passing `:rest` or `:grpc` in
477
981
  # the `transport` parameter.
478
982
  #
983
+ # Raises an exception if the currently installed versioned client gem for the
984
+ # given API version does not support the given transport of the ShippingSettingsService service.
985
+ # You can determine whether the method will succeed by calling
986
+ # {Google::Shopping::Merchant::Accounts.shipping_settings_service_available?}.
987
+ #
479
988
  # ## About ShippingSettingsService
480
989
  #
481
990
  # Service to get method call shipping setting information per Merchant API
@@ -498,6 +1007,37 @@ module Google
498
1007
  service_module.const_get(:Client).new(&block)
499
1008
  end
500
1009
 
1010
+ ##
1011
+ # Determines whether the ShippingSettingsService service is supported by the current client.
1012
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.shipping_settings_service}.
1013
+ # If false, that method will raise an exception. This could happen if the given
1014
+ # API version does not exist or does not support the ShippingSettingsService service,
1015
+ # or if the versioned client gem needs an update to support the ShippingSettingsService service.
1016
+ #
1017
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1018
+ # Defaults to `:v1beta`.
1019
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
1020
+ # @return [boolean] Whether the service is available.
1021
+ #
1022
+ def self.shipping_settings_service_available? version: :v1beta, transport: :grpc
1023
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
1024
+ package_name = Google::Shopping::Merchant::Accounts
1025
+ .constants
1026
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1027
+ .first
1028
+ return false unless package_name
1029
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
1030
+ return false unless service_module.const_defined? :ShippingSettingsService
1031
+ service_module = service_module.const_get :ShippingSettingsService
1032
+ if transport == :rest
1033
+ return false unless service_module.const_defined? :Rest
1034
+ service_module = service_module.const_get :Rest
1035
+ end
1036
+ service_module.const_defined? :Client
1037
+ rescue ::LoadError
1038
+ false
1039
+ end
1040
+
501
1041
  ##
502
1042
  # Create a new client object for TermsOfServiceService.
503
1043
  #
@@ -511,6 +1051,11 @@ module Google
511
1051
  # You can also specify a different transport by passing `:rest` or `:grpc` in
512
1052
  # the `transport` parameter.
513
1053
  #
1054
+ # Raises an exception if the currently installed versioned client gem for the
1055
+ # given API version does not support the given transport of the TermsOfServiceService service.
1056
+ # You can determine whether the method will succeed by calling
1057
+ # {Google::Shopping::Merchant::Accounts.terms_of_service_service_available?}.
1058
+ #
514
1059
  # ## About TermsOfServiceService
515
1060
  #
516
1061
  # Service to support `TermsOfService` API.
@@ -532,6 +1077,37 @@ module Google
532
1077
  service_module.const_get(:Client).new(&block)
533
1078
  end
534
1079
 
1080
+ ##
1081
+ # Determines whether the TermsOfServiceService service is supported by the current client.
1082
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.terms_of_service_service}.
1083
+ # If false, that method will raise an exception. This could happen if the given
1084
+ # API version does not exist or does not support the TermsOfServiceService service,
1085
+ # or if the versioned client gem needs an update to support the TermsOfServiceService service.
1086
+ #
1087
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1088
+ # Defaults to `:v1beta`.
1089
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
1090
+ # @return [boolean] Whether the service is available.
1091
+ #
1092
+ def self.terms_of_service_service_available? version: :v1beta, transport: :grpc
1093
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
1094
+ package_name = Google::Shopping::Merchant::Accounts
1095
+ .constants
1096
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1097
+ .first
1098
+ return false unless package_name
1099
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
1100
+ return false unless service_module.const_defined? :TermsOfServiceService
1101
+ service_module = service_module.const_get :TermsOfServiceService
1102
+ if transport == :rest
1103
+ return false unless service_module.const_defined? :Rest
1104
+ service_module = service_module.const_get :Rest
1105
+ end
1106
+ service_module.const_defined? :Client
1107
+ rescue ::LoadError
1108
+ false
1109
+ end
1110
+
535
1111
  ##
536
1112
  # Create a new client object for TermsOfServiceAgreementStateService.
537
1113
  #
@@ -545,6 +1121,11 @@ module Google
545
1121
  # You can also specify a different transport by passing `:rest` or `:grpc` in
546
1122
  # the `transport` parameter.
547
1123
  #
1124
+ # Raises an exception if the currently installed versioned client gem for the
1125
+ # given API version does not support the given transport of the TermsOfServiceAgreementStateService service.
1126
+ # You can determine whether the method will succeed by calling
1127
+ # {Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service_available?}.
1128
+ #
548
1129
  # ## About TermsOfServiceAgreementStateService
549
1130
  #
550
1131
  # Service to support `TermsOfServiceAgreementState` API.
@@ -565,6 +1146,37 @@ module Google
565
1146
  service_module = service_module.const_get(:Rest) if transport == :rest
566
1147
  service_module.const_get(:Client).new(&block)
567
1148
  end
1149
+
1150
+ ##
1151
+ # Determines whether the TermsOfServiceAgreementStateService service is supported by the current client.
1152
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service}.
1153
+ # If false, that method will raise an exception. This could happen if the given
1154
+ # API version does not exist or does not support the TermsOfServiceAgreementStateService service,
1155
+ # or if the versioned client gem needs an update to support the TermsOfServiceAgreementStateService service.
1156
+ #
1157
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1158
+ # Defaults to `:v1beta`.
1159
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
1160
+ # @return [boolean] Whether the service is available.
1161
+ #
1162
+ def self.terms_of_service_agreement_state_service_available? version: :v1beta, transport: :grpc
1163
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
1164
+ package_name = Google::Shopping::Merchant::Accounts
1165
+ .constants
1166
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1167
+ .first
1168
+ return false unless package_name
1169
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
1170
+ return false unless service_module.const_defined? :TermsOfServiceAgreementStateService
1171
+ service_module = service_module.const_get :TermsOfServiceAgreementStateService
1172
+ if transport == :rest
1173
+ return false unless service_module.const_defined? :Rest
1174
+ service_module = service_module.const_get :Rest
1175
+ end
1176
+ service_module.const_defined? :Client
1177
+ rescue ::LoadError
1178
+ false
1179
+ end
568
1180
  end
569
1181
  end
570
1182
  end
metadata CHANGED
@@ -1,14 +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.2.0
4
+ version: 0.4.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-10-04 00:00:00.000000000 Z
10
+ date: 2025-03-18 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -73,7 +72,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
73
72
  licenses:
74
73
  - Apache-2.0
75
74
  metadata: {}
76
- post_install_message:
77
75
  rdoc_options: []
78
76
  require_paths:
79
77
  - lib
@@ -81,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
79
  requirements:
82
80
  - - ">="
83
81
  - !ruby/object:Gem::Version
84
- version: '2.7'
82
+ version: '3.0'
85
83
  required_rubygems_version: !ruby/object:Gem::Requirement
86
84
  requirements:
87
85
  - - ">="
88
86
  - !ruby/object:Gem::Version
89
87
  version: '0'
90
88
  requirements: []
91
- rubygems_version: 3.5.6
92
- signing_key:
89
+ rubygems_version: 3.6.5
93
90
  specification_version: 4
94
91
  summary: Programmatically manage your Merchant Center Accounts.
95
92
  test_files: []