google-shopping-merchant-accounts 0.2.0 → 0.3.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: dad646f7c9e0010cbfca48f41495ac5e77e646b3da56766c224b19d972428688
4
- data.tar.gz: 9210c031b0a38e07d763a55a587d658008c6fe38d80db2af216f877637b14631
3
+ metadata.gz: d189c1b35b7cf3f5d5ec29af5b9cccaeb490ae9a484e87c5b724a1a783419874
4
+ data.tar.gz: f17016b4ee5cca262ad63cd98150fa050c3c9fd7ff162030ed2053908b126c31
5
5
  SHA512:
6
- metadata.gz: 8fd0aea4ddebc43d102828fc8b280e17d23ed3c08113c4491b4bfc29601659230763bf12f563328c9a893963343fcdb7ac9b264086029496f0834b57dd8352c4
7
- data.tar.gz: 3f173a3da96febc399782430210576cce3cf319c8601be6404b631524a2ffe8cf0f2e24e89b568386c62392281f230cdaf5ab253936fab7d3ecf69124c816c71
6
+ metadata.gz: 2a468f596d47ed79625bc2a4c47d86b14a7bc84a0527df082df38f81058aa09d73db07e520671987327c8c239308a12788ed582cccb1cbc62062f56a2ff66405
7
+ data.tar.gz: 5944259f92c11a28e7f324721df598ebec3b3274a352470ee3f590ec960865dbd321b891be59a0e232427f79279d8d31ae895d695bac9e477e04f03e49952836
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.3.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,37 @@ 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
+
206
386
  ##
207
387
  # Create a new client object for BusinessIdentityService.
208
388
  #
@@ -216,6 +396,11 @@ module Google
216
396
  # You can also specify a different transport by passing `:rest` or `:grpc` in
217
397
  # the `transport` parameter.
218
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 BusinessIdentityService service.
401
+ # You can determine whether the method will succeed by calling
402
+ # {Google::Shopping::Merchant::Accounts.business_identity_service_available?}.
403
+ #
219
404
  # ## About BusinessIdentityService
220
405
  #
221
406
  # Service to support [business
@@ -238,6 +423,37 @@ module Google
238
423
  service_module.const_get(:Client).new(&block)
239
424
  end
240
425
 
426
+ ##
427
+ # Determines whether the BusinessIdentityService service is supported by the current client.
428
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.business_identity_service}.
429
+ # If false, that method will raise an exception. This could happen if the given
430
+ # API version does not exist or does not support the BusinessIdentityService service,
431
+ # or if the versioned client gem needs an update to support the BusinessIdentityService service.
432
+ #
433
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
434
+ # Defaults to `:v1beta`.
435
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
436
+ # @return [boolean] Whether the service is available.
437
+ #
438
+ def self.business_identity_service_available? version: :v1beta, transport: :grpc
439
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
440
+ package_name = Google::Shopping::Merchant::Accounts
441
+ .constants
442
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
443
+ .first
444
+ return false unless package_name
445
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
446
+ return false unless service_module.const_defined? :BusinessIdentityService
447
+ service_module = service_module.const_get :BusinessIdentityService
448
+ if transport == :rest
449
+ return false unless service_module.const_defined? :Rest
450
+ service_module = service_module.const_get :Rest
451
+ end
452
+ service_module.const_defined? :Client
453
+ rescue ::LoadError
454
+ false
455
+ end
456
+
241
457
  ##
242
458
  # Create a new client object for BusinessInfoService.
243
459
  #
@@ -251,6 +467,11 @@ module Google
251
467
  # You can also specify a different transport by passing `:rest` or `:grpc` in
252
468
  # the `transport` parameter.
253
469
  #
470
+ # Raises an exception if the currently installed versioned client gem for the
471
+ # given API version does not support the given transport of the BusinessInfoService service.
472
+ # You can determine whether the method will succeed by calling
473
+ # {Google::Shopping::Merchant::Accounts.business_info_service_available?}.
474
+ #
254
475
  # ## About BusinessInfoService
255
476
  #
256
477
  # Service to support business info API.
@@ -272,6 +493,37 @@ module Google
272
493
  service_module.const_get(:Client).new(&block)
273
494
  end
