RE: PHP Update Budget

2022-04-12 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Mike,

Thanks for reaching out to the Google Ads API Forum.

To update the campaign budget, you may use the code sample for updating a 
campaign is given here. Can you please specify what part of the process that 
you're having trouble with? If you’re encountering any issues, could you 
provide us with the complete request and response logs with the request-id, so 
our team can better check?

You may enable logging for PHP client library by following this guide, and send 
the requested information via the Reply privately to author option. If this 
option is not available, you may send the details directly to our 
googleadsapi-supp...@google.com alias by referring to this thread.

Regards,

Yasar
Google Ads API Team
ref:_00D1U1174p._5004Q2ZM0zq:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/zbLbZ0RA8A7800cOnjPO6NSWqh2tfO1uofGA%40sfdc.net.


PHP Update Budget

2022-04-11 Thread Mike Behr
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]
);

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e009f935-5129-4c88-80dd-15326cb75078n%40googlegroups.com.