code: public static void runExample(
        AdManagerServices adManagerServices, AdManagerSession session, long baseRateId)
        throws RemoteException {
      // Get the BaseRateService.
      BaseRateServiceInterface baseRateService =
          adManagerServices.get(session, BaseRateServiceInterface.class);
  
      // Create a statement to only select a single base rate by ID.
      StatementBuilder statementBuilder =
          new StatementBuilder()
              .where("id = :id")
              .orderBy("id ASC")
              .limit(1)
              .withBindVariableValue("id", baseRateId);
  
      // Get the base rate.
      BaseRatePage page = baseRateService.getBaseRatesByStatement(statementBuilder.toStatement());
  
      BaseRate baseRate = Iterables.getOnlyElement(Arrays.asList(page.getResults()));
  
      // Update base rate value to $3 USD.
      Money newRate = new Money();
      newRate.setCurrencyCode("USD");
      newRate.setMicroAmount(3000000L);
  
      if (baseRate instanceof ProductTemplateBaseRate) {
        ((ProductTemplateBaseRate) baseRate).setRate(newRate);
      } else if (baseRate instanceof ProductBaseRate) {
        ((ProductBaseRate) baseRate).setRate(newRate);
      }
  
      // Update the base rate on the server.
      BaseRate[] baseRates = baseRateService.updateBaseRates(new BaseRate[] {baseRate});
  
      for (BaseRate updatedBaseRate : baseRates) {
        System.out.printf(
            "Base rate with ID %d and type '%s'," + " belonging to rate card ID %d was updated.%n",
            updatedBaseRate.getId(),
            updatedBaseRate.getClass().getSimpleName(),
            updatedBaseRate.getRateCardId());
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param baseRateId the base rate ID 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.