Module: Google::Ads::AdManager
- Defined in:
- lib/google/ads/ad_manager.rb,
lib/google/ads/ad_manager/version.rb
Constant Summary collapse
- VERSION =
"2.0.1"
Class Method Summary collapse
-
.ad_break_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AdBreakService.
-
.ad_break_service_available?(version: :v1) ⇒ boolean
Determines whether the AdBreakService service is supported by the current client.
-
.ad_unit_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AdUnitService.
-
.ad_unit_service_available?(version: :v1) ⇒ boolean
Determines whether the AdUnitService service is supported by the current client.
-
.bandwidth_group_service(version: :v1, &block) ⇒ ::Object
Create a new client object for BandwidthGroupService.
-
.bandwidth_group_service_available?(version: :v1) ⇒ boolean
Determines whether the BandwidthGroupService service is supported by the current client.
-
.company_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CompanyService.
-
.company_service_available?(version: :v1) ⇒ boolean
Determines whether the CompanyService service is supported by the current client.
-
.custom_field_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CustomFieldService.
-
.custom_field_service_available?(version: :v1) ⇒ boolean
Determines whether the CustomFieldService service is supported by the current client.
-
.custom_targeting_key_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CustomTargetingKeyService.
-
.custom_targeting_key_service_available?(version: :v1) ⇒ boolean
Determines whether the CustomTargetingKeyService service is supported by the current client.
-
.custom_targeting_value_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CustomTargetingValueService.
-
.custom_targeting_value_service_available?(version: :v1) ⇒ boolean
Determines whether the CustomTargetingValueService service is supported by the current client.
-
.device_category_service(version: :v1, &block) ⇒ ::Object
Create a new client object for DeviceCategoryService.
-
.device_category_service_available?(version: :v1) ⇒ boolean
Determines whether the DeviceCategoryService service is supported by the current client.
-
.entity_signals_mapping_service(version: :v1, &block) ⇒ ::Object
Create a new client object for EntitySignalsMappingService.
-
.entity_signals_mapping_service_available?(version: :v1) ⇒ boolean
Determines whether the EntitySignalsMappingService service is supported by the current client.
-
.geo_target_service(version: :v1, &block) ⇒ ::Object
Create a new client object for GeoTargetService.
-
.geo_target_service_available?(version: :v1) ⇒ boolean
Determines whether the GeoTargetService service is supported by the current client.
-
.network_service(version: :v1, &block) ⇒ ::Object
Create a new client object for NetworkService.
-
.network_service_available?(version: :v1) ⇒ boolean
Determines whether the NetworkService service is supported by the current client.
-
.operating_system_service(version: :v1, &block) ⇒ ::Object
Create a new client object for OperatingSystemService.
-
.operating_system_service_available?(version: :v1) ⇒ boolean
Determines whether the OperatingSystemService service is supported by the current client.
-
.operating_system_version_service(version: :v1, &block) ⇒ ::Object
Create a new client object for OperatingSystemVersionService.
-
.operating_system_version_service_available?(version: :v1) ⇒ boolean
Determines whether the OperatingSystemVersionService service is supported by the current client.
-
.order_service(version: :v1, &block) ⇒ ::Object
Create a new client object for OrderService.
-
.order_service_available?(version: :v1) ⇒ boolean
Determines whether the OrderService service is supported by the current client.
-
.placement_service(version: :v1, &block) ⇒ ::Object
Create a new client object for PlacementService.
-
.placement_service_available?(version: :v1) ⇒ boolean
Determines whether the PlacementService service is supported by the current client.
-
.private_auction_deal_service(version: :v1, &block) ⇒ ::Object
Create a new client object for PrivateAuctionDealService.
-
.private_auction_deal_service_available?(version: :v1) ⇒ boolean
Determines whether the PrivateAuctionDealService service is supported by the current client.
-
.private_auction_service(version: :v1, &block) ⇒ ::Object
Create a new client object for PrivateAuctionService.
-
.private_auction_service_available?(version: :v1) ⇒ boolean
Determines whether the PrivateAuctionService service is supported by the current client.
-
.programmatic_buyer_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ProgrammaticBuyerService.
-
.programmatic_buyer_service_available?(version: :v1) ⇒ boolean
Determines whether the ProgrammaticBuyerService service is supported by the current client.
-
.report_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ReportService.
-
.report_service_available?(version: :v1) ⇒ boolean
Determines whether the ReportService service is supported by the current client.
-
.role_service(version: :v1, &block) ⇒ ::Object
Create a new client object for RoleService.
-
.role_service_available?(version: :v1) ⇒ boolean
Determines whether the RoleService service is supported by the current client.
-
.taxonomy_category_service(version: :v1, &block) ⇒ ::Object
Create a new client object for TaxonomyCategoryService.
-
.taxonomy_category_service_available?(version: :v1) ⇒ boolean
Determines whether the TaxonomyCategoryService service is supported by the current client.
-
.user_service(version: :v1, &block) ⇒ ::Object
Create a new client object for UserService.
-
.user_service_available?(version: :v1) ⇒ boolean
Determines whether the UserService service is supported by the current client.
Class Method Details
.ad_break_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AdBreakService.
By default, this returns an instance of
Google::Ads::AdManager::V1::AdBreakService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the AdBreakService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the AdBreakService service. You can determine whether the method will succeed by calling ad_break_service_available?.
About AdBreakService
Provides methods for handling AdBreak
objects.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/google/ads/ad_manager.rb', line 54 def self.ad_break_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:AdBreakService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.ad_break_service_available?(version: :v1) ⇒ boolean
Determines whether the AdBreakService service is supported by the current client. If true, you can retrieve a client object by calling ad_break_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the AdBreakService service, or if the versioned client gem needs an update to support the AdBreakService service.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/google/ads/ad_manager.rb', line 76 def self.ad_break_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :AdBreakService service_module = service_module.const_get :AdBreakService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.ad_unit_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AdUnitService.
By default, this returns an instance of
Google::Ads::AdManager::V1::AdUnitService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the AdUnitService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the AdUnitService service. You can determine whether the method will succeed by calling ad_unit_service_available?.
About AdUnitService
Provides methods for handling AdUnit objects.
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/google/ads/ad_manager.rb', line 117 def self.ad_unit_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:AdUnitService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.ad_unit_service_available?(version: :v1) ⇒ boolean
Determines whether the AdUnitService service is supported by the current client. If true, you can retrieve a client object by calling ad_unit_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the AdUnitService service, or if the versioned client gem needs an update to support the AdUnitService service.
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/google/ads/ad_manager.rb', line 139 def self.ad_unit_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :AdUnitService service_module = service_module.const_get :AdUnitService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.bandwidth_group_service(version: :v1, &block) ⇒ ::Object
Create a new client object for BandwidthGroupService.
By default, this returns an instance of
Google::Ads::AdManager::V1::BandwidthGroupService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the BandwidthGroupService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the BandwidthGroupService service. You can determine whether the method will succeed by calling bandwidth_group_service_available?.
About BandwidthGroupService
Provides methods for handling BandwidthGroup
objects.
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/google/ads/ad_manager.rb', line 180 def self.bandwidth_group_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:BandwidthGroupService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.bandwidth_group_service_available?(version: :v1) ⇒ boolean
Determines whether the BandwidthGroupService service is supported by the current client. If true, you can retrieve a client object by calling bandwidth_group_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the BandwidthGroupService service, or if the versioned client gem needs an update to support the BandwidthGroupService service.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/google/ads/ad_manager.rb', line 202 def self.bandwidth_group_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :BandwidthGroupService service_module = service_module.const_get :BandwidthGroupService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.company_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CompanyService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CompanyService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the CompanyService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the CompanyService service. You can determine whether the method will succeed by calling company_service_available?.
About CompanyService
Provides methods for handling Company
objects.
243 244 245 246 247 248 249 250 251 252 |
# File 'lib/google/ads/ad_manager.rb', line 243 def self.company_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:CompanyService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.company_service_available?(version: :v1) ⇒ boolean
Determines whether the CompanyService service is supported by the current client. If true, you can retrieve a client object by calling company_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the CompanyService service, or if the versioned client gem needs an update to support the CompanyService service.
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/google/ads/ad_manager.rb', line 265 def self.company_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :CompanyService service_module = service_module.const_get :CompanyService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.custom_field_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CustomFieldService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CustomFieldService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the CustomFieldService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the CustomFieldService service. You can determine whether the method will succeed by calling custom_field_service_available?.
About CustomFieldService
Provides methods for handling CustomField
objects.
306 307 308 309 310 311 312 313 314 315 |
# File 'lib/google/ads/ad_manager.rb', line 306 def self.custom_field_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:CustomFieldService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.custom_field_service_available?(version: :v1) ⇒ boolean
Determines whether the CustomFieldService service is supported by the current client. If true, you can retrieve a client object by calling custom_field_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the CustomFieldService service, or if the versioned client gem needs an update to support the CustomFieldService service.
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/google/ads/ad_manager.rb', line 328 def self.custom_field_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :CustomFieldService service_module = service_module.const_get :CustomFieldService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.custom_targeting_key_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CustomTargetingKeyService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the CustomTargetingKeyService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the CustomTargetingKeyService service. You can determine whether the method will succeed by calling custom_targeting_key_service_available?.
About CustomTargetingKeyService
Provides methods for handling CustomTargetingKey
objects.
369 370 371 372 373 374 375 376 377 378 |
# File 'lib/google/ads/ad_manager.rb', line 369 def self.custom_targeting_key_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:CustomTargetingKeyService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.custom_targeting_key_service_available?(version: :v1) ⇒ boolean
Determines whether the CustomTargetingKeyService service is supported by the current client. If true, you can retrieve a client object by calling custom_targeting_key_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the CustomTargetingKeyService service, or if the versioned client gem needs an update to support the CustomTargetingKeyService service.
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/google/ads/ad_manager.rb', line 391 def self.custom_targeting_key_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :CustomTargetingKeyService service_module = service_module.const_get :CustomTargetingKeyService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.custom_targeting_value_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CustomTargetingValueService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CustomTargetingValueService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the CustomTargetingValueService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the CustomTargetingValueService service. You can determine whether the method will succeed by calling custom_targeting_value_service_available?.
About CustomTargetingValueService
Provides methods for handling CustomTargetingValue
objects.
432 433 434 435 436 437 438 439 440 441 |
# File 'lib/google/ads/ad_manager.rb', line 432 def self.custom_targeting_value_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:CustomTargetingValueService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.custom_targeting_value_service_available?(version: :v1) ⇒ boolean
Determines whether the CustomTargetingValueService service is supported by the current client. If true, you can retrieve a client object by calling custom_targeting_value_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the CustomTargetingValueService service, or if the versioned client gem needs an update to support the CustomTargetingValueService service.
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/google/ads/ad_manager.rb', line 454 def self.custom_targeting_value_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :CustomTargetingValueService service_module = service_module.const_get :CustomTargetingValueService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.device_category_service(version: :v1, &block) ⇒ ::Object
Create a new client object for DeviceCategoryService.
By default, this returns an instance of
Google::Ads::AdManager::V1::DeviceCategoryService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the DeviceCategoryService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the DeviceCategoryService service. You can determine whether the method will succeed by calling device_category_service_available?.
About DeviceCategoryService
Provides methods for handling DeviceCategory
objects.
495 496 497 498 499 500 501 502 503 504 |
# File 'lib/google/ads/ad_manager.rb', line 495 def self.device_category_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:DeviceCategoryService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.device_category_service_available?(version: :v1) ⇒ boolean
Determines whether the DeviceCategoryService service is supported by the current client. If true, you can retrieve a client object by calling device_category_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the DeviceCategoryService service, or if the versioned client gem needs an update to support the DeviceCategoryService service.
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/google/ads/ad_manager.rb', line 517 def self.device_category_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :DeviceCategoryService service_module = service_module.const_get :DeviceCategoryService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.entity_signals_mapping_service(version: :v1, &block) ⇒ ::Object
Create a new client object for EntitySignalsMappingService.
By default, this returns an instance of
Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the EntitySignalsMappingService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the EntitySignalsMappingService service. You can determine whether the method will succeed by calling entity_signals_mapping_service_available?.
About EntitySignalsMappingService
Provides methods for handling EntitySignalsMapping
objects.
558 559 560 561 562 563 564 565 566 567 |
# File 'lib/google/ads/ad_manager.rb', line 558 def self.entity_signals_mapping_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:EntitySignalsMappingService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.entity_signals_mapping_service_available?(version: :v1) ⇒ boolean
Determines whether the EntitySignalsMappingService service is supported by the current client. If true, you can retrieve a client object by calling entity_signals_mapping_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the EntitySignalsMappingService service, or if the versioned client gem needs an update to support the EntitySignalsMappingService service.
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'lib/google/ads/ad_manager.rb', line 580 def self.entity_signals_mapping_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :EntitySignalsMappingService service_module = service_module.const_get :EntitySignalsMappingService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.geo_target_service(version: :v1, &block) ⇒ ::Object
Create a new client object for GeoTargetService.
By default, this returns an instance of
Google::Ads::AdManager::V1::GeoTargetService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the GeoTargetService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the GeoTargetService service. You can determine whether the method will succeed by calling geo_target_service_available?.
About GeoTargetService
Provides methods for handling GeoTarget
objects.
621 622 623 624 625 626 627 628 629 630 |
# File 'lib/google/ads/ad_manager.rb', line 621 def self.geo_target_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:GeoTargetService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.geo_target_service_available?(version: :v1) ⇒ boolean
Determines whether the GeoTargetService service is supported by the current client. If true, you can retrieve a client object by calling geo_target_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the GeoTargetService service, or if the versioned client gem needs an update to support the GeoTargetService service.
643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/google/ads/ad_manager.rb', line 643 def self.geo_target_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :GeoTargetService service_module = service_module.const_get :GeoTargetService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.network_service(version: :v1, &block) ⇒ ::Object
Create a new client object for NetworkService.
By default, this returns an instance of
Google::Ads::AdManager::V1::NetworkService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the NetworkService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the NetworkService service. You can determine whether the method will succeed by calling network_service_available?.
About NetworkService
Provides methods for handling Network
objects.
684 685 686 687 688 689 690 691 692 693 |
# File 'lib/google/ads/ad_manager.rb', line 684 def self.network_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:NetworkService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.network_service_available?(version: :v1) ⇒ boolean
Determines whether the NetworkService service is supported by the current client. If true, you can retrieve a client object by calling network_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the NetworkService service, or if the versioned client gem needs an update to support the NetworkService service.
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/google/ads/ad_manager.rb', line 706 def self.network_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :NetworkService service_module = service_module.const_get :NetworkService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.operating_system_service(version: :v1, &block) ⇒ ::Object
Create a new client object for OperatingSystemService.
By default, this returns an instance of
Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the OperatingSystemService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the OperatingSystemService service. You can determine whether the method will succeed by calling operating_system_service_available?.
About OperatingSystemService
Provides methods for handling OperatingSystem
objects.
747 748 749 750 751 752 753 754 755 756 |
# File 'lib/google/ads/ad_manager.rb', line 747 def self. version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OperatingSystemService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.operating_system_service_available?(version: :v1) ⇒ boolean
Determines whether the OperatingSystemService service is supported by the current client. If true, you can retrieve a client object by calling operating_system_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the OperatingSystemService service, or if the versioned client gem needs an update to support the OperatingSystemService service.
769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 |
# File 'lib/google/ads/ad_manager.rb', line 769 def self. version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :OperatingSystemService service_module = service_module.const_get :OperatingSystemService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.operating_system_version_service(version: :v1, &block) ⇒ ::Object
Create a new client object for OperatingSystemVersionService.
By default, this returns an instance of
Google::Ads::AdManager::V1::OperatingSystemVersionService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the OperatingSystemVersionService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the OperatingSystemVersionService service. You can determine whether the method will succeed by calling operating_system_version_service_available?.
About OperatingSystemVersionService
Provides methods for handling OperatingSystemVersion
objects.
810 811 812 813 814 815 816 817 818 819 |
# File 'lib/google/ads/ad_manager.rb', line 810 def self. version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OperatingSystemVersionService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.operating_system_version_service_available?(version: :v1) ⇒ boolean
Determines whether the OperatingSystemVersionService service is supported by the current client. If true, you can retrieve a client object by calling operating_system_version_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the OperatingSystemVersionService service, or if the versioned client gem needs an update to support the OperatingSystemVersionService service.
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/google/ads/ad_manager.rb', line 832 def self. version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :OperatingSystemVersionService service_module = service_module.const_get :OperatingSystemVersionService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.order_service(version: :v1, &block) ⇒ ::Object
Create a new client object for OrderService.
By default, this returns an instance of
Google::Ads::AdManager::V1::OrderService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the OrderService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the OrderService service. You can determine whether the method will succeed by calling order_service_available?.
About OrderService
Provides methods for handling Order
objects.
873 874 875 876 877 878 879 880 881 882 |
# File 'lib/google/ads/ad_manager.rb', line 873 def self.order_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:OrderService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.order_service_available?(version: :v1) ⇒ boolean
Determines whether the OrderService service is supported by the current client. If true, you can retrieve a client object by calling order_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the OrderService service, or if the versioned client gem needs an update to support the OrderService service.
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 |
# File 'lib/google/ads/ad_manager.rb', line 895 def self.order_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :OrderService service_module = service_module.const_get :OrderService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.placement_service(version: :v1, &block) ⇒ ::Object
Create a new client object for PlacementService.
By default, this returns an instance of
Google::Ads::AdManager::V1::PlacementService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the PlacementService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the PlacementService service. You can determine whether the method will succeed by calling placement_service_available?.
About PlacementService
Provides methods for handling Placement
objects.
936 937 938 939 940 941 942 943 944 945 |
# File 'lib/google/ads/ad_manager.rb', line 936 def self.placement_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PlacementService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.placement_service_available?(version: :v1) ⇒ boolean
Determines whether the PlacementService service is supported by the current client. If true, you can retrieve a client object by calling placement_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the PlacementService service, or if the versioned client gem needs an update to support the PlacementService service.
958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/google/ads/ad_manager.rb', line 958 def self.placement_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :PlacementService service_module = service_module.const_get :PlacementService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.private_auction_deal_service(version: :v1, &block) ⇒ ::Object
Create a new client object for PrivateAuctionDealService.
By default, this returns an instance of
Google::Ads::AdManager::V1::PrivateAuctionDealService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the PrivateAuctionDealService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the PrivateAuctionDealService service. You can determine whether the method will succeed by calling private_auction_deal_service_available?.
About PrivateAuctionDealService
Provides methods for handling PrivateAuctionDeal
objects.
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/google/ads/ad_manager.rb', line 999 def self.private_auction_deal_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PrivateAuctionDealService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.private_auction_deal_service_available?(version: :v1) ⇒ boolean
Determines whether the PrivateAuctionDealService service is supported by the current client. If true, you can retrieve a client object by calling private_auction_deal_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the PrivateAuctionDealService service, or if the versioned client gem needs an update to support the PrivateAuctionDealService service.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 |
# File 'lib/google/ads/ad_manager.rb', line 1021 def self.private_auction_deal_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :PrivateAuctionDealService service_module = service_module.const_get :PrivateAuctionDealService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.private_auction_service(version: :v1, &block) ⇒ ::Object
Create a new client object for PrivateAuctionService.
By default, this returns an instance of
Google::Ads::AdManager::V1::PrivateAuctionService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the PrivateAuctionService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the PrivateAuctionService service. You can determine whether the method will succeed by calling private_auction_service_available?.
About PrivateAuctionService
Provides methods for handling PrivateAuction
objects.
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |
# File 'lib/google/ads/ad_manager.rb', line 1062 def self.private_auction_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:PrivateAuctionService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.private_auction_service_available?(version: :v1) ⇒ boolean
Determines whether the PrivateAuctionService service is supported by the current client. If true, you can retrieve a client object by calling private_auction_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the PrivateAuctionService service, or if the versioned client gem needs an update to support the PrivateAuctionService service.
1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 |
# File 'lib/google/ads/ad_manager.rb', line 1084 def self.private_auction_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :PrivateAuctionService service_module = service_module.const_get :PrivateAuctionService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.programmatic_buyer_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ProgrammaticBuyerService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ProgrammaticBuyerService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the ProgrammaticBuyerService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the ProgrammaticBuyerService service. You can determine whether the method will succeed by calling programmatic_buyer_service_available?.
About ProgrammaticBuyerService
Provides methods for handling ProgrammaticBuyer
objects.
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File 'lib/google/ads/ad_manager.rb', line 1125 def self.programmatic_buyer_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:ProgrammaticBuyerService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.programmatic_buyer_service_available?(version: :v1) ⇒ boolean
Determines whether the ProgrammaticBuyerService service is supported by the current client. If true, you can retrieve a client object by calling programmatic_buyer_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the ProgrammaticBuyerService service, or if the versioned client gem needs an update to support the ProgrammaticBuyerService service.
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/google/ads/ad_manager.rb', line 1147 def self.programmatic_buyer_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :ProgrammaticBuyerService service_module = service_module.const_get :ProgrammaticBuyerService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.report_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ReportService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ReportService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the ReportService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the ReportService service. You can determine whether the method will succeed by calling report_service_available?.
About ReportService
Provides methods for interacting with reports.
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'lib/google/ads/ad_manager.rb', line 1188 def self.report_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:ReportService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.report_service_available?(version: :v1) ⇒ boolean
Determines whether the ReportService service is supported by the current client. If true, you can retrieve a client object by calling report_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the ReportService service, or if the versioned client gem needs an update to support the ReportService service.
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 |
# File 'lib/google/ads/ad_manager.rb', line 1210 def self.report_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :ReportService service_module = service_module.const_get :ReportService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.role_service(version: :v1, &block) ⇒ ::Object
Create a new client object for RoleService.
By default, this returns an instance of
Google::Ads::AdManager::V1::RoleService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the RoleService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the RoleService service. You can determine whether the method will succeed by calling role_service_available?.
About RoleService
Provides methods for handling Role
objects.
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 |
# File 'lib/google/ads/ad_manager.rb', line 1251 def self.role_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:RoleService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.role_service_available?(version: :v1) ⇒ boolean
Determines whether the RoleService service is supported by the current client. If true, you can retrieve a client object by calling role_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the RoleService service, or if the versioned client gem needs an update to support the RoleService service.
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 |
# File 'lib/google/ads/ad_manager.rb', line 1273 def self.role_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :RoleService service_module = service_module.const_get :RoleService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.taxonomy_category_service(version: :v1, &block) ⇒ ::Object
Create a new client object for TaxonomyCategoryService.
By default, this returns an instance of
Google::Ads::AdManager::V1::TaxonomyCategoryService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the TaxonomyCategoryService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the TaxonomyCategoryService service. You can determine whether the method will succeed by calling taxonomy_category_service_available?.
About TaxonomyCategoryService
Provides methods for handling TaxonomyCategory
objects.
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'lib/google/ads/ad_manager.rb', line 1314 def self.taxonomy_category_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:TaxonomyCategoryService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.taxonomy_category_service_available?(version: :v1) ⇒ boolean
Determines whether the TaxonomyCategoryService service is supported by the current client. If true, you can retrieve a client object by calling taxonomy_category_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the TaxonomyCategoryService service, or if the versioned client gem needs an update to support the TaxonomyCategoryService service.
1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 |
# File 'lib/google/ads/ad_manager.rb', line 1336 def self.taxonomy_category_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :TaxonomyCategoryService service_module = service_module.const_get :TaxonomyCategoryService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.user_service(version: :v1, &block) ⇒ ::Object
Create a new client object for UserService.
By default, this returns an instance of
Google::Ads::AdManager::V1::UserService::Rest::Client
for a REST client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the UserService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
Raises an exception if the currently installed versioned client gem for the given API version does not support the UserService service. You can determine whether the method will succeed by calling user_service_available?.
About UserService
Provides methods for handling User objects.
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 |
# File 'lib/google/ads/ad_manager.rb', line 1377 def self.user_service version: :v1, &block require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Ads::AdManager.const_get(package_name).const_get(:UserService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.user_service_available?(version: :v1) ⇒ boolean
Determines whether the UserService service is supported by the current client. If true, you can retrieve a client object by calling user_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the UserService service, or if the versioned client gem needs an update to support the UserService service.
1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 |
# File 'lib/google/ads/ad_manager.rb', line 1399 def self.user_service_available? version: :v1 require "google/ads/ad_manager/#{version.to_s.downcase}" package_name = Google::Ads::AdManager .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first return false unless package_name service_module = Google::Ads::AdManager.const_get package_name return false unless service_module.const_defined? :UserService service_module = service_module.const_get :UserService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |