google-ads-ad_manager 0.1.0 → 1.0.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: 222b44f88adaaa493f6a99b4a5ea6437720aebc47e7da363e466bb27ca475de5
4
- data.tar.gz: 9c106107740097596602d5f311dc7d7bd505606a51ce1fc94066430966b68429
3
+ metadata.gz: 7a65630ec22802398b182bfee520c333e40af9f6081de2d74a41a8998fa973a1
4
+ data.tar.gz: ad05b3e3f3b2ada1de3ac35549c16e0c0c96fcb864f99bd303a60be8d54f7e12
5
5
  SHA512:
6
- metadata.gz: e359bc0ee16c08ee7aa97318b371812d3b1e3ef177c33268a31e713c8d4493cfcf5059348c8d5e11f64f2e90944d78c2d9fba645e7c53c6da6388acb40a9ffc8
7
- data.tar.gz: 6fad000f9c56ea72242ff423c304e95742e3cf6c18b0acbfcc5d2f92d9cd529e026114e42641d5f9f919e1085652a1081fd66bde2ec6f292dd5bfcf18bd26345
6
+ metadata.gz: fa14d0ab25e31e66af34e6d37158cdde890a3b685c22ba5ee70696fb1095a2ba0c0bb29ea509e6ef291e8750168a060305c1f4dec34f2ec00275a827e13908db
7
+ data.tar.gz: 820789bd4bf183eba79be63893f7489ec591d4856dd15245c6f62c42faf93ce57c321011bfda2d0f8c9e53508b9078997607fd906100c86b354a79fea0cb5305
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/admanager.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-ads-ad_manager-v1](https://rubydoc.info/gems/google-ads-ad_manager-v1).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Ads
22
22
  module AdManager
23
- VERSION = "0.1.0"
23
+ VERSION = "1.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -38,6 +38,11 @@ module Google
38
38
  # supported by that API version, and the corresponding gem is available, the
39
39
  # appropriate versioned client will be returned.
40
40
  #
41
+ # Raises an exception if the currently installed versioned client gem for the
42
+ # given API version does not support the AdUnitService service.
43
+ # You can determine whether the method will succeed by calling
44
+ # {Google::Ads::AdManager.ad_unit_service_available?}.
45
+ #
41
46
  # ## About AdUnitService
42
47
  #
43
48
  # Provides methods for handling AdUnit objects.
@@ -57,6 +62,34 @@ module Google
57
62
  service_module.const_get(:Rest).const_get(:Client).new(&block)
58
63
  end
59
64
 
65
+ ##
66
+ # Determines whether the AdUnitService service is supported by the current client.
67
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.ad_unit_service}.
68
+ # If false, that method will raise an exception. This could happen if the given
69
+ # API version does not exist or does not support the AdUnitService service,
70
+ # or if the versioned client gem needs an update to support the AdUnitService service.
71
+ #
72
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
73
+ # Defaults to `:v1`.
74
+ # @return [boolean] Whether the service is available.
75
+ #
76
+ def self.ad_unit_service_available? version: :v1
77
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
78
+ package_name = Google::Ads::AdManager
79
+ .constants
80
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
81
+ .first
82
+ return false unless package_name
83
+ service_module = Google::Ads::AdManager.const_get package_name
84
+ return false unless service_module.const_defined? :AdUnitService
85
+ service_module = service_module.const_get :AdUnitService
86
+ return false unless service_module.const_defined? :Rest
87
+ service_module = service_module.const_get :Rest
88
+ service_module.const_defined? :Client
89
+ rescue ::LoadError
90
+ false
91
+ end
92
+
60
93
  ##
61
94
  # Create a new client object for CompanyService.
62
95
  #
@@ -68,6 +101,11 @@ module Google
68
101
  # supported by that API version, and the corresponding gem is available, the
69
102
  # appropriate versioned client will be returned.
70
103
  #
