google-ads-ad_manager 1.0.1 → 2.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: e7d542414d999c6207097cbadd911991487187b72b83df02b61545a5a15355ca
4
- data.tar.gz: 25990b5fe3ba8cab7301f157b53978a4b2b0cdd9bee74561398e34be7c88ffb6
3
+ metadata.gz: 8bd7ced0bdb3c6f9175d69c6489d8ae53edc6c9fc028cd6bcaacabcfd29ecbe7
4
+ data.tar.gz: 64868b9f77979f79413054e43c5e58f8eec26b5457818e9d8bd9f54223054efb
5
5
  SHA512:
6
- metadata.gz: ab4bb30f0386f19e07fda8309de3020c307f4fdf3f8f8b28d718de9d6a1dc60fd9be3a9ea07ea53b99c25f5d2fd53f2e812c1564e760aea195b5c4211db3420a
7
- data.tar.gz: 5c5362dae2718bdb2e7a4b34039b39d531f56c17dee76c1c094e6be547170ef1d01bf6e4d5657e07f8330772e175a8f1f098abb5b487c02ae3f381af4150253a
6
+ metadata.gz: 500d66eedc92aca17cb372498bff8a6ca266b80497b185362823731efb989d8e310d9b4484f80eca12d9462486f06135c457851a2e780b3b6539e88bbcc94921
7
+ data.tar.gz: ce0cb0be685314eb6e6a80d0e157b47212764ec3c80302623e6aad7357be4b09f82ac20e009d09b60be497831b9643fb4b5af20154869c6c6da333d291ea2b2f
data/AUTHENTICATION.md CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
56
56
  ```ruby
57
57
  require "google/ads/ad_manager"
58
58
 
59
- client = Google::Ads::AdManager.ad_unit_service do |config|
59
+ client = Google::Ads::AdManager.ad_break_service do |config|
60
60
  config.credentials = "path/to/credentialfile.json"
61
61
  end
62
62
  ```
@@ -70,7 +70,7 @@ Google::Ads::AdManager.configure do |config|
70
70
  config.credentials = "path/to/credentialfile.json"
71
71
  end
72
72
 
73
- client = Google::Ads::AdManager.ad_unit_service
73
+ client = Google::Ads::AdManager.ad_break_service
74
74
  ```
75
75
 
76
76
  ### Environment Variables
@@ -100,7 +100,7 @@ require "google/ads/ad_manager"
100
100
 
101
101
  ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102
102
 
103
- client = Google::Ads::AdManager.ad_unit_service
103
+ client = Google::Ads::AdManager.ad_break_service
104
104
  ```
105
105
 
106
106
  ### Local ADC file
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Ads
22
22
  module AdManager
23
- VERSION = "1.0.1"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -27,6 +27,69 @@ require "googleauth"
27
27
  module Google
28
28
  module Ads
29
29
  module AdManager
30
+ ##
31
+ # Create a new client object for AdBreakService.
32
+ #
33
+ # By default, this returns an instance of
34
+ # [Google::Ads::AdManager::V1::AdBreakService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/AdBreakService/Rest/Client)
35
+ # for a REST client for version V1 of the API.
36
+ # However, you can specify a different API version by passing it in the
37
+ # `version` parameter. If the AdBreakService service is
38
+ # supported by that API version, and the corresponding gem is available, the
39
+ # appropriate versioned client will be returned.
40
+ #
41
+ # Raises an exception if the currently installed versioned client gem for the
42
+ # given API version does not support the AdBreakService service.
43
+ # You can determine whether the method will succeed by calling
44
+ # {Google::Ads::AdManager.ad_break_service_available?}.
45
+ #
46
+ # ## About AdBreakService
47
+ #
48
+ # Provides methods for handling `AdBreak` objects.
49
+ #
50
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
51
+ # Defaults to `:v1`.
52
+ # @return [::Object] A client object for the specified version.
53
+ #
54
+ def self.ad_break_service version: :v1, &block
55
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
56
+
57
+ package_name = Google::Ads::AdManager
58
+ .constants
59
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
60
+ .first
61
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:AdBreakService)
62
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
63
+ end
64
+
65
+ ##
66
+ # Determines whether the AdBreakService service is supported by the current client.
67
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.ad_break_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 AdBreakService service,
70
+ # or if the versioned client gem needs an update to support the AdBreakService 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_break_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? :AdBreakService
85
+ service_module = service_module.const_get :AdBreakService
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
+
30
93
  ##