274
495
 
496
+ ##
497
+ # Determines whether the BusinessInfoService service is supported by the current client.
498
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.business_info_service}.
499
+ # If false, that method will raise an exception. This could happen if the given
500
+ # API version does not exist or does not support the BusinessInfoService service,
501
+ # or if the versioned client gem needs an update to support the BusinessInfoService service.
502
+ #
503
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
504
+ # Defaults to `:v1beta`.
505
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
506
+ # @return [boolean] Whether the service is available.
507
+ #
508
+ def self.business_info_service_available? version: :v1beta, transport: :grpc
509
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
510
+ package_name = Google::Shopping::Merchant::Accounts
511
+ .constants
512
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
513
+ .first
514
+ return false unless package_name
515
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
516
+ return false unless service_module.const_defined? :BusinessInfoService
517
+ service_module = service_module.const_get :BusinessInfoService
518
+ if transport == :rest
519
+ return false unless service_module.const_defined? :Rest
520
+ service_module = service_module.const_get :Rest
521
+ end
522
+ service_module.const_defined? :Client
523
+ rescue ::LoadError
524
+ false
525
+ end
526
+
275
527
  ##
276
528
  # Create a new client object for EmailPreferencesService.
277
529
  #
@@ -285,6 +537,11 @@ module Google
285
537
  # You can also specify a different transport by passing `:rest` or `:grpc` in
286
538
  # the `transport` parameter.
287
539
  #
540
+ # Raises an exception if the currently installed versioned client gem for the
541
+ # given API version does not support the given transport of the EmailPreferencesService service.
542
+ # You can determine whether the method will succeed by calling
543
+ # {Google::Shopping::Merchant::Accounts.email_preferences_service_available?}.
544
+ #
288
545
  # ## About EmailPreferencesService
289
546
  #
290
547
  # Service to support the `EmailPreferences` API.
@@ -309,6 +566,37 @@ module Google
309
566
  service_module.const_get(:Client).new(&block)
310
567
  end
311
568
 
569
+ ##
570
+ # Determines whether the EmailPreferencesService service is supported by the current client.
571
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.email_preferences_service}.
572
+ # If false, that method will raise an exception. This could happen if the given
573
+ # API version does not exist or does not support the EmailPreferencesService service,
574
+ # or if the versioned client gem needs an update to support the EmailPreferencesService service.
575
+ #
576
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
577
+ # Defaults to `:v1beta`.
578
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
579
+ # @return [boolean] Whether the service is available.
580
+ #
581
+ def self.email_preferences_service_available? version: :v1beta, transport: :grpc
582
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
583
+ package_name = Google::Shopping::Merchant::Accounts
584
+ .constants
585
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
586
+ .first
587
+ return false unless package_name
588
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
589
+ return false unless service_module.const_defined? :EmailPreferencesService
590
+ service_module = service_module.const_get :EmailPreferencesService
591
+ if transport == :rest
592
+ return false unless service_module.const_defined? :Rest
593
+ service_module = service_module.const_get :Rest
594
+ end
595
+ service_module.const_defined? :Client
596
+ rescue ::LoadError
597
+ false
598
+ end
599
+
312
600
  ##
313
601
  # Create a new client object for HomepageService.
314
602
  #
@@ -322,6 +610,11 @@ module Google
322
610
  # You can also specify a different transport by passing `:rest` or `:grpc` in
323
611
  # the `transport` parameter.
324
612
  #
613
+ # Raises an exception if the currently installed versioned client gem for the
614
+ # given API version does not support the given transport of the HomepageService service.
615
+ # You can determine whether the method will succeed by calling
616
+ # {Google::Shopping::Merchant::Accounts.homepage_service_available?}.
617
+ #
325
618
  # ## About HomepageService
326
619
  #
327
620
  # Service to support an API for a store's homepage.
@@ -343,6 +636,37 @@ module Google
343
636
  service_module.const_get(:Client).new(&block)
344
637
  end
345
638
 
639
+ ##
640
+ # Determines whether the HomepageService service is supported by the current client.
641
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.homepage_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 HomepageService service,
644
+ # or if the versioned client gem needs an update to support the HomepageService 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.homepage_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? :HomepageService
660
+ service_module = service_module.const_get :HomepageService
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
+
346
670
  ##