104
+ # Raises an exception if the currently installed versioned client gem for the
105
+ # given API version does not support the CompanyService service.
106
+ # You can determine whether the method will succeed by calling
107
+ # {Google::Ads::AdManager.company_service_available?}.
108
+ #
71
109
  # ## About CompanyService
72
110
  #
73
111
  # Provides methods for handling `Company` objects.
@@ -87,6 +125,34 @@ module Google
87
125
  service_module.const_get(:Rest).const_get(:Client).new(&block)
88
126
  end
89
127
 
128
+ ##
129
+ # Determines whether the CompanyService service is supported by the current client.
130
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.company_service}.
131
+ # If false, that method will raise an exception. This could happen if the given
132
+ # API version does not exist or does not support the CompanyService service,
133
+ # or if the versioned client gem needs an update to support the CompanyService service.
134
+ #
135
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
136
+ # Defaults to `:v1`.
137
+ # @return [boolean] Whether the service is available.
138
+ #
139
+ def self.company_service_available? version: :v1
140
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
141
+ package_name = Google::Ads::AdManager
142
+ .constants
143
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
144
+ .first
145
+ return false unless package_name
146
+ service_module = Google::Ads::AdManager.const_get package_name
147
+ return false unless service_module.const_defined? :CompanyService
148
+ service_module = service_module.const_get :CompanyService
149
+ return false unless service_module.const_defined? :Rest
150
+ service_module = service_module.const_get :Rest
151
+ service_module.const_defined? :Client
152
+ rescue ::LoadError
153
+ false
154
+ end
155
+
90
156
  ##
91
157
  # Create a new client object for CustomFieldService.
92
158
  #
@@ -98,6 +164,11 @@ module Google
98
164
  # supported by that API version, and the corresponding gem is available, the
99
165
  # appropriate versioned client will be returned.
100
166
  #
167
+ # Raises an exception if the currently installed versioned client gem for the
168
+ # given API version does not support the CustomFieldService service.
169
+ # You can determine whether the method will succeed by calling
170
+ # {Google::Ads::AdManager.custom_field_service_available?}.
171
+ #
101
172
  # ## About CustomFieldService
102
173
  #
103
174
  # Provides methods for handling `CustomField` objects.
@@ -117,6 +188,34 @@ module Google
117
188
  service_module.const_get(:Rest).const_get(:Client).new(&block)
118
189
  end
119
190
 
191
+ ##
192
+ # Determines whether the CustomFieldService service is supported by the current client.
193
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.custom_field_service}.
194
+ # If false, that method will raise an exception. This could happen if the given
195
+ # API version does not exist or does not support the CustomFieldService service,
196
+ # or if the versioned client gem needs an update to support the CustomFieldService service.
197
+ #
198
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
199
+ # Defaults to `:v1`.
200
+ # @return [boolean] Whether the service is available.
201
+ #
202
+ def self.custom_field_service_available? version: :v1
203
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
204
+ package_name = Google::Ads::AdManager
205
+ .constants
206
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
207
+ .first
208
+ return false unless package_name
209
+ service_module = Google::Ads::AdManager.const_get package_name
210
+ return false unless service_module.const_defined? :CustomFieldService
211
+ service_module = service_module.const_get :CustomFieldService
212
+ return false unless service_module.const_defined? :Rest
213
+ service_module = service_module.const_get :Rest
214
+ service_module.const_defined? :Client
215
+ rescue ::LoadError
216
+ false
217
+ end
218
+
120
219
  ##
121
220
  # Create a new client object for CustomTargetingKeyService.
122
221
  #
@@ -128,6 +227,11 @@ module Google
128
227
  # supported by that API version, and the corresponding gem is available, the
129
228
  # appropriate versioned client will be returned.
130
229
  #
230
+ # Raises an exception if the currently installed versioned client gem for the
231
+ # given API version does not support the CustomTargetingKeyService service.
232
+ # You can determine whether the method will succeed by calling
233
+ # {Google::Ads::AdManager.custom_targeting_key_service_available?}.
234
+ #
131
235
  # ## About CustomTargetingKeyService
132
236
  #