31
94
  # Create a new client object for AdUnitService.
32
95
  #
@@ -90,6 +153,69 @@ module Google
90
153
  false
91
154
  end
92
155
 
156
+ ##
157
+ # Create a new client object for BandwidthGroupService.
158
+ #
159
+ # By default, this returns an instance of
160
+ # [Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/BandwidthGroupService/Rest/Client)
161
+ # for a REST client for version V1 of the API.
162
+ # However, you can specify a different API version by passing it in the
163
+ # `version` parameter. If the BandwidthGroupService service is
164
+ # supported by that API version, and the corresponding gem is available, the
165
+ # appropriate versioned client will be returned.
166
+ #
167
+ # Raises an exception if the currently installed versioned client gem for the
168
+ # given API version does not support the BandwidthGroupService service.
169
+ # You can determine whether the method will succeed by calling
170
+ # {Google::Ads::AdManager.bandwidth_group_service_available?}.
171
+ #
172
+ # ## About BandwidthGroupService
173
+ #
174
+ # Provides methods for handling `BandwidthGroup` objects.
175
+ #
176
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
177
+ # Defaults to `:v1`.
178
+ # @return [::Object] A client object for the specified version.
179
+ #
180
+ def self.bandwidth_group_service version: :v1, &block
181
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
182
+
183
+ package_name = Google::Ads::AdManager
184
+ .constants
185
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
186
+ .first
187
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:BandwidthGroupService)
188
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
189
+ end
190
+
191
+ ##
192
+ # Determines whether the BandwidthGroupService service is supported by the current client.
193
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.bandwidth_group_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 BandwidthGroupService service,
196
+ # or if the versioned client gem needs an update to support the BandwidthGroupService 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.bandwidth_group_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? :BandwidthGroupService
211
+ service_module = service_module.const_get :BandwidthGroupService
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
+
93
219
  ##
94
220
  # Create a new client object for CompanyService.
95
221
  #
@@ -342,6 +468,69 @@ module Google
342
468
  false
343
469
  end
344
470
 
471
+ ##
472
+ # Create a new client object for DeviceCategoryService.
473
+ #
474
+ # By default, this returns an instance of
475
+ # [Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/DeviceCategoryService/Rest/Client)
476
+ # for a REST client for version V1 of the API.
477
+ # However, you can specify a different API version by passing it in the
478
+ # `version` parameter. If the DeviceCategoryService service is
479
+ # supported by that API version, and the corresponding gem is available, the
480
+ # appropriate versioned client will be returned.
481
+ #
482
+ # Raises an exception if the currently installed versioned client gem for the
483
+ # given API version does not support the DeviceCategoryService service.
484
+ # You can determine whether the method will succeed by calling
485
+ # {Google::Ads::AdManager.device_category_service_available?}.
486
+ #
487
+ # ## About DeviceCategoryService
488
+ #
489
+ # Provides methods for handling `DeviceCategory` objects.
490
+ #
491
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
492
+ # Defaults to `:v1`.
493
+ # @return [::Object] A client object for the specified version.
494
+ #
495
+ def self.device_category_service version: :v1, &block
496
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
497
+
498
+ package_name = Google::Ads::AdManager
499
+ .constants
500
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
501
+ .first
502
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:DeviceCategoryService)
503
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
504
+ end
505
+
506
+ ##
507
+ # Determines whether the DeviceCategoryService service is supported by the current client.
508
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.device_category_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 DeviceCategoryService service,
511
+ # or if the versioned client gem needs an update to support the DeviceCategoryService 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.device_category_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? :DeviceCategoryService
526
+ service_module = service_module.const_get :DeviceCategoryService
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
+
345
534
  ##
346
535
  # Create a new client object for EntitySignalsMappingService.
347
536
  #
@@ -405,6 +594,69 @@ module Google
405
594
  false
406
595
  end
407
596
 
