I'm trying to update campaign budget
I can update the status & the name.
How can I update the budget:
$campaign = new Campaign([
'resource_name' => ResourceNames::forCampaign($customerId, $campaignId),
'status' => CampaignStatus::PAUSED,
'name' => 'Test ' . date( 'Y-m-d h:i' )
]);
// Constructs an operation that will update the campaign with the specified resource name,
// using the FieldMasks utility to derive the update mask. This mask tells the Google Ads
// API which attributes of the campaign you want to change.
$campaignOperation = new CampaignOperation();
$campaignOperation->setUpdate($campaign);
$campaignOperation->setUpdateMask(FieldMasks::allSetFieldsOf($campaign));
// Issues a mutate request to update the campaign.
$campaignServiceClient = $googleAdsClient->getCampaignServiceClient();
$response = $campaignServiceClient->mutateCampaigns(
$customerId,
[$campaignOperation]
);