Module: Google::Ads::AdManager
- Defined in:
- lib/google/ads/ad_manager.rb,
lib/google/ads/ad_manager/version.rb
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
-
.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.
-
.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.
-
.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.
-
.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.
-
.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.
-
.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_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.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/google/ads/ad_manager.rb', line 54 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.
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_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 |
.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.
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/google/ads/ad_manager.rb', line 117 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.
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.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.
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/google/ads/ad_manager.rb', line 180 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.
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.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.
243 244 245 246 247 248 249 250 251 252 |
# File 'lib/google/ads/ad_manager.rb', line 243 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.
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.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.
306 307 308 309 310 311 312 313 314 315 |
# File 'lib/google/ads/ad_manager.rb', line 306 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.
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_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 |
.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.
369 370 371 372 373 374 375 376 377 378 |
# File 'lib/google/ads/ad_manager.rb', line 369 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.
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.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 |
.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.
432 433 434 435 436 437 438 439 440 441 |
# File 'lib/google/ads/ad_manager.rb', line 432 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.
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.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 |
.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.
495 496 497 498 499 500 501 502 503 504 |
# File 'lib/google/ads/ad_manager.rb', line 495 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.
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.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.
558 559 560 561 562 563 564 565 566 567 |
# File 'lib/google/ads/ad_manager.rb', line 558 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.
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.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 |
.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.
621 622 623 624 625 626 627 628 629 630 |
# File 'lib/google/ads/ad_manager.rb', line 621 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.
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.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.
684 685 686 687 688 689 690 691 692 693 |
# File 'lib/google/ads/ad_manager.rb', line 684 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.
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.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.
747 748 749 750 751 752 753 754 755 756 |
# File 'lib/google/ads/ad_manager.rb', line 747 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.
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.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.
810 811 812 813 814 815 816 817 818 819 |
# File 'lib/google/ads/ad_manager.rb', line 810 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.
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.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 |