133
237
  # Provides methods for handling `CustomTargetingKey` objects.
@@ -147,6 +251,34 @@ module Google
147
251
  service_module.const_get(:Rest).const_get(:Client).new(&block)
148
252
  end
149
253
 
254
+ ##
255
+ # Determines whether the CustomTargetingKeyService service is supported by the current client.
256
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.custom_targeting_key_service}.
257
+ # If false, that method will raise an exception. This could happen if the given
258
+ # API version does not exist or does not support the CustomTargetingKeyService service,
259
+ # or if the versioned client gem needs an update to support the CustomTargetingKeyService service.
260
+ #
261
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
262
+ # Defaults to `:v1`.
263
+ # @return [boolean] Whether the service is available.
264
+ #
265
+ def self.custom_targeting_key_service_available? version: :v1
266
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
267
+ package_name = Google::Ads::AdManager
268
+ .constants
269
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
270
+ .first
271
+ return false unless package_name
272
+ service_module = Google::Ads::AdManager.const_get package_name
273
+ return false unless service_module.const_defined? :CustomTargetingKeyService
274
+ service_module = service_module.const_get :CustomTargetingKeyService
275
+ return false unless service_module.const_defined? :Rest
276
+ service_module = service_module.const_get :Rest
277
+ service_module.const_defined? :Client
278
+ rescue ::LoadError
279
+ false
280
+ end
281
+
150
282
  ##
151
283
  # Create a new client object for CustomTargetingValueService.
152
284
  #
@@ -158,6 +290,11 @@ module Google
158
290
  # supported by that API version, and the corresponding gem is available, the
159
291
  # appropriate versioned client will be returned.
160
292
  #
293
+ # Raises an exception if the currently installed versioned client gem for the
294
+ # given API version does not support the CustomTargetingValueService service.
295
+ # You can determine whether the method will succeed by calling
296
+ # {Google::Ads::AdManager.custom_targeting_value_service_available?}.
297
+ #
161
298
  # ## About CustomTargetingValueService
162
299
  #
163
300
  # Provides methods for handling `CustomTargetingValue` objects.
@@ -177,6 +314,34 @@ module Google
177
314
  service_module.const_get(:Rest).const_get(:Client).new(&block)
178
315
  end
179
316
 
317
+ ##
318
+ # Determines whether the CustomTargetingValueService service is supported by the current client.
319
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.custom_targeting_value_service}.
320
+ # If false, that method will raise an exception. This could happen if the given
321
+ # API version does not exist or does not support the CustomTargetingValueService service,
322
+ # or if the versioned client gem needs an update to support the CustomTargetingValueService service.
323
+ #
324
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
325
+ # Defaults to `:v1`.
326
+ # @return [boolean] Whether the service is available.
327
+ #
328
+ def self.custom_targeting_value_service_available? version: :v1
329
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
330
+ package_name = Google::Ads::AdManager
331
+ .constants
332
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
333
+ .first
334
+ return false unless package_name
335
+ service_module = Google::Ads::AdManager.const_get package_name
336
+ return false unless service_module.const_defined? :CustomTargetingValueService
337
+ service_module = service_module.const_get :CustomTargetingValueService
338
+ return false unless service_module.const_defined? :Rest
339
+ service_module = service_module.const_get :Rest
340
+ service_module.const_defined? :Client
341
+ rescue ::LoadError
342
+ false
343
+ end
344
+
180
345
  ##
181
346
  # Create a new client object for EntitySignalsMappingService.
182
347
  #
@@ -188,6 +353,11 @@ module Google
188
353
  # supported by that API version, and the corresponding gem is available, the
189
354
  # appropriate versioned client will be returned.
190
355
  #
356
+ # Raises an exception if the currently installed versioned client gem for the
357
+ # given API version does not support the EntitySignalsMappingService service.
358
+ # You can determine whether the method will succeed by calling
359
+ # {Google::Ads::AdManager.entity_signals_mapping_service_available?}.
360
+ #
191
361
  # ## About EntitySignalsMappingService
