There's so much information online for AdWords API but almost nothing for the Google Ads.
Everywhere I look I see suggestions to use CustomerService.getCustomers() but this command is meaningless when working with Google Ads api, because you need an AdWordsSession instance.
WIth the code below I can manage to extract their ID somehow off the GoogleAdsRow but can't find their name:
try (GoogleAdsServiceClient googleAdsServiceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
String query = "SELECT
customer.id, customer.descriptive_name, customer_client.resource_name, customer_client.client_customer, customer_client.level, customer_client.hidden FROM customer_client";
SearchGoogleAdsRequest request = SearchGoogleAdsRequest.newBuilder().setCustomerId(Long.toString(customerId)).setPageSize(PAGE_SIZE).setQuery(query).build();
SearchPagedResponse searchPagedResponse = googleAdsServiceClient.search(request);
for (GoogleAdsRow googleAdsRow : searchPagedResponse.iterateAll()) {
Customer customer = googleAdsRow.getCustomer();
System.out.println(customer.???);
}
}