To be more precise, all I want was to replace this
long sum = 0;
ServiceAccountant serviceAccountant;
final Stub[] retainedServices =
accountantManager.getRetainedServicesForUser(user);
for (Stub stub : retainedServices)
{
serviceAccountant =
accountantManager.getServiceAccountant(stub);
if (serviceAccountant != null)
{
sum += serviceAccountant.getTotalUnitCount();
}
}
return sum;
to the new API
Am Mittwoch, 17. Oktober 2012 13:53:49 UTC+2 schrieb json:
>
> Hi,
>
> I have a problem to get the unit costs for clients for today. I'll use
> v201206 with the Java client lib.
>
> InfoSelector selector = new InfoSelector();
> selector.setApiUsageType(ApiUsageType.UNIT_COUNT_FOR_CLIENTS);
> selector.setClientCustomerIds(new long[]
> {
> 123456789
> });
> selector.setIncludeSubAccounts(true);
> final String nowTime = new SimpleDateFormat("yyyyMMdd").format(new
> DateTime().toDate());
> selector.setDateRange(new DateRange(nowTime, nowTime));
> final AdWordsServices adWordsServices = new AdWordsServices();
> final InfoServiceInterface infoService =
> adWordsServices.get(user, InfoServiceInterface.class);
> final ApiUsageInfo apiUsageInfo = infoService.get(selector);
>
> Now I can't get any costs. They are still 0.
>
> - Thanks
>
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en