192
362
  #
193
363
  # Provides methods for handling `EntitySignalsMapping` objects.
@@ -207,6 +377,34 @@ module Google
207
377
  service_module.const_get(:Rest).const_get(:Client).new(&block)
208
378
  end
209
379
 
380
+ ##
381
+ # Determines whether the EntitySignalsMappingService service is supported by the current client.
382
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.entity_signals_mapping_service}.
383
+ # If false, that method will raise an exception. This could happen if the given
384
+ # API version does not exist or does not support the EntitySignalsMappingService service,
385
+ # or if the versioned client gem needs an update to support the EntitySignalsMappingService service.
386
+ #
387
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
388
+ # Defaults to `:v1`.
389
+ # @return [boolean] Whether the service is available.
390
+ #
391
+ def self.entity_signals_mapping_service_available? version: :v1
392
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
393
+ package_name = Google::Ads::AdManager
394
+ .constants
395
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
396
+ .first
397
+ return false unless package_name
398
+ service_module = Google::Ads::AdManager.const_get package_name
399
+ return false unless service_module.const_defined? :EntitySignalsMappingService
400
+ service_module = service_module.const_get :EntitySignalsMappingService
401
+ return false unless service_module.const_defined? :Rest
402
+ service_module = service_module.const_get :Rest
403
+ service_module.const_defined? :Client
404
+ rescue ::LoadError
405
+ false
406
+ end
407
+
210
408
  ##
211
409
  # Create a new client object for NetworkService.
212
410
  #
@@ -218,6 +416,11 @@ module Google
218
416
  # supported by that API version, and the corresponding gem is available, the
219
417
  # appropriate versioned client will be returned.
220
418
  #
419
+ # Raises an exception if the currently installed versioned client gem for the
420
+ # given API version does not support the NetworkService service.
421
+ # You can determine whether the method will succeed by calling
422
+ # {Google::Ads::AdManager.network_service_available?}.
423
+ #
221
424
  # ## About NetworkService
222
425
  #
223
426
  # Provides methods for handling Network objects.
@@ -237,6 +440,34 @@ module Google
237
440
  service_module.const_get(:Rest).const_get(:Client).new(&block)
238
441
  end
239
442
 
443
+ ##
444
+ # Determines whether the NetworkService service is supported by the current client.
445
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.network_service}.
446
+ # If false, that method will raise an exception. This could happen if the given
447
+ # API version does not exist or does not support the NetworkService service,
448
+ # or if the versioned client gem needs an update to support the NetworkService service.
449
+ #
450
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
451
+ # Defaults to `:v1`.
452
+ # @return [boolean] Whether the service is available.
453
+ #
454
+ def self.network_service_available? version: :v1
455
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
456
+ package_name = Google::Ads::AdManager
457
+ .constants
458
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
459
+ .first
460
+ return false unless package_name
461
+ service_module = Google::Ads::AdManager.const_get package_name
462
+ return false unless service_module.const_defined? :NetworkService
463
+ service_module = service_module.const_get :NetworkService
464
+ return false unless service_module.const_defined? :Rest
465
+ service_module = service_module.const_get :Rest
466
+ service_module.const_defined? :Client
467
+ rescue ::LoadError
468
+ false
469
+ end
470
+
240
471
  ##
241
472
  # Create a new client object for OrderService.
242
473
  #
@@ -248,6 +479,11 @@ module Google
248
479
  # supported by that API version, and the corresponding gem is available, the
249
480
  # appropriate versioned client will be returned.
250
481
  #
482
+ # Raises an exception if the currently installed versioned client gem for the
483
+ # given API version does not support the OrderService service.
484
+ # You can determine whether the method will succeed by calling
485
+ # {Google::Ads::AdManager.order_service_available?}.
486
+ #
251
487
  # ## About OrderService
252
488
  #
253
489
  # Provides methods for handling `Order` objects.
@@ -267,6 +503,34 @@ module Google
267
503
  service_module.const_get(:Rest).const_get(:Client).new(&block)
