code: public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
        throws RemoteException {
      // Get the ExchangeRateService.
      ExchangeRateServiceInterface exchangeRateService =
          adManagerServices.get(session, ExchangeRateServiceInterface.class);
  
      // Create an exchange rate.
      ExchangeRate exchangeRate = new ExchangeRate();
  
      // Set the currency code.
      exchangeRate.setCurrencyCode("AUD");
  
      // Set the direction of the conversion (from the network currency).
      exchangeRate.setDirection(ExchangeRateDirection.FROM_NETWORK);
  
      // Set the conversion value as 1.5 (this value is multiplied by 10,000,000,000)
      exchangeRate.setExchangeRate(15000000000L);
  
      // Do not refresh exchange rate from Google data. Update manually only.
      exchangeRate.setRefreshRate(ExchangeRateRefreshRate.FIXED);
  
      // Create the exchange rate on the server.
      ExchangeRate[] exchangeRates =
          exchangeRateService.createExchangeRates(new ExchangeRate[] {exchangeRate});
  
      for (ExchangeRate createdExchangeRate : exchangeRates) {
        System.out.printf(
            "An exchange rate with ID %d, currency code '%s',"
                + " direction '%s', and exchange rate %.2f was created.%n",
            createdExchangeRate.getId(),
            createdExchangeRate.getCurrencyCode(),
            createdExchangeRate.getDirection().getValue(),
            (createdExchangeRate.getExchangeRate() / 10000000000f));
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.