PHP Class ProductPartitionHelper, googleads-php-lib

Exibir arquivo Open project: googleads/googleads-php-lib Class Usage Examples

Public Methods

Method Description
__construct ( integer $adGroupId ) Constructor
createSubdivision ( ProductPartition $parent = null, ProductDimension $value = null ) : ProductPartition Creates a subdivision node
createUnit ( ProductPartition $parent = null, ProductDimension $value = null, integer $bid_amount = null ) : ProductPartition Creates a unit node.
getOperations ( ) : array Returns the set of mutate operations needed to create the current tree.

Private Methods

Method Description
createAddOperation ( AdGroupCriterion $criterion ) Creates an AdGroupCriterionOperation for the given criterion

Method Details

__construct() public method

Constructor
public __construct ( integer $adGroupId )
$adGroupId integer The ID of the AdGroup that we wish to attach the partition tree to.

createSubdivision() public method

Creates a subdivision node
public createSubdivision ( ProductPartition $parent = null, ProductDimension $value = null ) : ProductPartition
$parent ProductPartition The node that should be this node's parent
$value ProductDimension The value being partitioned on
return ProductPartition A new subdivision node

createUnit() public method

Creates a unit node.
public createUnit ( ProductPartition $parent = null, ProductDimension $value = null, integer $bid_amount = null ) : ProductPartition
$parent ProductPartition The node that should be this node's parent
$value ProductDimension The value being partitioned on
$bid_amount integer The amount to bid for matching products, in micros
return ProductPartition A new unit node

getOperations() public method

Returns the set of mutate operations needed to create the current tree.
public getOperations ( ) : array
return array The set of operations