Hi,
i'm using the adowrds api ,
we are migrating the version to 201607
one of the changes in this version is the way we get the customers , the get method will not be in the new version and will be new method getCustomers()
in the previous version we did
currently in 201605 we used this method =>
Customer mainCustomer = customerService.get();
and in case mainCustomer.getCanManageClients() equal to true
we used this code to get all customers
String mccCustomerId = mainCustomer.getCustomerId().toString();
ManagedCustomerServiceInterface customerServiceInterface = adWordsServices.get(session, ManagedCustomerServiceInterface.class);
// Create selector.
com.google.api.ads.adwords.axis.v201605.cm.Selector selector = new com.google.api.ads.adwords.axis.v201605.cm.Selector();
selector.setFields(new String[] { "Name", "CustomerId", "CurrencyCode", "DateTimeZone", "CanManageClients" });
// Get results.
ManagedCustomerPage page = customerServiceInterface.get(selector);
when i try to get the customers by the new version we got an error that no such method .
example what we trying to do => Customer []mainCustomer2 = customerService.getCustomers();
the log : Method threw 'java.lang.NoSuchMethodError' exception.
cause/detailMessage : => com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
questions
1)how to solve the problem ?
2)is there an migration guide for customers ? i didn't found in the library it only have the campaigns .
3)how to get mainCustomer , and how to get all the customers that related to this mainCustomer .
Thanks in advance,
Raneen.