PHP Class AdGroupAdService, googleads-php-lib

Author: WSDLInterpreter
Inheritance: extends AdWordsSoapClient
Exibir arquivo 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
get ( $serviceSelector ) : The This field is required and should not be {@code null}.
mutate ( $operations ) : A This field must not contain {@code null} elements. Elements in this field must have distinct IDs for following {@link Operator}s : SET, REMOVE. This field must contain at least one element. This field is required and should not be {@code null}.
mutateLabel ( $operations ) : A This field must not contain {@code null} elements. Elements in this field must have distinct IDs for following {@link Operator}s : ADD, REMOVE. This field must contain at least one element. This field is required and should not be {@code null}. The following {@link Operator}s are supported: ADD, REMOVE.
query ( $query ) : A This field is required and should not be {@code null}.
upgradeUrl ( $operations ) : The Upgrades the url for a set of ads.

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

get() public method

Returns a list of AdGroupAds. AdGroupAds that had been removed are not returned by default.
public get ( $serviceSelector ) : The
return The page containing the AdGroupAds that meet the criteria specified by the selector.

mutate() public method

Applies the list of mutate operations (ie. add, set, remove):

Add - Creates a new {@linkplain AdGroupAd ad group ad}. The {@code adGroupId} must reference an existing ad group. The child {@code Ad} must be sufficiently specified by constructing a concrete ad type (such as {@code TextAd}) and setting its fields accordingly.

Set - Updates an ad group ad. Except for {@code status}, ad group ad fields are not mutable. Status updates are straightforward - the status of the ad group ad is updated as specified. If any other field has changed, it will be ignored. If you want to change any of the fields other than status, you must make a new ad and then remove the old one.

Remove - Removes the link between the specified AdGroup and Ad.

public mutate ( $operations ) : A
return A list of AdGroupAds where each entry in the list is the result of applying the operation in the input list with the same index. For an add/set operation, the return AdGroupAd will be what is saved to the db. In the case of the remove operation, the return AdGroupAd will simply be an AdGroupAd containing an Ad with the id set to the Ad being removed from the AdGroup.

mutateLabel() public method

Adds labels to the AdGroupAd or removes labels from the AdGroupAd.

Add - Apply an existing label to an existing {@linkplain AdGroupAd ad group ad}. The {@code adGroupId} and {@code adId} must reference an existing {@linkplain AdGroupAd ad group ad}. The {@code labelId} must reference an existing {@linkplain Label label}.

Remove - Removes the link between the specified {@linkplain AdGroupAd ad group ad} and {@linkplain Label label}.

public mutateLabel ( $operations ) : A
return A list of AdGroupAdLabel where each entry in the list is the result of applying the operation in the input list with the same index. For an add operation, the returned AdGroupAdLabel contains the AdGroupId, AdId and the LabelId. In the case of a remove operation, the returned AdGroupAdLabel will only have AdGroupId and AdId.

query() public method

Returns a list of AdGroupAds based on the query.
public query ( $query ) : A
return A list of AdGroupAds.

upgradeUrl() public method

Upgrades the url for a set of ads.
public upgradeUrl ( $operations ) : The
return The list of Ads that were upgraded.

Property Details

$classmap public_oe static_oe property

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

$endpoint public_oe static_oe property

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