\Google\AdsApi\AdWords\Shopping\v201809ProductPartitions

Provides methods for creating product partition trees for specified ad group IDs and for adding their corresponding ad group criteria on the server.

Summary

Methods
Properties
Constants
createSubdivision()
createUnit()
asBiddableAdGroupCriterion()
asNegativeAdGroupCriterion()
createAddOperation()
createRemoveOperation()
createSetOperation()
showAdGroupTree()
No public properties found
PAGE_LIMIT
No protected methods found
No protected properties found
N/A
createAdGroupCriterionOperation()
traverseTree()
$nextId
N/A

Constants

PAGE_LIMIT

PAGE_LIMIT

Properties

$nextId

$nextId :

The next temporary criterion ID to be used.

When creating our tree we need to specify the parent-child relationships between nodes. However, until a criterion has been created on the server we do not have a criterion ID with which to refer to it.

Instead we can specify temporary IDs that are specific to a single mutate request. Once the criteria have been created they are assigned an ID as normal and the temporary ID will no longer refer to it.

A valid temporary ID is any negative integer.

Type

Methods

createSubdivision()

createSubdivision(null|\Google\AdsApi\AdWords\v201809\cm\ProductPartition  $parent = null,null|\Google\AdsApi\AdWords\v201809\cm\ProductDimension  $value = null): \Google\AdsApi\AdWords\v201809\cm\ProductPartition

Creates a subdivision node (product partition) by specifying the parent node and the value being partitioned on.

Parameters

null|\Google\AdsApi\AdWords\v201809\cm\ProductPartition $parent

the parent product partition for a newly created subdivision

null|\Google\AdsApi\AdWords\v201809\cm\ProductDimension $value

the case value for a newly created subdivision

Returns

\Google\AdsApi\AdWords\v201809\cm\ProductPartition —

the newly created product partition

createUnit()

createUnit(null|\Google\AdsApi\AdWords\v201809\cm\ProductPartition  $parent = null,null|\Google\AdsApi\AdWords\v201809\cm\ProductDimension  $value = null): \Google\AdsApi\AdWords\v201809\cm\ProductPartition

Creates a unit node (product partition) by specifying the parent node and the value being partitioned on.

Parameters

null|\Google\AdsApi\AdWords\v201809\cm\ProductPartition $parent

the parent product partition for a newly created unit

null|\Google\AdsApi\AdWords\v201809\cm\ProductDimension $value

the case value for a newly created unit

Returns

\Google\AdsApi\AdWords\v201809\cm\ProductPartition —

the newly created product partition

asBiddableAdGroupCriterion()

asBiddableAdGroupCriterion(integer  $adGroupId,\Google\AdsApi\AdWords\v201809\cm\ProductPartition  $productPartition,  $bidAmount = null): \Google\AdsApi\AdWords\v201809\cm\BiddableAdGroupCriterion

Returns the biddable ad group criterion with by specifying the product partition and bid amount.

Parameters

integer $adGroupId

the ID of ad group that this ad group criterion is created under

\Google\AdsApi\AdWords\v201809\cm\ProductPartition $productPartition

the product partition to create an ad group criterion

$bidAmount

Returns

\Google\AdsApi\AdWords\v201809\cm\BiddableAdGroupCriterion —

the created biddable ad group criterion

asNegativeAdGroupCriterion()

asNegativeAdGroupCriterion(integer  $adGroupId,\Google\AdsApi\AdWords\v201809\cm\ProductPartition  $productPartition): \Google\AdsApi\AdWords\v201809\cm\NegativeAdGroupCriterion

Returns the negative ad group criterion with by specifying the product partition.

Parameters

integer $adGroupId

the ID of ad group that this ad group criterion is created under

\Google\AdsApi\AdWords\v201809\cm\ProductPartition $productPartition

the product partition to create an ad group criterion

Returns

\Google\AdsApi\AdWords\v201809\cm\NegativeAdGroupCriterion —

the created negative ad group criterion

createAddOperation()

createAddOperation(\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion  $criterion): \Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation

Creates an ADD operation for the given ad group criterion.

Parameters

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion $criterion

the ad group criterion to create the ADD operation

Returns

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation —

the ADD ad group criterion operation

createRemoveOperation()

createRemoveOperation(\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion  $criterion): \Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation

Creates a REMOVE operation for the given ad group criterion.

Parameters

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion $criterion

the ad group criterion to create the REMOVE operation

Returns

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation —

the REMOVE ad group criterion operation

createSetOperation()

createSetOperation(\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion  $criterion): \Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation

Creates a SET operation for the given ad group criterion.

Parameters

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion $criterion

the ad group criterion to create the SET operation

Returns

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation —

the SET ad group criterion operation

showAdGroupTree()

showAdGroupTree(\Google\AdsApi\AdWords\AdWordsServices  $adWordsServices,\Google\AdsApi\AdWords\AdWordsSession  $session,integer  $adGroupId): string

Returns the string representation of ad group criteria of the specified ad group ID by showing them hierarchically.

Parameters

\Google\AdsApi\AdWords\AdWordsServices $adWordsServices

the AdWords services used to send the operations to be created on the server

\Google\AdsApi\AdWords\AdWordsSession $session

the AdWords session used to call AdWords API server

integer $adGroupId

the ID of ad group whose members will be presented hierarchically

Returns

string —

the representation of the ad group criteria

createAdGroupCriterionOperation()

createAdGroupCriterionOperation(\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion  $criterion,string  $operator): \Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation

Creates an ad group criterion operation for the given ad group criterion.

Parameters

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion $criterion

the ad group criterion

string $operator

the operator for the operation

Returns

\Google\AdsApi\AdWords\v201809\cm\AdGroupCriterionOperation —

the ad group criterion operation

traverseTree()

traverseTree(\Google\AdsApi\AdWords\v201809\cm\Criterion  $node,array  $children,  $level)

Recursively traverses this tree and returns its string representation.

Parameters

\Google\AdsApi\AdWords\v201809\cm\Criterion $node
array $children
$level