268
504
  end
269
505
 
506
+ ##
507
+ # Determines whether the OrderService service is supported by the current client.
508
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.order_service}.
509
+ # If false, that method will raise an exception. This could happen if the given
510
+ # API version does not exist or does not support the OrderService service,
511
+ # or if the versioned client gem needs an update to support the OrderService service.
512
+ #
513
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
514
+ # Defaults to `:v1`.
515
+ # @return [boolean] Whether the service is available.
516
+ #
517
+ def self.order_service_available? version: :v1
518
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
519
+ package_name = Google::Ads::AdManager
520
+ .constants
521
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
522
+ .first
523
+ return false unless package_name
524
+ service_module = Google::Ads::AdManager.const_get package_name
525
+ return false unless service_module.const_defined? :OrderService
526
+ service_module = service_module.const_get :OrderService
527
+ return false unless service_module.const_defined? :Rest
528
+ service_module = service_module.const_get :Rest
529
+ service_module.const_defined? :Client
530
+ rescue ::LoadError
531
+ false
532
+ end
533
+
270
534
  ##
271
535
  # Create a new client object for PlacementService.
272
536
  #
@@ -278,6 +542,11 @@ module Google
278
542
  # supported by that API version, and the corresponding gem is available, the
279
543
  # appropriate versioned client will be returned.
280
544
  #
545
+ # Raises an exception if the currently installed versioned client gem for the
546
+ # given API version does not support the PlacementService service.
547
+ # You can determine whether the method will succeed by calling
548
+ # {Google::Ads::AdManager.placement_service_available?}.
549
+ #
281
550
  # ## About PlacementService
282
551
  #
283
552
  # Provides methods for handling `Placement` objects.
@@ -297,6 +566,34 @@ module Google
297
566
  service_module.const_get(:Rest).const_get(:Client).new(&block)
298
567
  end
299
568
 
569
+ ##
570
+ # Determines whether the PlacementService service is supported by the current client.
571
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.placement_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 PlacementService service,
574
+ # or if the versioned client gem needs an update to support the PlacementService service.
575
+ #
576
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
577
+ # Defaults to `:v1`.
578
+ # @return [boolean] Whether the service is available.
579
+ #
580
+ def self.placement_service_available? version: :v1
581
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
582
+ package_name = Google::Ads::AdManager
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::Ads::AdManager.const_get package_name
588
+ return false unless service_module.const_defined? :PlacementService
589
+ service_module = service_module.const_get :PlacementService
590
+ return false unless service_module.const_defined? :Rest
591
+ service_module = service_module.const_get :Rest
592
+ service_module.const_defined? :Client
593
+ rescue ::LoadError
594
+ false
595
+ end
596
+
300
597
  ##
301
598
  # Create a new client object for ReportService.
302
599
  #
@@ -308,6 +605,11 @@ module Google
308
605
  # supported by that API version, and the corresponding gem is available, the
309
606
  # appropriate versioned client will be returned.
310
607
  #
608
+ # Raises an exception if the currently installed versioned client gem for the
609
+ # given API version does not support the ReportService service.
610
+ # You can determine whether the method will succeed by calling
611
+ # {Google::Ads::AdManager.report_service_available?}.
612
+ #
311
613
  # ## About ReportService
312
614
  #
313
615
  # Provides methods for interacting with reports.
@@ -327,6 +629,34 @@ module Google
327
629
  service_module.const_get(:Rest).const_get(:Client).new(&block)
328
630
  end
329
631
 