347
671
  # Create a new client object for OnlineReturnPolicyService.
348
672
  #
@@ -356,6 +680,11 @@ module Google
356
680
  # You can also specify a different transport by passing `:rest` or `:grpc` in
357
681
  # the `transport` parameter.
358
682
  #
683
+ # Raises an exception if the currently installed versioned client gem for the
684
+ # given API version does not support the given transport of the OnlineReturnPolicyService service.
685
+ # You can determine whether the method will succeed by calling
686
+ # {Google::Shopping::Merchant::Accounts.online_return_policy_service_available?}.
687
+ #
359
688
  # ## About OnlineReturnPolicyService
360
689
  #
361
690
  # The service facilitates the management of a merchant's remorse return policy
@@ -381,6 +710,37 @@ module Google
381
710
  service_module.const_get(:Client).new(&block)
382
711
  end
383
712
 
713
+ ##
714
+ # Determines whether the OnlineReturnPolicyService service is supported by the current client.
715
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.online_return_policy_service}.
716
+ # If false, that method will raise an exception. This could happen if the given
717
+ # API version does not exist or does not support the OnlineReturnPolicyService service,
718
+ # or if the versioned client gem needs an update to support the OnlineReturnPolicyService service.
719
+ #
720
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
721
+ # Defaults to `:v1beta`.
722
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
723
+ # @return [boolean] Whether the service is available.
724
+ #
725
+ def self.online_return_policy_service_available? version: :v1beta, transport: :grpc
726
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
727
+ package_name = Google::Shopping::Merchant::Accounts
728
+ .constants
729
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
730
+ .first
731
+ return false unless package_name
732
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
733
+ return false unless service_module.const_defined? :OnlineReturnPolicyService
734
+ service_module = service_module.const_get :OnlineReturnPolicyService
735
+ if transport == :rest
736
+ return false unless service_module.const_defined? :Rest
737
+ service_module = service_module.const_get :Rest
738
+ end
739
+ service_module.const_defined? :Client
740
+ rescue ::LoadError
741
+ false
742
+ end
743
+
384
744
  ##
385
745
  # Create a new client object for ProgramsService.
386
746
  #
@@ -394,6 +754,11 @@ module Google
394
754
  # You can also specify a different transport by passing `:rest` or `:grpc` in
395
755
  # the `transport` parameter.
396
756
  #
757
+ # Raises an exception if the currently installed versioned client gem for the
758
+ # given API version does not support the given transport of the ProgramsService service.
759
+ # You can determine whether the method will succeed by calling
760
+ # {Google::Shopping::Merchant::Accounts.programs_service_available?}.
761
+ #
397
762
  # ## About ProgramsService
398
763
  #
399
764
  # Service for program management.
@@ -425,6 +790,37 @@ module Google
425
790
  service_module.const_get(:Client).new(&block)
426
791
  end
427
792
 
793
+ ##
794
+ # Determines whether the ProgramsService service is supported by the current client.
795
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.programs_service}.
796
+ # If false, that method will raise an exception. This could happen if the given
797
+ # API version does not exist or does not support the ProgramsService service,
798
+ # or if the versioned client gem needs an update to support the ProgramsService service.
799
+ #
800
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
801
+ # Defaults to `:v1beta`.
802
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
803
+ # @return [boolean] Whether the service is available.
804
+ #
805
+ def self.programs_service_available? version: :v1beta, transport: :grpc
806
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
807
+ package_name = Google::Shopping::Merchant::Accounts
808
+ .constants
809
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
810
+ .first
811
+ return false unless package_name
812
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
813
+ return false unless service_module.const_defined? :ProgramsService
814
+ service_module = service_module.const_get :ProgramsService
815
+ if transport == :rest
816
+ return false unless service_module.const_defined? :Rest
817
+ service_module = service_module.const_get :Rest
818
+ end
819
+ service_module.const_defined? :Client
820
+ rescue ::LoadError
821
+ false
822
+ end
823
+
428
824
  ##
429
825
  # Create a new client object for RegionsService.
430
826
  #