597
+ ##
598
+ # Create a new client object for GeoTargetService.
599
+ #
600
+ # By default, this returns an instance of
601
+ # [Google::Ads::AdManager::V1::GeoTargetService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/GeoTargetService/Rest/Client)
602
+ # for a REST client for version V1 of the API.
603
+ # However, you can specify a different API version by passing it in the
604
+ # `version` parameter. If the GeoTargetService service is
605
+ # supported by that API version, and the corresponding gem is available, the
606
+ # appropriate versioned client will be returned.
607
+ #
608
+ # Raises an exception if the currently installed versioned client gem for the
609
+ # given API version does not support the GeoTargetService service.
610
+ # You can determine whether the method will succeed by calling
611
+ # {Google::Ads::AdManager.geo_target_service_available?}.
612
+ #
613
+ # ## About GeoTargetService
614
+ #
615
+ # Provides methods for handling `GeoTarget` objects.
616
+ #
617
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
618
+ # Defaults to `:v1`.
619
+ # @return [::Object] A client object for the specified version.
620
+ #
621
+ def self.geo_target_service version: :v1, &block
622
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
623
+
624
+ package_name = Google::Ads::AdManager
625
+ .constants
626
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
627
+ .first
628
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:GeoTargetService)
629
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
630
+ end
631
+
632
+ ##
633
+ # Determines whether the GeoTargetService service is supported by the current client.
634
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.geo_target_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 GeoTargetService service,
637
+ # or if the versioned client gem needs an update to support the GeoTargetService 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.geo_target_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? :GeoTargetService
652
+ service_module = service_module.const_get :GeoTargetService
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
+
408
660
  ##
409
661
  # Create a new client object for NetworkService.
410
662
  #
@@ -423,7 +675,7 @@ module Google
423
675
  #
424
676
  # ## About NetworkService
425
677
  #
426
- # Provides methods for handling Network objects.
678
+ # Provides methods for handling `Network` objects.
427
679
  #
428
680
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
429
681
  # Defaults to `:v1`.
@@ -468,6 +720,132 @@ module Google
468
720
  false
469
721
  end
470
722
 
723
+ ##
724
+ # Create a new client object for OperatingSystemService.
725
+ #
726
+ # By default, this returns an instance of
727
+ # [Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/OperatingSystemService/Rest/Client)
728
+ # for a REST client for version V1 of the API.
729
+ # However, you can specify a different API version by passing it in the
730
+ # `version` parameter. If the OperatingSystemService service is
731
+ # supported by that API version, and the corresponding gem is available, the
732
+ # appropriate versioned client will be returned.
733
+ #
734
+ # Raises an exception if the currently installed versioned client gem for the
735
+ # given API version does not support the OperatingSystemService service.
736
+ # You can determine whether the method will succeed by calling
737
+ # {Google::Ads::AdManager.operating_system_service_available?}.
738
+ #
739
+ # ## About OperatingSystemService
740
+ #
741
+ # Provides methods for handling `OperatingSystem` objects.
742
+ #
743
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
744
+ # Defaults to `:v1`.
745
+ # @return [::Object] A client object for the specified version.
746
+ #
747
+ def self.operating_system_service version: :v1, &block
748
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
749
+
750
+ package_name = Google::Ads::AdManager
751
+ .constants
752
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
753
+ .first
754
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OperatingSystemService)
755
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
756
+ end
757
+
758
+ ##
759
+ # Determines whether the OperatingSystemService service is supported by the current client.
760
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.operating_system_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 OperatingSystemService service,
763
+ # or if the versioned client gem needs an update to support the OperatingSystemService 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.operating_system_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? :OperatingSystemService
778
+ service_module = service_module.const_get :OperatingSystemService
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
+
786
+ ##
787
+ # Create a new client object for OperatingSystemVersionService.
788
+ #
789
+ # By default, this returns an instance of
790
+ # [Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/OperatingSystemVersionService/Rest/Client)
791
+ # for a REST client for version V1 of the API.
792
+ # However, you can specify a different API version by passing it in the
793
+ # `version` parameter. If the OperatingSystemVersionService service is
794
+ # supported by that API version, and the corresponding gem is available, the
795
+ # appropriate versioned client will be returned.
796
+ #
797
+ # Raises an exception if the currently installed versioned client gem for the
798
+ # given API version does not support the OperatingSystemVersionService service.
799
+ # You can determine whether the method will succeed by calling
800
+ # {Google::Ads::AdManager.operating_system_version_service_available?}.
801
+ #
802
+ # ## About OperatingSystemVersionService
803
+ #
804
+ # Provides methods for handling `OperatingSystemVersion` objects.
805
+ #
806
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
807
+ # Defaults to `:v1`.
808
+ # @return [::Object] A client object for the specified version.
809
+ #
810
+ def self.operating_system_version_service version: :v1, &block
811
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
812
+
813
+ package_name = Google::Ads::AdManager
814
+ .constants
815
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
816
+ .first
817
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OperatingSystemVersionService)
818
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
819
+ end
820
+
821
+ ##
822
+ # Determines whether the OperatingSystemVersionService service is supported by the current client.
823
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.operating_system_version_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 OperatingSystemVersionService service,
826
+ # or if the versioned client gem needs an update to support the OperatingSystemVersionService 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.operating_system_version_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? :OperatingSystemVersionService
841
+ service_module = service_module.const_get :OperatingSystemVersionService
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
848
+
471
849
  ##
