Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Product Partition Helper] Add createRemoveOperation method #253

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Google/AdsApi/AdWords/Shopping/v201702/ProductPartitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down