code: public static void runExample(
        AdManagerServices adManagerServices, AdManagerSession session, long exchangeRateId)
        throws RemoteException {
      // Get the ExchangeRateService.
      ExchangeRateServiceInterface exchangeRateService =
          adManagerServices.get(session, ExchangeRateServiceInterface.class);
  
      // Create a statement to only select a single exchange rate by ID.
      StatementBuilder statementBuilder =
          new StatementBuilder()
              .where("id = :id and refreshRate = :refreshRate")
              .orderBy("id ASC")
              .limit(1)
              .withBindVariableValue("id", exchangeRateId)
              .withBindVariableValue("refreshRate", ExchangeRateRefreshRate.FIXED);
  
      // Get the exchange rate.
      ExchangeRatePage page =
          exchangeRateService.getExchangeRatesByStatement(statementBuilder.toStatement());
  
      ExchangeRate exchangeRate = Iterables.getOnlyElement(Arrays.asList(page.getResults()));
  
      // Update the exchange rate value to 1.5.
      exchangeRate.setExchangeRate(15000000000L);
  
      // Update the exchange rate on the server.
      ExchangeRate[] exchangeRates =
          exchangeRateService.updateExchangeRates(new ExchangeRate[] {exchangeRate});
  
      for (ExchangeRate updatedExchangeRate : exchangeRates) {
        System.out.printf(
            "Exchange rate with ID %d, currency code '%s',"
                + " direction '%s', and exchange rate %.2f was updated.%n",
            updatedExchangeRate.getId(),
            updatedExchangeRate.getCurrencyCode(),
            updatedExchangeRate.getDirection().getValue(),
            (updatedExchangeRate.getExchangeRate() / 10000000000f));
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param exchangeRateId the ID of the exchange rate to update.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.