Hi,

If you have the budget ID then you would want to do something like this:

$mycampaignname= "abctaxis";

$campaign->budget = 50.00; 

  $budget = new Budget();
  $budget->id = *ENTER_EXISTING_BUDGET_ID_HERE*;
  *// NOTE: You only need to specify the values below if you want to change 
them*
  $budget->name = $mycampaignname.' budget';
  $budget->period = 'DAILY';
  $budget->amount = new Money($budget);
  $budget->deliveryMethod = $deliveryMethod;

  $operations = array();

  // Create operation.
  $operation = new BudgetOperation();
  $operation->operand = $budget;
  $operation->operator = 'SET';
  $operations[] = $operation;

  $budgetService = $user->GetService('BudgetService', ADWORDS_VERSION);
  // Make the mutate request.
  $result = $budgetService->mutate($operations);
  $budget = $result->value[0];

The key point is that you need to pass the ID of the existing budget and 
use a *SET* operation instead of an *ADD* operation.

Cheers,
Josh, AdWords API Team

On Thursday, March 27, 2014 12:56:51 PM UTC-4, Mike Young wrote:
>
> Was there an answer that would set a budget for a single campaign? (if I 
> have budget ID and campaign name in a variable stored already in a DB)
>
> I'm using AWQL method......
>
> Is it as Rick says...something like: -
>
> $mycampaignname= "abctaxis";
>
> $campaign->budget = 50.00; 
>
>   $budget = new Budget();
>   $budget->name = $mycampaignname.' budget';
>   $budget->period = 'DAILY';
>   $budget->amount = new Money($budget);
>   $budget->deliveryMethod = $deliveryMethod;
>
>   $operations = array();
>
>   // Create operation.
>   $operation = new BudgetOperation();
>   $operation->operand = $budget;
>   $operation->operator = 'ADD';
>   $operations[] = $operation;
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to