472
850
  # Create a new client object for OrderService.
473
851
  #
@@ -594,6 +972,195 @@ module Google
594
972
  false
595
973
  end
596
974
 
975
+ ##
976
+ # Create a new client object for PrivateAuctionDealService.
977
+ #
978
+ # By default, this returns an instance of
979
+ # [Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/PrivateAuctionDealService/Rest/Client)
980
+ # for a REST client for version V1 of the API.
981
+ # However, you can specify a different API version by passing it in the
982
+ # `version` parameter. If the PrivateAuctionDealService service is
983
+ # supported by that API version, and the corresponding gem is available, the
984
+ # appropriate versioned client will be returned.
985
+ #
986
+ # Raises an exception if the currently installed versioned client gem for the
987
+ # given API version does not support the PrivateAuctionDealService service.
988
+ # You can determine whether the method will succeed by calling
989
+ # {Google::Ads::AdManager.private_auction_deal_service_available?}.
990
+ #
991
+ # ## About PrivateAuctionDealService
992
+ #
993
+ # Provides methods for handling `PrivateAuctionDeal` objects.
994
+ #
995
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
996
+ # Defaults to `:v1`.
997
+ # @return [::Object] A client object for the specified version.
998
+ #
999
+ def self.private_auction_deal_service version: :v1, &block
1000
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1001
+
1002
+ package_name = Google::Ads::AdManager
1003
+ .constants
1004
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1005
+ .first
1006
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PrivateAuctionDealService)
1007
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
1008
+ end
1009
+
1010
+ ##
1011
+ # Determines whether the PrivateAuctionDealService service is supported by the current client.
1012
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.private_auction_deal_service}.
1013
+ # If false, that method will raise an exception. This could happen if the given
1014
+ # API version does not exist or does not support the PrivateAuctionDealService service,
1015
+ # or if the versioned client gem needs an update to support the PrivateAuctionDealService service.
1016
+ #
1017
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1018
+ # Defaults to `:v1`.
1019
+ # @return [boolean] Whether the service is available.
1020
+ #
1021
+ def self.private_auction_deal_service_available? version: :v1
1022
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1023
+ package_name = Google::Ads::AdManager
1024
+ .constants
1025
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1026
+ .first
1027
+ return false unless package_name
1028
+ service_module = Google::Ads::AdManager.const_get package_name
1029
+ return false unless service_module.const_defined? :PrivateAuctionDealService
1030
+ service_module = service_module.const_get :PrivateAuctionDealService
1031
+ return false unless service_module.const_defined? :Rest
1032
+ service_module = service_module.const_get :Rest
1033
+ service_module.const_defined? :Client
1034
+ rescue ::LoadError
1035
+ false
1036
+ end
1037
+
1038
+ ##
1039
+ # Create a new client object for PrivateAuctionService.
1040
+ #
1041
+ # By default, this returns an instance of
1042
+ # [Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/PrivateAuctionService/Rest/Client)
1043
+ # for a REST client for version V1 of the API.
1044
+ # However, you can specify a different API version by passing it in the
1045
+ # `version` parameter. If the PrivateAuctionService service is
1046
+ # supported by that API version, and the corresponding gem is available, the
1047
+ # appropriate versioned client will be returned.
1048
+ #
1049
+ # Raises an exception if the currently installed versioned client gem for the
1050
+ # given API version does not support the PrivateAuctionService service.
1051
+ # You can determine whether the method will succeed by calling
1052
+ # {Google::Ads::AdManager.private_auction_service_available?}.
1053
+ #
1054
+ # ## About PrivateAuctionService
1055
+ #
1056
+ # Provides methods for handling `PrivateAuction` objects.
1057
+ #
1058
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1059
+ # Defaults to `:v1`.
1060
+ # @return [::Object] A client object for the specified version.
1061
+ #
1062
+ def self.private_auction_service version: :v1, &block
1063
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1064
+
1065
+ package_name = Google::Ads::AdManager
1066
+ .constants
1067
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1068
+ .first
1069
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PrivateAuctionService)
1070
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
1071
+ end
1072
+
1073
+ ##
1074
+ # Determines whether the PrivateAuctionService service is supported by the current client.
1075
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.private_auction_service}.
1076
+ # If false, that method will raise an exception. This could happen if the given
1077
+ # API version does not exist or does not support the PrivateAuctionService service,
1078
+ # or if the versioned client gem needs an update to support the PrivateAuctionService service.
1079
+ #
1080
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1081
+ # Defaults to `:v1`.
1082
+ # @return [boolean] Whether the service is available.
1083
+ #
1084
+ def self.private_auction_service_available? version: :v1
1085
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1086
+ package_name = Google::Ads::AdManager
1087
+ .constants
1088
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1089
+ .first
1090
+ return false unless package_name
1091
+ service_module = Google::Ads::AdManager.const_get package_name
1092
+ return false unless service_module.const_defined? :PrivateAuctionService
1093
+ service_module = service_module.const_get :PrivateAuctionService
1094
+ return false unless service_module.const_defined? :Rest
1095
+ service_module = service_module.const_get :Rest
1096
+ service_module.const_defined? :Client
1097
+ rescue ::LoadError
1098
+ false
1099
+ end
1100
+
1101
+ ##
1102
+ # Create a new client object for ProgrammaticBuyerService.
1103
+ #
1104
+ # By default, this returns an instance of
1105
+ # [Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/ProgrammaticBuyerService/Rest/Client)
1106
+ # for a REST client for version V1 of the API.
1107
+ # However, you can specify a different API version by passing it in the
1108
+ # `version` parameter. If the ProgrammaticBuyerService service is
1109
+ # supported by that API version, and the corresponding gem is available, the
1110
+ # appropriate versioned client will be returned.
1111
+ #
1112
+ # Raises an exception if the currently installed versioned client gem for the
1113
+ # given API version does not support the ProgrammaticBuyerService service.
1114
+ # You can determine whether the method will succeed by calling
1115
+ # {Google::Ads::AdManager.programmatic_buyer_service_available?}.
1116
+ #
1117
+ # ## About ProgrammaticBuyerService
1118
+ #
1119
+ # Provides methods for handling `ProgrammaticBuyer` objects.
1120
+ #
1121
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1122
+ # Defaults to `:v1`.
1123
+ # @return [::Object] A client object for the specified version.
1124
+ #
1125
+ def self.programmatic_buyer_service version: :v1, &block
1126
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1127
+
1128
+ package_name = Google::Ads::AdManager
1129
+ .constants
1130
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1131
+ .first
1132
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:ProgrammaticBuyerService)
1133
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
1134
+ end
1135
+
1136
+ ##
1137
+ # Determines whether the ProgrammaticBuyerService service is supported by the current client.
1138
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.programmatic_buyer_service}.
1139
+ # If false, that method will raise an exception. This could happen if the given
1140
+ # API version does not exist or does not support the ProgrammaticBuyerService service,
1141
+ # or if the versioned client gem needs an update to support the ProgrammaticBuyerService service.
1142
+ #
1143
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1144
+ # Defaults to `:v1`.
1145
+ # @return [boolean] Whether the service is available.
1146
+ #
1147
+ def self.programmatic_buyer_service_available? version: :v1
1148
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1149
+ package_name = Google::Ads::AdManager
1150
+ .constants
1151
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1152
+ .first
1153
+ return false unless package_name
1154
+ service_module = Google::Ads::AdManager.const_get package_name
1155
+ return false unless service_module.const_defined? :ProgrammaticBuyerService
1156
+ service_module = service_module.const_get :ProgrammaticBuyerService
1157
+ return false unless service_module.const_defined? :Rest
1158
+ service_module = service_module.const_get :Rest
1159
+ service_module.const_defined? :Client
1160
+ rescue ::LoadError
1161
+ false
1162
+ end
1163
+
597
1164
  ##
598
1165
  # Create a new client object for ReportService.
599
1166
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-ads-ad_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.0'
18
+ version: '2.0'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '1.0'
25
+ version: '2.0'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: google-cloud-core
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.6.8
72
+ rubygems_version: 3.6.9
73
73
  specification_version: 4
74
74
  summary: Manage your Ad Manager inventory, run reports and more.
75
75
  test_files: []