google-shopping-merchant-accounts 0.1.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: 5655f6afa1645feae472b634c8f10d17f34aed945587213ebb5f21ee9b0029ac
4
- data.tar.gz: 50edcc4e7defef5af8033ad6e8629da9e3f962da240642adeff83b0b71447d46
3
+ metadata.gz: d189c1b35b7cf3f5d5ec29af5b9cccaeb490ae9a484e87c5b724a1a783419874
4
+ data.tar.gz: f17016b4ee5cca262ad63cd98150fa050c3c9fd7ff162030ed2053908b126c31
5
5
  SHA512:
6
- metadata.gz: f7647e7493062ac671f2944177b3002be977a6f5d5b2e33795bd41b2629a5957268056bb05ed54a89b5d631afc7669f2a97ef094a38fbc9ecd9256e8e4c69ee0
7
- data.tar.gz: 7a54afd791ce9baee2adeaa1b43e1be013bf0a3e9b165fc06b881825286ea0ad676bf71bc5aafde8dd54fb07c3afe2706c940d2d76c1d4a955c336fcaa4ca579
6
+ metadata.gz: 2a468f596d47ed79625bc2a4c47d86b14a7bc84a0527df082df38f81058aa09d73db07e520671987327c8c239308a12788ed582cccb1cbc62062f56a2ff66405
7
+ data.tar.gz: 5944259f92c11a28e7f324721df598ebec3b3274a352470ee3f590ec960865dbd321b891be59a0e232427f79279d8d31ae895d695bac9e477e04f03e49952836
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby Client for the Merchant API
2
2
 
3
- Programmatically manage your Merchant Center accounts.
3
+ Programmatically manage your Merchant Center Accounts.
4
4
 
