NAME

Google::Ads::Common::Utilities::AdsUtilityRegsitry

DESCRIPTION

This is a global object that maintains a registry of the utilities that have recently been used. This registry of utilities is primarily collected to be put in the userAgent of the header when a request is sent. The registry is cleared every time the string representation of the registry is retrieved.

PROPERTIES

The following properties may be accessed using get_PROPERTY methods:

METHODS

add_ads_utilities

Add one or more utilities to the utility registry. The possible values passed in are in the keys of Google::Ads::Common::Utilities::AdsUtilityRegistry::ADS_UTILITIES. The method will error if one of the values passed in is incorrect. Example: Google::Ads::Common::Utilities::AdsUtilityRegistry->add_ads_utilities( "ReportDownloaderStream");

Parameters

  • One or more strings representing ad utilities. These strings can be found in the keys of Google::Ads::Common::Utilities::AdsUtilityRegistry::ADS_UTILITIES.

__get_ads_utilities

(Private) This method returns the list of non-repeated ads utilities in alphabetical order. Possible values can be found in the values of Google::Ads::Common::Utilities::AdsUtilityRegistry::ADS_UTILITIES.

Returns

An array of non-repeated utilities that have been added via add_ads_utilities in alphabetic order. Possible values can be found in the values of Google::Ads::Common::Utilities::AdsUtilityRegistry::ADS_UTILITIES.

__reset_ads_utilities

(Private) This method clears the registry of ads utilities.

get_and_reset_ads_utility_registry_string

This method returns an alphabetical, comma-separated string of non-repeated ads utilities currently registered. This method also clears the registry of ads utilities.

Returns

Returns an alphabetical, comma-separated string of non-repeated ads utilities currently registered.