Module: Google::Ads::AdManager
- Defined in:
- lib/google/ads/ad_manager.rb,
lib/google/ads/ad_manager/version.rb
Constant Summary collapse
- VERSION =
"2.1.0"
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_review_center_ad_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AdReviewCenterAdService.
-
.ad_review_center_ad_service_available?(version: :v1) ⇒ boolean
Determines whether the AdReviewCenterAdService 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.
-
.application_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ApplicationService.
-
.application_service_available?(version: :v1) ⇒ boolean
Determines whether the ApplicationService service is supported by the current client.
-
.audience_segment_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AudienceSegmentService.
-
.audience_segment_service_available?(version: :v1) ⇒ boolean
Determines whether the AudienceSegmentService 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.
-
.browser_language_service(version: :v1, &block) ⇒ ::Object
Create a new client object for BrowserLanguageService.
-
.browser_language_service_available?(version: :v1) ⇒ boolean
Determines whether the BrowserLanguageService service is supported by the current client.
-
.browser_service(version: :v1, &block) ⇒ ::Object
Create a new client object for BrowserService.
-
.browser_service_available?(version: :v1) ⇒ boolean
Determines whether the BrowserService service is supported by the current client.
-
.cms_metadata_key_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CmsMetadataKeyService.
-
.cms_metadata_key_service_available?(version: :v1) ⇒ boolean
Determines whether the CmsMetadataKeyService service is supported by the current client.
-
.cms_metadata_value_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CmsMetadataValueService.
-
.cms_metadata_value_service_available?(version: :v1) ⇒ boolean
Determines whether the CmsMetadataValueService 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.
-
.contact_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContactService.
-
.contact_service_available?(version: :v1) ⇒ boolean
Determines whether the ContactService service is supported by the current client.
-
.content_bundle_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContentBundleService.
-
.content_bundle_service_available?(version: :v1) ⇒ boolean
Determines whether the ContentBundleService service is supported by the current client.
-
.content_label_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContentLabelService.
-
.content_label_service_available?(version: :v1) ⇒ boolean
Determines whether the ContentLabelService service is supported by the current client.
-
.content_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContentService.
-
.content_service_available?(version: :v1) ⇒ boolean
Determines whether the ContentService service is supported by the current client.
-
.creative_template_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CreativeTemplateService.
-
.creative_template_service_available?(version: :v1) ⇒ boolean
Determines whether the CreativeTemplateService 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_capability_service(version: :v1, &block) ⇒ ::Object
Create a new client object for DeviceCapabilityService.
-
.device_capability_service_available?(version: :v1) ⇒ boolean
Determines whether the DeviceCapabilityService 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.
-
.device_manufacturer_service(version: :v1, &block) ⇒ ::Object
Create a new client object for DeviceManufacturerService.
-
.device_manufacturer_service_available?(version: :v1) ⇒ boolean
Determines whether the DeviceManufacturerService 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.
-
.mobile_carrier_service(version: :v1, &block) ⇒ ::Object
Create a new client object for MobileCarrierService.
-
.mobile_carrier_service_available?(version: :v1) ⇒ boolean
Determines whether the MobileCarrierService service is supported by the current client.
-
.mobile_device_service(version: :v1, &block) ⇒ ::Object
Create a new client object for MobileDeviceService.
-
.mobile_device_service_available?(version: :v1) ⇒ boolean
Determines whether the MobileDeviceService service is supported by the current client.
-
.mobile_device_submodel_service(version: :v1, &block) ⇒ ::Object
Create a new client object for MobileDeviceSubmodelService.
-
.mobile_device_submodel_service_available?(version: :v1) ⇒ boolean
Determines whether the MobileDeviceSubmodelService 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.
-
.site_service(version: :v1, &block) ⇒ ::Object
Create a new client object for SiteService.
-
.site_service_available?(version: :v1) ⇒ boolean
Determines whether the SiteService 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.
-
.team_service(version: :v1, &block) ⇒ ::Object
Create a new client object for TeamService.
-
.team_service_available?(version: :v1) ⇒ boolean
Determines whether the TeamService 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_review_center_ad_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AdReviewCenterAdService.
By default, this returns an instance of
Google::Ads::AdManager::V1::AdReviewCenterAdService::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 AdReviewCenterAdService 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 AdReviewCenterAdService service. You can determine whether the method will succeed by calling ad_review_center_ad_service_available?.
About AdReviewCenterAdService
Provides methods for handling AdReviewCenterAd objects.
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/google/ads/ad_manager.rb', line 117 def self.ad_review_center_ad_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(:AdReviewCenterAdService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.ad_review_center_ad_service_available?(version: :v1) ⇒ boolean
Determines whether the AdReviewCenterAdService service is supported by the current client. If true, you can retrieve a client object by calling ad_review_center_ad_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 AdReviewCenterAdService service, or if the versioned client gem needs an update to support the AdReviewCenterAdService 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_review_center_ad_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? :AdReviewCenterAdService service_module = service_module.const_get :AdReviewCenterAdService 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.
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/google/ads/ad_manager.rb', line 180 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.
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.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 |
.application_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ApplicationService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ApplicationService::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 ApplicationService 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 ApplicationService service. You can determine whether the method will succeed by calling application_service_available?.
About ApplicationService
Provides methods for handling Application objects.
243 244 245 246 247 248 249 250 251 252 |
# File 'lib/google/ads/ad_manager.rb', line 243 def self.application_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(:ApplicationService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.application_service_available?(version: :v1) ⇒ boolean
Determines whether the ApplicationService service is supported by the current client. If true, you can retrieve a client object by calling application_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 ApplicationService service, or if the versioned client gem needs an update to support the ApplicationService 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.application_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? :ApplicationService service_module = service_module.const_get :ApplicationService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.audience_segment_service(version: :v1, &block) ⇒ ::Object
Create a new client object for AudienceSegmentService.
By default, this returns an instance of
Google::Ads::AdManager::V1::AudienceSegmentService::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 AudienceSegmentService 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 AudienceSegmentService service. You can determine whether the method will succeed by calling audience_segment_service_available?.
About AudienceSegmentService
Provides methods for handling AudienceSegment objects.
306 307 308 309 310 311 312 313 314 315 |
# File 'lib/google/ads/ad_manager.rb', line 306 def self.audience_segment_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(:AudienceSegmentService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.audience_segment_service_available?(version: :v1) ⇒ boolean
Determines whether the AudienceSegmentService service is supported by the current client. If true, you can retrieve a client object by calling audience_segment_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 AudienceSegmentService service, or if the versioned client gem needs an update to support the AudienceSegmentService 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.audience_segment_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? :AudienceSegmentService service_module = service_module.const_get :AudienceSegmentService 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.
369 370 371 372 373 374 375 376 377 378 |
# File 'lib/google/ads/ad_manager.rb', line 369 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.
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.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 |
.browser_language_service(version: :v1, &block) ⇒ ::Object
Create a new client object for BrowserLanguageService.
By default, this returns an instance of
Google::Ads::AdManager::V1::BrowserLanguageService::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 BrowserLanguageService 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 BrowserLanguageService service. You can determine whether the method will succeed by calling browser_language_service_available?.
About BrowserLanguageService
Provides methods for handling BrowserLanguage objects.
432 433 434 435 436 437 438 439 440 441 |
# File 'lib/google/ads/ad_manager.rb', line 432 def self.browser_language_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(:BrowserLanguageService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.browser_language_service_available?(version: :v1) ⇒ boolean
Determines whether the BrowserLanguageService service is supported by the current client. If true, you can retrieve a client object by calling browser_language_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 BrowserLanguageService service, or if the versioned client gem needs an update to support the BrowserLanguageService 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.browser_language_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? :BrowserLanguageService service_module = service_module.const_get :BrowserLanguageService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.browser_service(version: :v1, &block) ⇒ ::Object
Create a new client object for BrowserService.
By default, this returns an instance of
Google::Ads::AdManager::V1::BrowserService::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 BrowserService 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 BrowserService service. You can determine whether the method will succeed by calling browser_service_available?.
About BrowserService
Provides methods for handling Browser objects.
495 496 497 498 499 500 501 502 503 504 |
# File 'lib/google/ads/ad_manager.rb', line 495 def self.browser_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(:BrowserService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.browser_service_available?(version: :v1) ⇒ boolean
Determines whether the BrowserService service is supported by the current client. If true, you can retrieve a client object by calling browser_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 BrowserService service, or if the versioned client gem needs an update to support the BrowserService 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.browser_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? :BrowserService service_module = service_module.const_get :BrowserService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.cms_metadata_key_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CmsMetadataKeyService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CmsMetadataKeyService::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 CmsMetadataKeyService 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 CmsMetadataKeyService service. You can determine whether the method will succeed by calling cms_metadata_key_service_available?.
About CmsMetadataKeyService
Provides methods for handling CmsMetadataKey objects.
558 559 560 561 562 563 564 565 566 567 |
# File 'lib/google/ads/ad_manager.rb', line 558 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(:CmsMetadataKeyService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.cms_metadata_key_service_available?(version: :v1) ⇒ boolean
Determines whether the CmsMetadataKeyService service is supported by the current client. If true, you can retrieve a client object by calling cms_metadata_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 CmsMetadataKeyService service, or if the versioned client gem needs an update to support the CmsMetadataKeyService 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. 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? :CmsMetadataKeyService service_module = service_module.const_get :CmsMetadataKeyService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.cms_metadata_value_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CmsMetadataValueService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CmsMetadataValueService::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 CmsMetadataValueService 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 CmsMetadataValueService service. You can determine whether the method will succeed by calling cms_metadata_value_service_available?.
About CmsMetadataValueService
Provides methods for handling CmsMetadataValue objects.
621 622 623 624 625 626 627 628 629 630 |
# File 'lib/google/ads/ad_manager.rb', line 621 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(:CmsMetadataValueService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.cms_metadata_value_service_available?(version: :v1) ⇒ boolean
Determines whether the CmsMetadataValueService service is supported by the current client. If true, you can retrieve a client object by calling cms_metadata_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 CmsMetadataValueService service, or if the versioned client gem needs an update to support the CmsMetadataValueService 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. 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? :CmsMetadataValueService service_module = service_module.const_get :CmsMetadataValueService 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.
684 685 686 687 688 689 690 691 692 693 |
# File 'lib/google/ads/ad_manager.rb', line 684 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.
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.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 |
.contact_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContactService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ContactService::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 ContactService 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 ContactService service. You can determine whether the method will succeed by calling contact_service_available?.
About ContactService
Provides methods for handling Contact objects.
747 748 749 750 751 752 753 754 755 756 |
# File 'lib/google/ads/ad_manager.rb', line 747 def self.contact_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(:ContactService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.contact_service_available?(version: :v1) ⇒ boolean
Determines whether the ContactService service is supported by the current client. If true, you can retrieve a client object by calling contact_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 ContactService service, or if the versioned client gem needs an update to support the ContactService 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.contact_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? :ContactService service_module = service_module.const_get :ContactService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.content_bundle_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContentBundleService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ContentBundleService::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 ContentBundleService 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 ContentBundleService service. You can determine whether the method will succeed by calling content_bundle_service_available?.
About ContentBundleService
Provides methods for handling ContentBundle objects.
810 811 812 813 814 815 816 817 818 819 |
# File 'lib/google/ads/ad_manager.rb', line 810 def self.content_bundle_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(:ContentBundleService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.content_bundle_service_available?(version: :v1) ⇒ boolean
Determines whether the ContentBundleService service is supported by the current client. If true, you can retrieve a client object by calling content_bundle_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 ContentBundleService service, or if the versioned client gem needs an update to support the ContentBundleService 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.content_bundle_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? :ContentBundleService service_module = service_module.const_get :ContentBundleService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.content_label_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContentLabelService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ContentLabelService::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 ContentLabelService 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 ContentLabelService service. You can determine whether the method will succeed by calling content_label_service_available?.
About ContentLabelService
Provides methods for handling ContentLabel objects.
873 874 875 876 877 878 879 880 881 882 |
# File 'lib/google/ads/ad_manager.rb', line 873 def self.content_label_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(:ContentLabelService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.content_label_service_available?(version: :v1) ⇒ boolean
Determines whether the ContentLabelService service is supported by the current client. If true, you can retrieve a client object by calling content_label_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 ContentLabelService service, or if the versioned client gem needs an update to support the ContentLabelService 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.content_label_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? :ContentLabelService service_module = service_module.const_get :ContentLabelService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.content_service(version: :v1, &block) ⇒ ::Object
Create a new client object for ContentService.
By default, this returns an instance of
Google::Ads::AdManager::V1::ContentService::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 ContentService 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 ContentService service. You can determine whether the method will succeed by calling content_service_available?.
About ContentService
Provides methods for handling Content objects.
936 937 938 939 940 941 942 943 944 945 |
# File 'lib/google/ads/ad_manager.rb', line 936 def self.content_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(:ContentService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.content_service_available?(version: :v1) ⇒ boolean
Determines whether the ContentService service is supported by the current client. If true, you can retrieve a client object by calling content_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 ContentService service, or if the versioned client gem needs an update to support the ContentService 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.content_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? :ContentService service_module = service_module.const_get :ContentService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.creative_template_service(version: :v1, &block) ⇒ ::Object
Create a new client object for CreativeTemplateService.
By default, this returns an instance of
Google::Ads::AdManager::V1::CreativeTemplateService::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 CreativeTemplateService 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 CreativeTemplateService service. You can determine whether the method will succeed by calling creative_template_service_available?.
About CreativeTemplateService
Provides methods for handling CreativeTemplate objects.
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/google/ads/ad_manager.rb', line 999 def self.creative_template_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(:CreativeTemplateService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.creative_template_service_available?(version: :v1) ⇒ boolean
Determines whether the CreativeTemplateService service is supported by the current client. If true, you can retrieve a client object by calling creative_template_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 CreativeTemplateService service, or if the versioned client gem needs an update to support the CreativeTemplateService 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.creative_template_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? :CreativeTemplateService service_module = service_module.const_get :CreativeTemplateService 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.
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |
# File 'lib/google/ads/ad_manager.rb', line 1062 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.
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.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.
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File 'lib/google/ads/ad_manager.rb', line 1125 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.
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.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.
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'lib/google/ads/ad_manager.rb', line 1188 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.
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.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_capability_service(version: :v1, &block) ⇒ ::Object
Create a new client object for DeviceCapabilityService.
By default, this returns an instance of
Google::Ads::AdManager::V1::DeviceCapabilityService::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 DeviceCapabilityService 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 DeviceCapabilityService service. You can determine whether the method will succeed by calling device_capability_service_available?.
About DeviceCapabilityService
Provides methods for handling DeviceCapability objects.
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 |
# File 'lib/google/ads/ad_manager.rb', line 1251 def self.device_capability_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(:DeviceCapabilityService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.device_capability_service_available?(version: :v1) ⇒ boolean
Determines whether the DeviceCapabilityService service is supported by the current client. If true, you can retrieve a client object by calling device_capability_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 DeviceCapabilityService service, or if the versioned client gem needs an update to support the DeviceCapabilityService 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.device_capability_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? :DeviceCapabilityService service_module = service_module.const_get :DeviceCapabilityService 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.
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'lib/google/ads/ad_manager.rb', line 1314 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.
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.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 |
.device_manufacturer_service(version: :v1, &block) ⇒ ::Object
Create a new client object for DeviceManufacturerService.
By default, this returns an instance of
Google::Ads::AdManager::V1::DeviceManufacturerService::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 DeviceManufacturerService 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 DeviceManufacturerService service. You can determine whether the method will succeed by calling device_manufacturer_service_available?.
About DeviceManufacturerService
Provides methods for handling DeviceManufacturer objects.
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 |
# File 'lib/google/ads/ad_manager.rb', line 1377 def self.device_manufacturer_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(:DeviceManufacturerService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.device_manufacturer_service_available?(version: :v1) ⇒ boolean
Determines whether the DeviceManufacturerService service is supported by the current client. If true, you can retrieve a client object by calling device_manufacturer_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 DeviceManufacturerService service, or if the versioned client gem needs an update to support the DeviceManufacturerService 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.device_manufacturer_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? :DeviceManufacturerService service_module = service_module.const_get :DeviceManufacturerService 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.
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 |
# File 'lib/google/ads/ad_manager.rb', line 1440 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.
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 |
# File 'lib/google/ads/ad_manager.rb', line 1462 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.
1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 |
# File 'lib/google/ads/ad_manager.rb', line 1503 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.
1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 |
# File 'lib/google/ads/ad_manager.rb', line 1525 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 |
.mobile_carrier_service(version: :v1, &block) ⇒ ::Object
Create a new client object for MobileCarrierService.
By default, this returns an instance of
Google::Ads::AdManager::V1::MobileCarrierService::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 MobileCarrierService 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 MobileCarrierService service. You can determine whether the method will succeed by calling mobile_carrier_service_available?.
About MobileCarrierService
Provides methods for handling MobileCarrier objects.
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 |
# File 'lib/google/ads/ad_manager.rb', line 1566 def self.mobile_carrier_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(:MobileCarrierService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.mobile_carrier_service_available?(version: :v1) ⇒ boolean
Determines whether the MobileCarrierService service is supported by the current client. If true, you can retrieve a client object by calling mobile_carrier_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 MobileCarrierService service, or if the versioned client gem needs an update to support the MobileCarrierService service.
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 |
# File 'lib/google/ads/ad_manager.rb', line 1588 def self.mobile_carrier_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? :MobileCarrierService service_module = service_module.const_get :MobileCarrierService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.mobile_device_service(version: :v1, &block) ⇒ ::Object
Create a new client object for MobileDeviceService.
By default, this returns an instance of
Google::Ads::AdManager::V1::MobileDeviceService::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 MobileDeviceService 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 MobileDeviceService service. You can determine whether the method will succeed by calling mobile_device_service_available?.
About MobileDeviceService
Provides methods for handling MobileDevice objects.
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 |
# File 'lib/google/ads/ad_manager.rb', line 1629 def self.mobile_device_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(:MobileDeviceService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.mobile_device_service_available?(version: :v1) ⇒ boolean
Determines whether the MobileDeviceService service is supported by the current client. If true, you can retrieve a client object by calling mobile_device_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 MobileDeviceService service, or if the versioned client gem needs an update to support the MobileDeviceService service.
1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/google/ads/ad_manager.rb', line 1651 def self.mobile_device_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? :MobileDeviceService service_module = service_module.const_get :MobileDeviceService return false unless service_module.const_defined? :Rest service_module = service_module.const_get :Rest service_module.const_defined? :Client rescue ::LoadError false end |
.mobile_device_submodel_service(version: :v1, &block) ⇒ ::Object
Create a new client object for MobileDeviceSubmodelService.
By default, this returns an instance of
Google::Ads::AdManager::V1::MobileDeviceSubmodelService::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 MobileDeviceSubmodelService 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 MobileDeviceSubmodelService service. You can determine whether the method will succeed by calling mobile_device_submodel_service_available?.
About MobileDeviceSubmodelService
Provides methods for handling MobileDeviceSubmodel objects.
1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 |
# File 'lib/google/ads/ad_manager.rb', line 1692 def self.mobile_device_submodel_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(:MobileDeviceSubmodelService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.mobile_device_submodel_service_available?(version: :v1) ⇒ boolean
Determines whether the MobileDeviceSubmodelService service is supported by the current client. If true, you can retrieve a client object by calling mobile_device_submodel_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 MobileDeviceSubmodelService service, or if the versioned client gem needs an update to support the MobileDeviceSubmodelService service.
1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 |
# File 'lib/google/ads/ad_manager.rb', line 1714 def self.mobile_device_submodel_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? :MobileDeviceSubmodelService service_module = service_module.const_get :MobileDeviceSubmodelService 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.
1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 |
# File 'lib/google/ads/ad_manager.rb', line 1755 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.
1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 |
# File 'lib/google/ads/ad_manager.rb', line 1777 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.
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 |
# File 'lib/google/ads/ad_manager.rb', line 1818 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.
1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 |
# File 'lib/google/ads/ad_manager.rb', line 1840 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.
1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 |
# File 'lib/google/ads/ad_manager.rb', line 1881 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.
1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 |
# File 'lib/google/ads/ad_manager.rb', line 1903 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.
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 |
# File 'lib/google/ads/ad_manager.rb', line 1944 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.
1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 |
# File 'lib/google/ads/ad_manager.rb', line 1966 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.
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 |
# File 'lib/google/ads/ad_manager.rb', line 2007 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.
2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 |
# File 'lib/google/ads/ad_manager.rb', line 2029 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.
2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 |
# File 'lib/google/ads/ad_manager.rb', line 2070 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.
2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 |
# File 'lib/google/ads/ad_manager.rb', line 2092 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.
2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 |
# File 'lib/google/ads/ad_manager.rb', line 2133 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.
2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 |
# File 'lib/google/ads/ad_manager.rb', line 2155 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.
2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 |
# File 'lib/google/ads/ad_manager.rb', line 2196 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.
2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 |
# File 'lib/google/ads/ad_manager.rb', line 2218 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.
2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 |
# File 'lib/google/ads/ad_manager.rb', line 2259 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.
2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 |
# File 'lib/google/ads/ad_manager.rb', line 2281 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.
2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 |
# File 'lib/google/ads/ad_manager.rb', line 2322 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.
2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 |
# File 'lib/google/ads/ad_manager.rb', line 2344 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 |
.site_service(version: :v1, &block) ⇒ ::Object
Create a new client object for SiteService.
By default, this returns an instance of
Google::Ads::AdManager::V1::SiteService::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 SiteService 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 SiteService service. You can determine whether the method will succeed by calling site_service_available?.
About SiteService
Provides methods for handling Site objects.
2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 |
# File 'lib/google/ads/ad_manager.rb', line 2385 def self.site_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(:SiteService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.site_service_available?(version: :v1) ⇒ boolean
Determines whether the SiteService service is supported by the current client. If true, you can retrieve a client object by calling site_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 SiteService service, or if the versioned client gem needs an update to support the SiteService service.
2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 |
# File 'lib/google/ads/ad_manager.rb', line 2407 def self.site_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? :SiteService service_module = service_module.const_get :SiteService 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.
2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 |
# File 'lib/google/ads/ad_manager.rb', line 2448 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.
2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 |
# File 'lib/google/ads/ad_manager.rb', line 2470 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 |
.team_service(version: :v1, &block) ⇒ ::Object
Create a new client object for TeamService.
By default, this returns an instance of
Google::Ads::AdManager::V1::TeamService::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 TeamService 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 TeamService service. You can determine whether the method will succeed by calling team_service_available?.
About TeamService
Provides methods for handling Team objects.
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 |
# File 'lib/google/ads/ad_manager.rb', line 2511 def self.team_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(:TeamService) service_module.const_get(:Rest).const_get(:Client).new(&block) end |
.team_service_available?(version: :v1) ⇒ boolean
Determines whether the TeamService service is supported by the current client. If true, you can retrieve a client object by calling team_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 TeamService service, or if the versioned client gem needs an update to support the TeamService service.
2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 |
# File 'lib/google/ads/ad_manager.rb', line 2533 def self.team_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? :TeamService service_module = service_module.const_get :TeamService 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.
2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 |
# File 'lib/google/ads/ad_manager.rb', line 2574 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.
2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 |
# File 'lib/google/ads/ad_manager.rb', line 2596 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 |