@@ -438,6 +834,11 @@ module Google
438
834
  # You can also specify a different transport by passing `:rest` or `:grpc` in
439
835
  # the `transport` parameter.
440
836
  #
837
+ # Raises an exception if the currently installed versioned client gem for the
838
+ # given API version does not support the given transport of the RegionsService service.
839
+ # You can determine whether the method will succeed by calling
840
+ # {Google::Shopping::Merchant::Accounts.regions_service_available?}.
841
+ #
441
842
  # ## About RegionsService
442
843
  #
443
844
  # Manages regions configuration.
@@ -463,6 +864,37 @@ module Google
463
864
  service_module.const_get(:Client).new(&block)
464
865
  end
465
866
 
867
+ ##
868
+ # Determines whether the RegionsService service is supported by the current client.
869
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.regions_service}.
870
+ # If false, that method will raise an exception. This could happen if the given
871
+ # API version does not exist or does not support the RegionsService service,
872
+ # or if the versioned client gem needs an update to support the RegionsService service.
873
+ #
874
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
875
+ # Defaults to `:v1beta`.
876
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
877
+ # @return [boolean] Whether the service is available.
878
+ #
879
+ def self.regions_service_available? version: :v1beta, transport: :grpc
880
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
881
+ package_name = Google::Shopping::Merchant::Accounts
882
+ .constants
883
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
884
+ .first
885
+ return false unless package_name
886
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
887
+ return false unless service_module.const_defined? :RegionsService
888
+ service_module = service_module.const_get :RegionsService
889
+ if transport == :rest
890
+ return false unless service_module.const_defined? :Rest
891
+ service_module = service_module.const_get :Rest
892
+ end
893
+ service_module.const_defined? :Client
894
+ rescue ::LoadError
895
+ false
896
+ end
897
+
466
898
  ##
467
899
  # Create a new client object for ShippingSettingsService.
468
900
  #
@@ -476,6 +908,11 @@ module Google
476
908
  # You can also specify a different transport by passing `:rest` or `:grpc` in
477
909
  # the `transport` parameter.
478
910
  #
911
+ # Raises an exception if the currently installed versioned client gem for the
912
+ # given API version does not support the given transport of the ShippingSettingsService service.
913
+ # You can determine whether the method will succeed by calling
914
+ # {Google::Shopping::Merchant::Accounts.shipping_settings_service_available?}.
915
+ #
479
916
  # ## About ShippingSettingsService
480
917
  #
481
918
  # Service to get method call shipping setting information per Merchant API
@@ -498,6 +935,37 @@ module Google
498
935
  service_module.const_get(:Client).new(&block)
499
936
  end
500
937
 
938
+ ##
939
+ # Determines whether the ShippingSettingsService service is supported by the current client.
940
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.shipping_settings_service}.
941
+ # If false, that method will raise an exception. This could happen if the given
942
+ # API version does not exist or does not support the ShippingSettingsService service,
943
+ # or if the versioned client gem needs an update to support the ShippingSettingsService service.
944
+ #
945
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
946
+ # Defaults to `:v1beta`.
947
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
948
+ # @return [boolean] Whether the service is available.
949
+ #
950
+ def self.shipping_settings_service_available? version: :v1beta, transport: :grpc
951
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
952
+ package_name = Google::Shopping::Merchant::Accounts
953
+ .constants
954
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
955
+ .first
956
+ return false unless package_name
957
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
958
+ return false unless service_module.const_defined? :ShippingSettingsService
959
+ service_module = service_module.const_get :ShippingSettingsService
960
+ if transport == :rest
961
+ return false unless service_module.const_defined? :Rest
962
+ service_module = service_module.const_get :Rest
963
+ end
964
+ service_module.const_defined? :Client
965
+ rescue ::LoadError
966
+ false
967
+ end
968
+
501
969
  ##
502
970
  # Create a new client object for TermsOfServiceService.
503
971
  #
@@ -511,6 +979,11 @@ module Google
511
979
  # You can also specify a different transport by passing `:rest` or `:grpc` in
512
980
  # the `transport` parameter.
513
981
  #