5
- Programmatically manage your Merchant Center accounts.
5
+ Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.
6
6
 
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-shopping-merchant-accounts-v*`.
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-shopping-merchant-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.1.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,108 @@ 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
+
315
+ ##
316
+ # Create a new client object for AutofeedSettingsService.
317
+ #
318
+ # By default, this returns an instance of
319
+ # [Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutofeedSettingsService/Client)
320
+ # for a gRPC client for version V1beta of the API.
321
+ # However, you can specify a different API version by passing it in the
322
+ # `version` parameter. If the AutofeedSettingsService service is
323
+ # supported by that API version, and the corresponding gem is available, the
324
+ # appropriate versioned client will be returned.
325
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
326
+ # the `transport` parameter.
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
+ #
333
+ # ## About AutofeedSettingsService
334
+ #
335
+ # Service to support
336
+ # [autofeed](https://support.google.com/merchants/answer/7538732) setting.
337
+ #
338
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
339
+ # Defaults to `:v1beta`.
340
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
341
+ # @return [::Object] A client object for the specified version.
342
+ #
343
+ def self.autofeed_settings_service version: :v1beta, transport: :grpc, &block
344
+ require "google/shopping/merchant/accounts/#{version.to_s.downcase}"
345
+
346
+ package_name = Google::Shopping::Merchant::Accounts
347
+ .constants
348
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
349
+ .first
350
+ service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutofeedSettingsService)
351
+ service_module = service_module.const_get(:Rest) if transport == :rest
352
+ service_module.const_get(:Client).new(&block)
353
+ end
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
+
171
386
  ##
172
387
  # Create a new client object for BusinessIdentityService.
173
388
  #
@@ -181,6 +396,11 @@ module Google
181
396
  # You can also specify a different transport by passing `:rest` or `:grpc` in
182
397
  # the `transport` parameter.
183
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
+ #
184
404
  # ## About BusinessIdentityService
185
405
  #
186
406
  # Service to support [business
@@ -203,6 +423,37 @@ module Google
203
423
  service_module.const_get(:Client).new(&block)
204
424
  end
205
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
+
206
457
  ##
207
458
  # Create a new client object for BusinessInfoService.
208
459
  #
@@ -216,6 +467,11 @@ module Google
216
467
  # You can also specify a different transport by passing `:rest` or `:grpc` in
217
468
  # the `transport` parameter.
218
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
+ #
219
475
  # ## About BusinessInfoService
220
476
  #
221
477
  # Service to support business info API.
@@ -237,6 +493,37 @@ module Google
237
493
  service_module.const_get(:Client).new(&block)
238
494
  end
239
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
+
240
527
  ##
241
528
  # Create a new client object for EmailPreferencesService.
242
529
  #
@@ -250,6 +537,11 @@ module Google
250
537
  # You can also specify a different transport by passing `:rest` or `:grpc` in
251
538
  # the `transport` parameter.
252
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
+ #
253
545
  # ## About EmailPreferencesService
254
546
  #
255
547
  # Service to support the `EmailPreferences` API.
@@ -274,6 +566,37 @@ module Google
274
566
  service_module.const_get(:Client).new(&block)
275
567
  end
276
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
+
277
600
  ##
278
601
  # Create a new client object for HomepageService.
279
602
  #
@@ -287,6 +610,11 @@ module Google
287
610
  # You can also specify a different transport by passing `:rest` or `:grpc` in
288
611
  # the `transport` parameter.
289
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
+ #
290
618
  # ## About HomepageService
291
619
  #
292
620
  # Service to support an API for a store's homepage.
@@ -308,6 +636,37 @@ module Google
308
636
  service_module.const_get(:Client).new(&block)
309
637
  end
310
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
+
311
670
  ##
312
671
  # Create a new client object for OnlineReturnPolicyService.
313
672
  #
@@ -321,6 +680,11 @@ module Google
321
680
  # You can also specify a different transport by passing `:rest` or `:grpc` in
322
681
  # the `transport` parameter.
323
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
+ #
324
688
  # ## About OnlineReturnPolicyService
325
689
  #
326
690
  # The service facilitates the management of a merchant's remorse return policy
@@ -346,6 +710,37 @@ module Google
346
710
  service_module.const_get(:Client).new(&block)
347
711
  end
348
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
+
349
744
  ##
350
745
  # Create a new client object for ProgramsService.
351
746
  #
@@ -359,6 +754,11 @@ module Google
359
754
  # You can also specify a different transport by passing `:rest` or `:grpc` in
360
755
  # the `transport` parameter.
361
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
+ #
362
762
  # ## About ProgramsService
363
763
  #
364
764
  # Service for program management.
@@ -390,6 +790,37 @@ module Google
390
790
  service_module.const_get(:Client).new(&block)
391
791
  end
392
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
+
393
824
  ##
394
825
  # Create a new client object for RegionsService.
395
826
  #
@@ -403,6 +834,11 @@ module Google
403
834
  # You can also specify a different transport by passing `:rest` or `:grpc` in
404
835
  # the `transport` parameter.
405
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
+ #
406
842
  # ## About RegionsService
407
843
  #
408
844
  # Manages regions configuration.
@@ -428,6 +864,37 @@ module Google
428
864
  service_module.const_get(:Client).new(&block)
429
865
  end
430
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
+
431
898
  ##
432
899
  # Create a new client object for ShippingSettingsService.
433
900
  #
@@ -441,6 +908,11 @@ module Google
441
908
  # You can also specify a different transport by passing `:rest` or `:grpc` in
442
909
  # the `transport` parameter.
443
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
+ #
444
916
  # ## About ShippingSettingsService
445
917
  #
446
918
  # Service to get method call shipping setting information per Merchant API
@@ -463,6 +935,37 @@ module Google
463
935
  service_module.const_get(:Client).new(&block)
464
936
  end
465
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
+
466
969
  ##
467
970
  # Create a new client object for TermsOfServiceService.
468
971
  #
@@ -476,6 +979,11 @@ module Google
476
979
  # You can also specify a different transport by passing `:rest` or `:grpc` in
477
980
  # the `transport` parameter.
478
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
+ #
479
987
  # ## About TermsOfServiceService
480
988
  #
481
989
  # Service to support `TermsOfService` API.
@@ -497,6 +1005,37 @@ module Google
497
1005
  service_module.const_get(:Client).new(&block)
498
1006
  end
499
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
+
500
1039
  ##
501
1040
  # Create a new client object for TermsOfServiceAgreementStateService.
502
1041
  #
@@ -510,6 +1049,11 @@ module Google
510
1049
  # You can also specify a different transport by passing `:rest` or `:grpc` in
511
1050
  # the `transport` parameter.
512
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
+ #
513
1057
  # ## About TermsOfServiceAgreementStateService
514
1058
  #
515
1059
  # Service to support `TermsOfServiceAgreementState` API.
@@ -530,6 +1074,37 @@ module Google
530
1074
  service_module = service_module.const_get(:Rest) if transport == :rest
531
1075
  service_module.const_get(:Client).new(&block)
532
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
533
1108
  end
534
1109
  end
535
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.1.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-06-10 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
@@ -30,7 +29,7 @@ dependencies:
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '0.0'
32
+ version: '0.2'
34
33
  - - "<"
35
34
  - !ruby/object:Gem::Version
36
35
  version: 2.a
@@ -40,11 +39,23 @@ dependencies:
40
39
  requirements:
41
40
  - - ">="
42
41
  - !ruby/object:Gem::Version
43
- version: '0.0'
42
+ version: '0.2'
44
43
  - - "<"
45
44
  - !ruby/object:Gem::Version
46
45
  version: 2.a
47
- description: Programmatically manage your Merchant Center accounts.
46
+ description: 'Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables
47
+ you to programmatically manage your accounts. Conversions Sub-API: Enables you to
48
+ programmatically manage your conversion sources for a merchant account. Datasources
49
+ Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API:
50
+ This bundle enables you to programmatically manage your local and regional inventories.
51
+ Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local
52
+ inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically
53
+ manage your notification subscriptions. Products Sub-API: This bundle enables you
54
+ to programmatically manage your products. Promotions Sub-API: This bundle enables
55
+ you to programmatically manage your promotions for products. Quota Sub-API: This
56
+ bundle enables you to list your quotas for all APIs you are using. Reports Sub-API:
57
+ This bundle enables you to programmatically retrieve reports and insights about
58
+ products, their performance and their competitive environment.'
48
59
  email: googleapis-packages@google.com
49
60
  executables: []
50
61
  extensions: []
@@ -61,7 +72,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
61
72
  licenses:
62
73
  - Apache-2.0
63
74
  metadata: {}
64
- post_install_message:
65
75
  rdoc_options: []
66
76
  require_paths:
67
77
  - lib
@@ -69,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
79
  requirements:
70
80
  - - ">="
71
81
  - !ruby/object:Gem::Version
72
- version: '2.7'
82
+ version: '3.0'
73
83
  required_rubygems_version: !ruby/object:Gem::Requirement
74
84
  requirements:
75
85
  - - ">="
76
86
  - !ruby/object:Gem::Version
77
87
  version: '0'
78
88
  requirements: []
79
- rubygems_version: 3.5.6
80
- signing_key:
89
+ rubygems_version: 3.6.2
81
90
  specification_version: 4
82
- summary: Programmatically manage your Merchant Center accounts.
91
+ summary: Programmatically manage your Merchant Center Accounts.
83
92
  test_files: []