632
+ ##
633
+ # Determines whether the ReportService service is supported by the current client.
634
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.report_service}.
635
+ # If false, that method will raise an exception. This could happen if the given
636
+ # API version does not exist or does not support the ReportService service,
637
+ # or if the versioned client gem needs an update to support the ReportService service.
638
+ #
639
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
640
+ # Defaults to `:v1`.
641
+ # @return [boolean] Whether the service is available.
642
+ #
643
+ def self.report_service_available? version: :v1
644
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
645
+ package_name = Google::Ads::AdManager
646
+ .constants
647
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
648
+ .first
649
+ return false unless package_name
650
+ service_module = Google::Ads::AdManager.const_get package_name
651
+ return false unless service_module.const_defined? :ReportService
652
+ service_module = service_module.const_get :ReportService
653
+ return false unless service_module.const_defined? :Rest
654
+ service_module = service_module.const_get :Rest
655
+ service_module.const_defined? :Client
656
+ rescue ::LoadError
657
+ false
658
+ end
659
+
330
660
  ##
331
661
  # Create a new client object for RoleService.
332
662
  #
@@ -338,6 +668,11 @@ module Google
338
668
  # supported by that API version, and the corresponding gem is available, the
339
669
  # appropriate versioned client will be returned.
340
670
  #
671
+ # Raises an exception if the currently installed versioned client gem for the
672
+ # given API version does not support the RoleService service.
673
+ # You can determine whether the method will succeed by calling
674
+ # {Google::Ads::AdManager.role_service_available?}.
675
+ #
341
676
  # ## About RoleService
342
677
  #
343
678
  # Provides methods for handling `Role` objects.
@@ -357,6 +692,34 @@ module Google
357
692
  service_module.const_get(:Rest).const_get(:Client).new(&block)
358
693
  end
359
694
 
695
+ ##
696
+ # Determines whether the RoleService service is supported by the current client.
697
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.role_service}.
698
+ # If false, that method will raise an exception. This could happen if the given
699
+ # API version does not exist or does not support the RoleService service,
700
+ # or if the versioned client gem needs an update to support the RoleService service.
701
+ #
702
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
703
+ # Defaults to `:v1`.
704
+ # @return [boolean] Whether the service is available.
705
+ #
706
+ def self.role_service_available? version: :v1
707
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
708
+ package_name = Google::Ads::AdManager
709
+ .constants
710
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
711
+ .first
712
+ return false unless package_name
713
+ service_module = Google::Ads::AdManager.const_get package_name
714
+ return false unless service_module.const_defined? :RoleService
715
+ service_module = service_module.const_get :RoleService
716
+ return false unless service_module.const_defined? :Rest
717
+ service_module = service_module.const_get :Rest
718
+ service_module.const_defined? :Client
719
+ rescue ::LoadError
720
+ false
721
+ end
722
+
360
723
  ##
361
724
  # Create a new client object for TaxonomyCategoryService.
362
725
  #
@@ -368,6 +731,11 @@ module Google
368
731
  # supported by that API version, and the corresponding gem is available, the
369
732
  # appropriate versioned client will be returned.
370
733
  #
734
+ # Raises an exception if the currently installed versioned client gem for the
735
+ # given API version does not support the TaxonomyCategoryService service.
736
+ # You can determine whether the method will succeed by calling
737
+ # {Google::Ads::AdManager.taxonomy_category_service_available?}.
738
+ #
371
739
  # ## About TaxonomyCategoryService
372
740
  #
373
741
  # Provides methods for handling `TaxonomyCategory` objects.
@@ -387,6 +755,34 @@ module Google
387
755
  service_module.const_get(:Rest).const_get(:Client).new(&block)
388
756
  end
389
757
 
758
+ ##
759
+ # Determines whether the TaxonomyCategoryService service is supported by the current client.
760
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.taxonomy_category_service}.
761
+ # If false, that method will raise an exception. This could happen if the given
762
+ # API version does not exist or does not support the TaxonomyCategoryService service,
763
+ # or if the versioned client gem needs an update to support the TaxonomyCategoryService service.
764
+ #
765
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
766
+ # Defaults to `:v1`.
767
+ # @return [boolean] Whether the service is available.
768
+ #
769
+ def self.taxonomy_category_service_available? version: :v1
770
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
771
+ package_name = Google::Ads::AdManager
772
+ .constants
773
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
774
+ .first
775
+ return false unless package_name
776
+ service_module = Google::Ads::AdManager.const_get package_name
777
+ return false unless service_module.const_defined? :TaxonomyCategoryService
778
+ service_module = service_module.const_get :TaxonomyCategoryService
779
+ return false unless service_module.const_defined? :Rest
780
+ service_module = service_module.const_get :Rest
781
+ service_module.const_defined? :Client
782
+ rescue ::LoadError
783
+ false
784
+ end
785
+
390
786
  ##
