code: public static void runExample(
        AdManagerServices adManagerServices, AdManagerSession session, long rateCardId)
        throws RemoteException {
      ProductPackageServiceInterface productPackageService =
          adManagerServices.get(session, ProductPackageServiceInterface.class);
  
      // Create a local product package.
      ProductPackage productPackage = new ProductPackage();
      productPackage.setName("Product package #" + new Random().nextInt(Integer.MAX_VALUE));
      productPackage.setRateCardIds(new long[] {rateCardId});
  
      // Create the product package on the server.
      ProductPackage[] productPackages =
          productPackageService.createProductPackages(new ProductPackage[] {productPackage});
  
      for (ProductPackage createdProductPackage : productPackages) {
        System.out.printf(
            "A product package with ID %d and name '%s' was created.%n",
            createdProductPackage.getId(), createdProductPackage.getName());
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param rateCardId the ID of the rate card to associate the product package with.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.