Hi Burak,

The only example we have shows how to create a 
Budget<https://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201309/basicoperations/AddCampaigns.java>,
 
not modify one.

However the modification code is very similar. Just specify the shaedBudget.
*budgetId* and the required changes, then make the request to BudgetService.
*modify()* with a budgetOperation.*operator* = Operator.*SET*. This will 
change the budget for all associated campaigns.

Regards,

- Paul, AdWords API Team.

On Friday, 13 December 2013 12:11:16 UTC, Burak Yavuzer wrote:
>
> I will update the campaign budget, for example, Can you give me a code.s
>
> 9 Aralık 2013 Pazartesi 17:07:32 UTC+2 tarihinde Burak Yavuzer yazdı:
>>
>> Hi,
>>
>> I am getting error while trying to update the campaign budget.s Please 
>> help me in this matter.
>>
>> The code example below;
>>
>> BudgetService budgetService 
>> =(BudgetService)user.GetService(AdWordsService.v201309.BudgetService);
>>
>>         CampaignService campaignService 
>> =(CampaignService)user.GetService(AdWordsService.v201309.CampaignService);
>>
>>         campaignId = long.Parse(campaignIdd);
>>         
>>
>>
>>         Campaign campaign = new Campaign();
>>         campaign.id = campaignId;
>>
>>         Budget budget = new Budget();
>>         campaign.budget = new Budget();
>>         campaign.budget.budgetId = budget.budgetId;
>>         budget.amount = new Money();
>>         budget.budgetId = campaign.id;
>>         budget.name = "Interplanetary Cruise Budget #" + 1;
>>         budget.period = BudgetBudgetPeriod.DAILY;
>>         budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD;
>>         budget.amount.microAmount = campaignBd * 1000000;
>>         campaign.budget = budget;
>>
>>         
>>
>>
>>        /* BudgetOperation budgetOperation = new BudgetOperation();
>>         budgetOperation.@operator = Operator.SET;
>>         budgetOperation.operand = budget;*/
>>
>>        
>>
>>         CampaignOperation operation = new CampaignOperation();
>>         operation.@operator = Operator.SET;
>>         operation.operand = campaign;
>>
>>        
>>
>>         // Update the campaign.
>>         CampaignReturnValue retVal = campaignService.mutate((new 
>> CampaignOperation[] { operation }));
>>        // BudgetReturnValue retVal = budgetService.mutate((new 
>> BudgetOperation[] { budgetOperation }));
>>
>>         // Display the results.
>>         if (retVal != null && retVal.value != null && retVal.value.Length 
>> > 0)
>>         {
>>             Campaign updatedCampaign = retVal.value[0];
>>             Literal1.Text="Campaign with name = '{0}' and id = '{1}' was 
>> updated." + updatedCampaign.name + updatedCampaign.id;
>>         }
>>         else
>>         {
>>             Literal1.Text="No campaigns were updated.";
>>         }
>>
>> Help me.s
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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/groups/opt_out.

Reply via email to