PHP Class CustomTargetingService, googleads-php-lib

Inheritance: extends DfpSoapClient
Show file Open project: googleads/googleads-php-lib

Public Properties

Property Type Description
$classmap array Default class map for wsdl=>php
$endpoint string The endpoint of the service

Public Methods

Method Description
__construct ( string $wsdl, array $options, $user ) Constructor using wsdl location and options array
createCustomTargetingKeys ( $keys ) : the Creates new {@link CustomTargetingKey} objects.
createCustomTargetingValues ( $values ) : the Creates new {@link CustomTargetingValue} objects.
getCustomTargetingKeysByStatement ( $filterStatement ) : the Gets a {@link CustomTargetingKeyPage} of {@link CustomTargetingKey} objects that satisfy the given {@link Statement#query}. The following fields are supported for filtering:
getCustomTargetingValuesByStatement ( $filterStatement ) : the Gets a {@link CustomTargetingValuePage} of {@link CustomTargetingValue} objects that satisfy the given {@link Statement#query}.
performCustomTargetingKeyAction ( $customTargetingKeyAction, $filterStatement ) : the Performs actions on {@link CustomTargetingKey} objects that match the given {@link Statement#query}.
performCustomTargetingValueAction ( $customTargetingValueAction, $filterStatement ) : the Performs actions on {@link CustomTargetingValue} objects that match the given {@link Statement#query}.
updateCustomTargetingKeys ( $keys ) : the Updates the specified {@link CustomTargetingKey} objects.
updateCustomTargetingValues ( $values ) : the Updates the specified {@link CustomTargetingValue} objects.

Method Details

__construct() public method

Constructor using wsdl location and options array
public __construct ( string $wsdl, array $options, $user )
$wsdl string WSDL location for this service
$options array Options for the SoapClient

createCustomTargetingKeys() public method

The following fields are required:
  • {@link CustomTargetingKey#name}
  • {@link CustomTargetingKey#type}
public createCustomTargetingKeys ( $keys ) : the
return the updated custom targeting keys

createCustomTargetingValues() public method

The following fields are required:
  • {@link CustomTargetingValue#customTargetingKeyId}
  • {@link CustomTargetingValue#name}
public createCustomTargetingValues ( $values ) : the
return the updated custom targeting keys

getCustomTargetingKeysByStatement() public method

PQL Property Object Property
{@code id} {@link CustomTargetingKey#id}
{@code name} {@link CustomTargetingKey#name}
{@code displayName} {@link CustomTargetingKey#displayName}
{@code type} {@link CustomTargetingKey#type}
public getCustomTargetingKeysByStatement ( $filterStatement ) : the
return the custom targeting keys that match the given filter

getCustomTargetingValuesByStatement() public method

The {@code WHERE} clause in the {@link Statement#query} must always contain {@link CustomTargetingValue#customTargetingKeyId} as one of its columns in a way that it is AND'ed with the rest of the query. So, if you want to retrieve values for a known set of key ids, valid {@link Statement#query} would look like:

  1. "WHERE customTargetingKeyId IN ('17','18','19')" retrieves all values that are associated with keys having ids 17, 18, 19.
  2. "WHERE customTargetingKeyId = '17' AND name = 'red'" retrieves values that are associated with keys having id 17 and value name is 'red'.

The following fields are supported for filtering:

PQL Property Object Property
{@code id} {@link CustomTargetingValue#id}
{@code customTargetingKeyId} {@link CustomTargetingValue#customTargetingKeyId}
{@code name} {@link CustomTargetingValue#name}
{@code displayName} {@link CustomTargetingValue#displayName}
{@code matchType} {@link CustomTargetingValue#matchType}
public getCustomTargetingValuesByStatement ( $filterStatement ) : the
return the custom targeting values that match the given filter

performCustomTargetingKeyAction() public method

Performs actions on {@link CustomTargetingKey} objects that match the given {@link Statement#query}.
public performCustomTargetingKeyAction ( $customTargetingKeyAction, $filterStatement ) : the
return the result of the action performed

performCustomTargetingValueAction() public method

Performs actions on {@link CustomTargetingValue} objects that match the given {@link Statement#query}.
public performCustomTargetingValueAction ( $customTargetingValueAction, $filterStatement ) : the
return the result of the action performed

updateCustomTargetingKeys() public method

Updates the specified {@link CustomTargetingKey} objects.
public updateCustomTargetingKeys ( $keys ) : the
return the updated custom targeting keys

updateCustomTargetingValues() public method

Updates the specified {@link CustomTargetingValue} objects.
public updateCustomTargetingValues ( $values ) : the
return the updated custom targeting values

Property Details

$classmap public static property

Default class map for wsdl=>php
public static array $classmap
return array

$endpoint public static property

The endpoint of the service
public static string $endpoint
return string