Skip to content

Commit

Permalink
using getLatestVersion method instead of getVersion18
Browse files Browse the repository at this point in the history
  • Loading branch information
vietvd88 committed Nov 29, 2024
1 parent dbbc0d4 commit d76e4f0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private Iterable<GoogleAdsServiceClient.SearchPage> search(Map<String, String> p
String query = buildQuery(task, params);
logger.info(query);
SearchGoogleAdsRequest request = buildRequest(task, query);
GoogleAdsServiceClient googleAdsService = client.getVersion18().createGoogleAdsServiceClient();
GoogleAdsServiceClient googleAdsService = client.getLatestVersion().createGoogleAdsServiceClient();
GoogleAdsServiceClient.SearchPagedResponse response = googleAdsService.search(request);
return response.iteratePages();
}
Expand Down Expand Up @@ -344,7 +344,7 @@ private Long getLoginCustomerId(String customerId)

private List<Long> getLoginCustomerIds(String customerId)
{
try (CustomerServiceClient client = buildClient(null).getVersion18().createCustomerServiceClient()) {
try (CustomerServiceClient client = buildClient(null).getLatestVersion().createCustomerServiceClient()) {
return client.listAccessibleCustomers(ListAccessibleCustomersRequest.newBuilder().build())
.getResourceNamesList()
.stream()
Expand Down

0 comments on commit d76e4f0

Please sign in to comment.