code: public static void runExample(
        AdManagerServices adManagerServices,
        AdManagerSession session,
        long rateCardId,
        long productPackageItemId)
        throws RemoteException {
      // Get the BaseRateService.
      BaseRateServiceInterface baseRateService =
          adManagerServices.get(session, BaseRateServiceInterface.class);
  
      // Create a base rate for a product package item.
      ProductPackageItemBaseRate productPackageItemBaseRate = new ProductPackageItemBaseRate();
  
      // Set the rate card ID that the product package item base rate belongs to.
      productPackageItemBaseRate.setRateCardId(rateCardId);
  
      // Set the product package item the base rate will be applied to.
      productPackageItemBaseRate.setProductPackageItemId(productPackageItemId);
  
      // Create a rate worth $2 USD and set that on the product package item base rate.
      Money rate = new Money();
      rate.setCurrencyCode("USD");
      rate.setMicroAmount(2000000L);
      productPackageItemBaseRate.setRate(rate);
  
      // Create the product package item base rate on the server.
      BaseRate[] baseRates = baseRateService.createBaseRates(new BaseRate[] {
          productPackageItemBaseRate});
  
      for (BaseRate createdBaseRate : baseRates) {
        System.out.printf("A product package item base rate with ID %d and rate %.4f %s was"
            + " created.%n", createdBaseRate.getId(),
            (((ProductPackageItemBaseRate) createdBaseRate).getRate().getMicroAmount() / 1000000f),
            ((ProductPackageItemBaseRate) createdBaseRate).getRate().getCurrencyCode());
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param rateCardId the rate card ID to add the base rate to.
  @param productPackageItemId the product package item to apply the base rate to.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.