From 8c8dc86c53338dad3c81ebd85362957309e70825 Mon Sep 17 00:00:00 2001 From: Jordan Crocker Date: Wed, 8 Mar 2017 16:11:36 +0000 Subject: [PATCH] [Product Partition Helper] Add createRemoveOperation method --- .../Shopping/v201702/ProductPartitions.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Google/AdsApi/AdWords/Shopping/v201702/ProductPartitions.php b/src/Google/AdsApi/AdWords/Shopping/v201702/ProductPartitions.php index 0e0011e75..4c5cb26da 100755 --- a/src/Google/AdsApi/AdWords/Shopping/v201702/ProductPartitions.php +++ b/src/Google/AdsApi/AdWords/Shopping/v201702/ProductPartitions.php @@ -171,6 +171,21 @@ public static function createAddOperation(AdGroupCriterion $criterion) { return $operation; } + + /** + * Creates an ad group criterion operation for the given criterion. + * + * @param AdGroupCriterion $criterion the ad group criterion to create the + * REMOVE operation + * @return AdGroupCriterionOperation the ad group criterion operation + */ + public static function createRemoveOperation(AdGroupCriterion $criterion) { + $operation = new AdGroupCriterionOperation(); + $operation->setOperand($criterion); + $operation->setOperator(Operator::REMOVE); + + return $operation; + } /** * Returns the string representation of ad group criteria of the specified * ad group ID by showing them hierarchically.