Hi there!

I need help, who know the possibility for the change statuses in campaign 
with Google\AdsApi\AdWords\v201809 (php library)

$adWordsServices = new AdWordsServices();
$campaignService = $adWordsServices->get($this->AdWordsSession, 
CampaignService::class);

// Create a campaign with Status.
$campaign = new Campaign();
$campaign->setId($google_campaign_id);
$campaign->setStatus(CampaignStatus::PAUSED);

// Create a campaign operation and add it to the list.
$operation = new CampaignOperation();
$operation->setOperand($campaign);
$operation->setOperator(Operator::SET);
$operations = [$operation];
// Update the campaign on the server.
$result = $campaignService->mutate($operations);
$val = $result->getValue()[0];

$res = [
    'getId' => $val->getId(),
    'getName' => $val->getName(),
    'getStatus' => $val->getStatus()
];


I want to change statuses for campaigns from ENABLED to PAUSED and vice 
versa. But now I getting with my script campaign with ENABLED status all 
time...


Thanks advance
Volodymyr Palamarchuk

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ad125430-d4a1-4fcc-ab51-3b966b2011a0%40googlegroups.com.

Reply via email to