$mcs = $this->adWordsService->getService(ManagedCustomerService::class, $mccId);
$link = new ManagedCustomerLink();
$link->setManagerCustomerId($mccId);
$link->setClientCustomerId($clientId);
$link->setLinkStatus(LinkStatus::PENDING);
$linkop = new LinkOperation();
$linkop->setOperator(Operator::ADD);
$linkop->setOperand($link);
$operations = array($linkop);
print_r($operations);
$result = $mcs->mutateLink($operations);
print_r($result);Array
(
[0] => Google\AdsApi\AdWords\v201809\mcm\LinkOperation Object
(
[operand:protected] => Google\AdsApi\AdWords\v201809\mcm\ManagedCustomerLink Object
(
[managerCustomerId:protected] => 897-646-0211
[clientCustomerId:protected] => 279-235-3443
[linkStatus:protected] => PENDING
[pendingDescriptiveName:protected] =>
[isHidden:protected] =>
)
[operator:protected] => ADD
[OperationType:protected] =>
[parameterMap:Google\AdsApi\AdWords\v201809\cm\Operation:private] => Array
(
[Operation.Type] => OperationType
)
)
)Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/