391
787
  # Create a new client object for UserService.
392
788
  #
@@ -398,6 +794,11 @@ module Google
398
794
  # supported by that API version, and the corresponding gem is available, the
399
795
  # appropriate versioned client will be returned.
400
796
  #
797
+ # Raises an exception if the currently installed versioned client gem for the
798
+ # given API version does not support the UserService service.
799
+ # You can determine whether the method will succeed by calling
800
+ # {Google::Ads::AdManager.user_service_available?}.
801
+ #
401
802
  # ## About UserService
402
803
  #
403
804
  # Provides methods for handling User objects.
@@ -416,6 +817,34 @@ module Google
416
817
  service_module = Google::Ads::AdManager.const_get(package_name).const_get(:UserService)
417
818
  service_module.const_get(:Rest).const_get(:Client).new(&block)
418
819
  end
820
+
821
+ ##
822
+ # Determines whether the UserService service is supported by the current client.
823
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.user_service}.
824
+ # If false, that method will raise an exception. This could happen if the given
825
+ # API version does not exist or does not support the UserService service,
826
+ # or if the versioned client gem needs an update to support the UserService service.
827
+ #
828
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
829
+ # Defaults to `:v1`.
830
+ # @return [boolean] Whether the service is available.
831
+ #
832
+ def self.user_service_available? version: :v1
833
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
834
+ package_name = Google::Ads::AdManager
835
+ .constants
836
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
837
+ .first
838
+ return false unless package_name
839
+ service_module = Google::Ads::AdManager.const_get package_name
840
+ return false unless service_module.const_defined? :UserService
841
+ service_module = service_module.const_get :UserService
842
+ return false unless service_module.const_defined? :Rest
843
+ service_module = service_module.const_get :Rest
844
+ service_module.const_defined? :Client
845
+ rescue ::LoadError
846
+ false
847
+ end
419
848
  end
420
849
  end
421
850
  end
metadata CHANGED
@@ -1,35 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-ads-ad_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.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-28 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-ads-ad_manager-v1
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0.0'
20
- - - "<"
16
+ - - "~>"
21
17
  - !ruby/object:Gem::Version
22
- version: 2.a
18
+ version: '1.0'
23
19
  type: :runtime
24
20
  prerelease: false
25
21
  version_requirements: !ruby/object:Gem::Requirement
26
22
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '0.0'
30
- - - "<"
23
+ - - "~>"
31
24
  - !ruby/object:Gem::Version
32
- version: 2.a
25
+ version: '1.0'
33
26
  - !ruby/object:Gem::Dependency
34
27
  name: google-cloud-core
35
28
  requirement: !ruby/object:Gem::Requirement
@@ -62,7 +55,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
55
  licenses:
63
56
  - Apache-2.0
64
57
  metadata: {}
65
- post_install_message:
66
58
  rdoc_options: []
67
59
  require_paths:
68
60
  - lib
@@ -70,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
62
  requirements:
71
63
  - - ">="
72
64
  - !ruby/object:Gem::Version
73
- version: '2.7'
65
+ version: '3.0'
74
66
  required_rubygems_version: !ruby/object:Gem::Requirement
75
67
  requirements:
76
68
  - - ">="
77
69
  - !ruby/object:Gem::Version
78
70
  version: '0'
79
71
  requirements: []
80
- rubygems_version: 3.5.21
81
- signing_key:
72
+ rubygems_version: 3.6.3
82
73
  specification_version: 4
83
74
  summary: Manage your Ad Manager inventory, run reports and more.
84
75
  test_files: []