PHP Class CampaignService, googleads-php-lib

Show file Open project: googleads/googleads-php-lib Class Usage Examples

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 ) : A This field is required and should not be {@code null}.
mutate ( $operations ) : The 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}. The following {@link Operator}s are supported: ADD, SET.
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}.

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 the list of campaigns that meet the selector criteria.
public get ( $serviceSelector ) : A
return A list of campaigns.

mutate() public method

Adds, updates, or removes campaigns.

Note: {@link CampaignOperation} does not support the REMOVE operator. To remove a campaign, set its {@link Campaign#status status} to {@code REMOVED}.

public mutate ( $operations ) : The
return The list of updated campaigns, returned in the same order as the operations array.

mutateLabel() public method

Adds labels to the {@linkplain Campaign campaign} or removes {@linkplain Label label}s from the {@linkplain Campaign campaign}.

Add - Apply an existing label to an existing {@linkplain Campaign campaign}. The {@code campaignId} must reference an existing {@linkplain Campaign}. The {@code labelId} must reference an existing {@linkplain Label label}.

Remove - Removes the link between the specified {@linkplain Campaign campaign} and {@linkplain Label label}.

public mutateLabel ( $operations ) : a
return a list of {@linkplain CampaignLabel}s 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 CampaignLabel contains the CampaignId and the LabelId. In the case of a remove operation, the returned CampaignLabel will only have CampaignId.

query() public method

Returns the list of campaigns that match the query.
public query ( $query ) : A
return A list of campaigns.

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