I'm struggling to get a budget object using such approach: $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); $query = "SELECT campaign.id, campaign.name, campaign.campaign_budget, label.id, label.name " . "FROM campaign_label LIMIT 2"; $response = $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); $result = []; foreach ($response->iterateAllElements() as $googleAdsRow) { $result[] = [ 'budget_id' => $googleAdsRow->getCampaign()->getBudget()->getBudgetId(), ]; }
echo json_encode($result); I get an error: undefined method Campaign::getBudget() I understand I may need to select some other budget related field, in order to have the getBudget method available, but I can not find specifications of AWQL to know what fields and resources are available to select from? Where can I find this information? Any suggestion towards how can I edit the budget amount would be much appreciated based on my approach. Thank you On Thursday, December 16, 2021 at 6:32:55 PM UTC adsapi wrote: > Hi Jurijs, > > Thanks for reaching out. You can use the Get Campaign by Label example and > use the CampaignService to update > <https://developers.google.com/google-ads/api/reference/rpc/v9/CampaignOperation#update> > > the budget of that campaign after retrieving each campaign. This is > discussed in the campaign budgets guide > <https://developers.google.com/google-ads/api/docs/campaigns/budgets/assign-budgets#existing-campaign> > . > > Regards, > Matt > Google Ads API Team > > > Reminder: Share your feedback about the Google Ads (AdWords) API! Take the > 2021 > Google Ads API and AdWords API Annual Survey > <https://google.qualtrics.com/jfe/form/SV_eQbOpf4VxRyyqqO?source=so> > > [image: Google Logo] > Matt > Google Ads API Team > > > ref:_00D1U1174p._5004Q2TLj0t: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 "AdWords API and Google Ads 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/11d910d9-5d65-426c-8f23-0d27fdb53ed9n%40googlegroups.com.