982
+ # Raises an exception if the currently installed versioned client gem for the
983
+ # given API version does not support the given transport of the TermsOfServiceService service.
984
+ # You can determine whether the method will succeed by calling
985
+ # {Google::Shopping::Merchant::Accounts.terms_of_service_service_available?}.
986
+ #
514
987
  # ## About TermsOfServiceService
515
988
  #
516
989
  # Service to support `TermsOfService` API.
@@ -532,6 +1005,37 @@ module Google
532
1005
  service_module.const_get(:Client).new(&block)
533
1006
  end
534
1007
 
1008
+ ##
1009
+ # Determines whether the TermsOfServiceService service is supported by the current client.
1010
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.terms_of_service_service}.
1011
+ # If false, that method will raise an exception. This could happen if the given
1012
+ # API version does not exist or does not support the TermsOfServiceService service,
1013
+ # or if the versioned client gem needs an update to support the TermsOfServiceService service.
1014
+ #
1015
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1016
+ # Defaults to `:v1beta`.
1017
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
1018
+ # @return [boolean] Whether the service is available.
1019
+ #
1020
+ def self.terms_of_service_service_available? version: :v1beta, transport: :grpc
1021
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
1022
+ package_name = Google::Shopping::Merchant::Accounts
1023
+ .constants
1024
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1025
+ .first
1026
+ return false unless package_name
1027
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
1028
+ return false unless service_module.const_defined? :TermsOfServiceService
1029
+ service_module = service_module.const_get :TermsOfServiceService
1030
+ if transport == :rest
1031
+ return false unless service_module.const_defined? :Rest
1032
+ service_module = service_module.const_get :Rest
1033
+ end
1034
+ service_module.const_defined? :Client
1035
+ rescue ::LoadError
1036
+ false
1037
+ end
1038
+
535
1039
  ##
536
1040
  # Create a new client object for TermsOfServiceAgreementStateService.
537
1041
  #
@@ -545,6 +1049,11 @@ module Google
545
1049
  # You can also specify a different transport by passing `:rest` or `:grpc` in
546
1050
  # the `transport` parameter.
547
1051
  #
1052
+ # Raises an exception if the currently installed versioned client gem for the
1053
+ # given API version does not support the given transport of the TermsOfServiceAgreementStateService service.
1054
+ # You can determine whether the method will succeed by calling
1055
+ # {Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service_available?}.
1056
+ #
548
1057
  # ## About TermsOfServiceAgreementStateService
549
1058
  #
550
1059
  # Service to support `TermsOfServiceAgreementState` API.
@@ -565,6 +1074,37 @@ module Google
565
1074
  service_module = service_module.const_get(:Rest) if transport == :rest
566
1075
  service_module.const_get(:Client).new(&block)
567
1076
  end
1077
+
1078
+ ##
1079
+ # Determines whether the TermsOfServiceAgreementStateService service is supported by the current client.
1080
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service}.
1081
+ # If false, that method will raise an exception. This could happen if the given
1082
+ # API version does not exist or does not support the TermsOfServiceAgreementStateService service,
1083
+ # or if the versioned client gem needs an update to support the TermsOfServiceAgreementStateService service.
1084
+ #
1085
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1086
+ # Defaults to `:v1beta`.
1087
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
1088
+ # @return [boolean] Whether the service is available.
1089
+ #
1090
+ def self.terms_of_service_agreement_state_service_available? version: :v1beta, transport: :grpc
1091
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
1092
+ package_name = Google::Shopping::Merchant::Accounts
1093
+ .constants
1094
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1095
+ .first
1096
+ return false unless package_name
1097
+ service_module = Google::Shopping::Merchant::Accounts.const_get package_name
1098
+ return false unless service_module.const_defined? :TermsOfServiceAgreementStateService
1099
+ service_module = service_module.const_get :TermsOfServiceAgreementStateService
1100
+ if transport == :rest
1101
+ return false unless service_module.const_defined? :Rest
1102
+ service_module = service_module.const_get :Rest
1103
+ end
1104
+ service_module.const_defined? :Client
1105
+ rescue ::LoadError
1106
+ false
1107
+ end
568
1108
  end
569
1109
  end
570
1110
  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.3.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-01-29 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.2
93
90
  specification_version: 4
94
91
  summary: Programmatically manage your Merchant Center Accounts.
95
92
  test_files: []