google-ads-ad_manager 4.1.0 → 4.2.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 +4 -4
- data/lib/google/ads/ad_manager/version.rb +1 -1
- data/lib/google/ads/ad_manager.rb +442 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4d537c88374b19565c5f91d2046513b76f733594becff19879055229e0441c6
|
|
4
|
+
data.tar.gz: b30e511b8d61c9981a81c54e13ea24361ebc0957d9d6971c73a905f1d4f74692
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 218493ed3eb92c62d959874e7fb6bc33e82904c3251a7f6a1acf0c58f2bcbbe9f2f3f3224d6c68bc721f96c30382f2403be19858d785fb91afed911721cf8f90
|
|
7
|
+
data.tar.gz: 2dcc8781c30c63ef1fd3316ba5b8ac401efe5709fd06c21537dbbd3295e1981a3df5401d1da07f9085504d1bb8cb2507f3bfaabcc1f6051eff45c21a22213a27
|
|
@@ -153,6 +153,132 @@ module Google
|
|
|
153
153
|
false
|
|
154
154
|
end
|
|
155
155
|
|
|
156
|
+
##
|
|
157
|
+
# Create a new client object for AdRuleService.
|
|
158
|
+
#
|
|
159
|
+
# By default, this returns an instance of
|
|
160
|
+
# [Google::Ads::AdManager::V1::AdRuleService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/AdRuleService/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 AdRuleService 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 AdRuleService service.
|
|
169
|
+
# You can determine whether the method will succeed by calling
|
|
170
|
+
# {Google::Ads::AdManager.ad_rule_service_available?}.
|
|
171
|
+
#
|
|
172
|
+
# ## About AdRuleService
|
|
173
|
+
#
|
|
174
|
+
# Provides methods for handling `AdRule` 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.ad_rule_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(:AdRuleService)
|
|
188
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
##
|
|
192
|
+
# Determines whether the AdRuleService service is supported by the current client.
|
|
193
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.ad_rule_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 AdRuleService service,
|
|
196
|
+
# or if the versioned client gem needs an update to support the AdRuleService 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.ad_rule_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? :AdRuleService
|
|
211
|
+
service_module = service_module.const_get :AdRuleService
|
|
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
|
+
|
|
219
|
+
##
|
|
220
|
+
# Create a new client object for AdSpotService.
|
|
221
|
+
#
|
|
222
|
+
# By default, this returns an instance of
|
|
223
|
+
# [Google::Ads::AdManager::V1::AdSpotService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/AdSpotService/Rest/Client)
|
|
224
|
+
# for a REST client for version V1 of the API.
|
|
225
|
+
# However, you can specify a different API version by passing it in the
|
|
226
|
+
# `version` parameter. If the AdSpotService service is
|
|
227
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
228
|
+
# appropriate versioned client will be returned.
|
|
229
|
+
#
|
|
230
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
231
|
+
# given API version does not support the AdSpotService service.
|
|
232
|
+
# You can determine whether the method will succeed by calling
|
|
233
|
+
# {Google::Ads::AdManager.ad_spot_service_available?}.
|
|
234
|
+
#
|
|
235
|
+
# ## About AdSpotService
|
|
236
|
+
#
|
|
237
|
+
# Provides methods for handling `AdSpot` objects.
|
|
238
|
+
#
|
|
239
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
240
|
+
# Defaults to `:v1`.
|
|
241
|
+
# @return [::Object] A client object for the specified version.
|
|
242
|
+
#
|
|
243
|
+
def self.ad_spot_service version: :v1, &block
|
|
244
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
245
|
+
|
|
246
|
+
package_name = Google::Ads::AdManager
|
|
247
|
+
.constants
|
|
248
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
249
|
+
.first
|
|
250
|
+
service_module = Google::Ads::AdManager.const_get(package_name).const_get(:AdSpotService)
|
|
251
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
##
|
|
255
|
+
# Determines whether the AdSpotService service is supported by the current client.
|
|
256
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.ad_spot_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 AdSpotService service,
|
|
259
|
+
# or if the versioned client gem needs an update to support the AdSpotService 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.ad_spot_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? :AdSpotService
|
|
274
|
+
service_module = service_module.const_get :AdSpotService
|
|
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
|
+
|
|
156
282
|
##
|
|
157
283
|
# Create a new client object for AdUnitService.
|
|
158
284
|
#
|
|
@@ -531,6 +657,69 @@ module Google
|
|
|
531
657
|
false
|
|
532
658
|
end
|
|
533
659
|
|
|
660
|
+
##
|
|
661
|
+
# Create a new client object for CdnConfigService.
|
|
662
|
+
#
|
|
663
|
+
# By default, this returns an instance of
|
|
664
|
+
# [Google::Ads::AdManager::V1::CdnConfigService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/CdnConfigService/Rest/Client)
|
|
665
|
+
# for a REST client for version V1 of the API.
|
|
666
|
+
# However, you can specify a different API version by passing it in the
|
|
667
|
+
# `version` parameter. If the CdnConfigService service is
|
|
668
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
669
|
+
# appropriate versioned client will be returned.
|
|
670
|
+
#
|
|
671
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
672
|
+
# given API version does not support the CdnConfigService service.
|
|
673
|
+
# You can determine whether the method will succeed by calling
|
|
674
|
+
# {Google::Ads::AdManager.cdn_config_service_available?}.
|
|
675
|
+
#
|
|
676
|
+
# ## About CdnConfigService
|
|
677
|
+
#
|
|
678
|
+
# Provides methods for handling `CdnConfig` objects.
|
|
679
|
+
#
|
|
680
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
681
|
+
# Defaults to `:v1`.
|
|
682
|
+
# @return [::Object] A client object for the specified version.
|
|
683
|
+
#
|
|
684
|
+
def self.cdn_config_service version: :v1, &block
|
|
685
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
686
|
+
|
|
687
|
+
package_name = Google::Ads::AdManager
|
|
688
|
+
.constants
|
|
689
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
690
|
+
.first
|
|
691
|
+
service_module = Google::Ads::AdManager.const_get(package_name).const_get(:CdnConfigService)
|
|
692
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
##
|
|
696
|
+
# Determines whether the CdnConfigService service is supported by the current client.
|
|
697
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.cdn_config_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 CdnConfigService service,
|
|
700
|
+
# or if the versioned client gem needs an update to support the CdnConfigService 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.cdn_config_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? :CdnConfigService
|
|
715
|
+
service_module = service_module.const_get :CdnConfigService
|
|
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
|
+
|
|
534
723
|
##
|
|
535
724
|
# Create a new client object for CmsMetadataKeyService.
|
|
536
725
|
#
|
|
@@ -1728,6 +1917,69 @@ module Google
|
|
|
1728
1917
|
false
|
|
1729
1918
|
end
|
|
1730
1919
|
|
|
1920
|
+
##
|
|
1921
|
+
# Create a new client object for LiveStreamService.
|
|
1922
|
+
#
|
|
1923
|
+
# By default, this returns an instance of
|
|
1924
|
+
# [Google::Ads::AdManager::V1::LiveStreamService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/LiveStreamService/Rest/Client)
|
|
1925
|
+
# for a REST client for version V1 of the API.
|
|
1926
|
+
# However, you can specify a different API version by passing it in the
|
|
1927
|
+
# `version` parameter. If the LiveStreamService service is
|
|
1928
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
1929
|
+
# appropriate versioned client will be returned.
|
|
1930
|
+
#
|
|
1931
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
1932
|
+
# given API version does not support the LiveStreamService service.
|
|
1933
|
+
# You can determine whether the method will succeed by calling
|
|
1934
|
+
# {Google::Ads::AdManager.live_stream_service_available?}.
|
|
1935
|
+
#
|
|
1936
|
+
# ## About LiveStreamService
|
|
1937
|
+
#
|
|
1938
|
+
# Provides methods for handling `LiveStream` objects.
|
|
1939
|
+
#
|
|
1940
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
1941
|
+
# Defaults to `:v1`.
|
|
1942
|
+
# @return [::Object] A client object for the specified version.
|
|
1943
|
+
#
|
|
1944
|
+
def self.live_stream_service version: :v1, &block
|
|
1945
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
1946
|
+
|
|
1947
|
+
package_name = Google::Ads::AdManager
|
|
1948
|
+
.constants
|
|
1949
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
1950
|
+
.first
|
|
1951
|
+
service_module = Google::Ads::AdManager.const_get(package_name).const_get(:LiveStreamService)
|
|
1952
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
1953
|
+
end
|
|
1954
|
+
|
|
1955
|
+
##
|
|
1956
|
+
# Determines whether the LiveStreamService service is supported by the current client.
|
|
1957
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.live_stream_service}.
|
|
1958
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
1959
|
+
# API version does not exist or does not support the LiveStreamService service,
|
|
1960
|
+
# or if the versioned client gem needs an update to support the LiveStreamService service.
|
|
1961
|
+
#
|
|
1962
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
1963
|
+
# Defaults to `:v1`.
|
|
1964
|
+
# @return [boolean] Whether the service is available.
|
|
1965
|
+
#
|
|
1966
|
+
def self.live_stream_service_available? version: :v1
|
|
1967
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
1968
|
+
package_name = Google::Ads::AdManager
|
|
1969
|
+
.constants
|
|
1970
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
1971
|
+
.first
|
|
1972
|
+
return false unless package_name
|
|
1973
|
+
service_module = Google::Ads::AdManager.const_get package_name
|
|
1974
|
+
return false unless service_module.const_defined? :LiveStreamService
|
|
1975
|
+
service_module = service_module.const_get :LiveStreamService
|
|
1976
|
+
return false unless service_module.const_defined? :Rest
|
|
1977
|
+
service_module = service_module.const_get :Rest
|
|
1978
|
+
service_module.const_defined? :Client
|
|
1979
|
+
rescue ::LoadError
|
|
1980
|
+
false
|
|
1981
|
+
end
|
|
1982
|
+
|
|
1731
1983
|
##
|
|
1732
1984
|
# Create a new client object for McmEarningsService.
|
|
1733
1985
|
#
|
|
@@ -2736,6 +2988,132 @@ module Google
|
|
|
2736
2988
|
false
|
|
2737
2989
|
end
|
|
2738
2990
|
|
|
2991
|
+
##
|
|
2992
|
+
# Create a new client object for SuggestedAdUnitService.
|
|
2993
|
+
#
|
|
2994
|
+
# By default, this returns an instance of
|
|
2995
|
+
# [Google::Ads::AdManager::V1::SuggestedAdUnitService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/SuggestedAdUnitService/Rest/Client)
|
|
2996
|
+
# for a REST client for version V1 of the API.
|
|
2997
|
+
# However, you can specify a different API version by passing it in the
|
|
2998
|
+
# `version` parameter. If the SuggestedAdUnitService service is
|
|
2999
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
3000
|
+
# appropriate versioned client will be returned.
|
|
3001
|
+
#
|
|
3002
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
3003
|
+
# given API version does not support the SuggestedAdUnitService service.
|
|
3004
|
+
# You can determine whether the method will succeed by calling
|
|
3005
|
+
# {Google::Ads::AdManager.suggested_ad_unit_service_available?}.
|
|
3006
|
+
#
|
|
3007
|
+
# ## About SuggestedAdUnitService
|
|
3008
|
+
#
|
|
3009
|
+
# Provides methods for handling `SuggestedAdUnit` objects.
|
|
3010
|
+
#
|
|
3011
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
3012
|
+
# Defaults to `:v1`.
|
|
3013
|
+
# @return [::Object] A client object for the specified version.
|
|
3014
|
+
#
|
|
3015
|
+
def self.suggested_ad_unit_service version: :v1, &block
|
|
3016
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
3017
|
+
|
|
3018
|
+
package_name = Google::Ads::AdManager
|
|
3019
|
+
.constants
|
|
3020
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
3021
|
+
.first
|
|
3022
|
+
service_module = Google::Ads::AdManager.const_get(package_name).const_get(:SuggestedAdUnitService)
|
|
3023
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
3024
|
+
end
|
|
3025
|
+
|
|
3026
|
+
##
|
|
3027
|
+
# Determines whether the SuggestedAdUnitService service is supported by the current client.
|
|
3028
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.suggested_ad_unit_service}.
|
|
3029
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
3030
|
+
# API version does not exist or does not support the SuggestedAdUnitService service,
|
|
3031
|
+
# or if the versioned client gem needs an update to support the SuggestedAdUnitService service.
|
|
3032
|
+
#
|
|
3033
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
3034
|
+
# Defaults to `:v1`.
|
|
3035
|
+
# @return [boolean] Whether the service is available.
|
|
3036
|
+
#
|
|
3037
|
+
def self.suggested_ad_unit_service_available? version: :v1
|
|
3038
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
3039
|
+
package_name = Google::Ads::AdManager
|
|
3040
|
+
.constants
|
|
3041
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
3042
|
+
.first
|
|
3043
|
+
return false unless package_name
|
|
3044
|
+
service_module = Google::Ads::AdManager.const_get package_name
|
|
3045
|
+
return false unless service_module.const_defined? :SuggestedAdUnitService
|
|
3046
|
+
service_module = service_module.const_get :SuggestedAdUnitService
|
|
3047
|
+
return false unless service_module.const_defined? :Rest
|
|
3048
|
+
service_module = service_module.const_get :Rest
|
|
3049
|
+
service_module.const_defined? :Client
|
|
3050
|
+
rescue ::LoadError
|
|
3051
|
+
false
|
|
3052
|
+
end
|
|
3053
|
+
|
|
3054
|
+
##
|
|
3055
|
+
# Create a new client object for TargetingPresetService.
|
|
3056
|
+
#
|
|
3057
|
+
# By default, this returns an instance of
|
|
3058
|
+
# [Google::Ads::AdManager::V1::TargetingPresetService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/TargetingPresetService/Rest/Client)
|
|
3059
|
+
# for a REST client for version V1 of the API.
|
|
3060
|
+
# However, you can specify a different API version by passing it in the
|
|
3061
|
+
# `version` parameter. If the TargetingPresetService service is
|
|
3062
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
3063
|
+
# appropriate versioned client will be returned.
|
|
3064
|
+
#
|
|
3065
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
3066
|
+
# given API version does not support the TargetingPresetService service.
|
|
3067
|
+
# You can determine whether the method will succeed by calling
|
|
3068
|
+
# {Google::Ads::AdManager.targeting_preset_service_available?}.
|
|
3069
|
+
#
|
|
3070
|
+
# ## About TargetingPresetService
|
|
3071
|
+
#
|
|
3072
|
+
# Provides methods for handling `TargetingPreset` objects.
|
|
3073
|
+
#
|
|
3074
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
3075
|
+
# Defaults to `:v1`.
|
|
3076
|
+
# @return [::Object] A client object for the specified version.
|
|
3077
|
+
#
|
|
3078
|
+
def self.targeting_preset_service version: :v1, &block
|
|
3079
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
3080
|
+
|
|
3081
|
+
package_name = Google::Ads::AdManager
|
|
3082
|
+
.constants
|
|
3083
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
3084
|
+
.first
|
|
3085
|
+
service_module = Google::Ads::AdManager.const_get(package_name).const_get(:TargetingPresetService)
|
|
3086
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
3087
|
+
end
|
|
3088
|
+
|
|
3089
|
+
##
|
|
3090
|
+
# Determines whether the TargetingPresetService service is supported by the current client.
|
|
3091
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.targeting_preset_service}.
|
|
3092
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
3093
|
+
# API version does not exist or does not support the TargetingPresetService service,
|
|
3094
|
+
# or if the versioned client gem needs an update to support the TargetingPresetService service.
|
|
3095
|
+
#
|
|
3096
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
3097
|
+
# Defaults to `:v1`.
|
|
3098
|
+
# @return [boolean] Whether the service is available.
|
|
3099
|
+
#
|
|
3100
|
+
def self.targeting_preset_service_available? version: :v1
|
|
3101
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
3102
|
+
package_name = Google::Ads::AdManager
|
|
3103
|
+
.constants
|
|
3104
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
3105
|
+
.first
|
|
3106
|
+
return false unless package_name
|
|
3107
|
+
service_module = Google::Ads::AdManager.const_get package_name
|
|
3108
|
+
return false unless service_module.const_defined? :TargetingPresetService
|
|
3109
|
+
service_module = service_module.const_get :TargetingPresetService
|
|
3110
|
+
return false unless service_module.const_defined? :Rest
|
|
3111
|
+
service_module = service_module.const_get :Rest
|
|
3112
|
+
service_module.const_defined? :Client
|
|
3113
|
+
rescue ::LoadError
|
|
3114
|
+
false
|
|
3115
|
+
end
|
|
3116
|
+
|
|
2739
3117
|
##
|
|
2740
3118
|
# Create a new client object for TaxonomyCategoryService.
|
|
2741
3119
|
#
|
|
@@ -2862,6 +3240,70 @@ module Google
|
|
|
2862
3240
|
false
|
|
2863
3241
|
end
|
|
2864
3242
|
|
|
3243
|
+
##
|
|
3244
|
+
# Create a new client object for ThirdPartyCompanyService.
|
|
3245
|
+
#
|
|
3246
|
+
# By default, this returns an instance of
|
|
3247
|
+
# [Google::Ads::AdManager::V1::ThirdPartyCompanyService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/ThirdPartyCompanyService/Rest/Client)
|
|
3248
|
+
# for a REST client for version V1 of the API.
|
|
3249
|
+
# However, you can specify a different API version by passing it in the
|
|
3250
|
+
# `version` parameter. If the ThirdPartyCompanyService service is
|
|
3251
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
3252
|
+
# appropriate versioned client will be returned.
|
|
3253
|
+
#
|
|
3254
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
3255
|
+
# given API version does not support the ThirdPartyCompanyService service.
|
|
3256
|
+
# You can determine whether the method will succeed by calling
|
|
3257
|
+
# {Google::Ads::AdManager.third_party_company_service_available?}.
|
|
3258
|
+
#
|
|
3259
|
+
# ## About ThirdPartyCompanyService
|
|
3260
|
+
#
|
|
3261
|
+
# Service to retrieve and list recognized third-party companies in Google Ad
|
|
3262
|
+
# Manager.
|
|
3263
|
+
#
|
|
3264
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
3265
|
+
# Defaults to `:v1`.
|
|
3266
|
+
# @return [::Object] A client object for the specified version.
|
|
3267
|
+
#
|
|
3268
|
+
def self.third_party_company_service version: :v1, &block
|
|
3269
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
3270
|
+
|
|
3271
|
+
package_name = Google::Ads::AdManager
|
|
3272
|
+
.constants
|
|
3273
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
3274
|
+
.first
|
|
3275
|
+
service_module = Google::Ads::AdManager.const_get(package_name).const_get(:ThirdPartyCompanyService)
|
|
3276
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
3277
|
+
end
|
|
3278
|
+
|
|
3279
|
+
##
|
|
3280
|
+
# Determines whether the ThirdPartyCompanyService service is supported by the current client.
|
|
3281
|
+
# If true, you can retrieve a client object by calling {Google::Ads::AdManager.third_party_company_service}.
|
|
3282
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
3283
|
+
# API version does not exist or does not support the ThirdPartyCompanyService service,
|
|
3284
|
+
# or if the versioned client gem needs an update to support the ThirdPartyCompanyService service.
|
|
3285
|
+
#
|
|
3286
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
3287
|
+
# Defaults to `:v1`.
|
|
3288
|
+
# @return [boolean] Whether the service is available.
|
|
3289
|
+
#
|
|
3290
|
+
def self.third_party_company_service_available? version: :v1
|
|
3291
|
+
require "google/ads/ad_manager/#{version.to_s.downcase}"
|
|
3292
|
+
package_name = Google::Ads::AdManager
|
|
3293
|
+
.constants
|
|
3294
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
3295
|
+
.first
|
|
3296
|
+
return false unless package_name
|
|
3297
|
+
service_module = Google::Ads::AdManager.const_get package_name
|
|
3298
|
+
return false unless service_module.const_defined? :ThirdPartyCompanyService
|
|
3299
|
+
service_module = service_module.const_get :ThirdPartyCompanyService
|
|
3300
|
+
return false unless service_module.const_defined? :Rest
|
|
3301
|
+
service_module = service_module.const_get :Rest
|
|
3302
|
+
service_module.const_defined? :Client
|
|
3303
|
+
rescue ::LoadError
|
|
3304
|
+
false
|
|
3305
|
+
end
|
|
3306
|
+
|
|
2865
3307
|
##
|
|
2866
3308
|
# Create a new client object for UserService.
|
|
2867
3309
|
#
|