code: public static void runExample(
        AdManagerServices adManagerServices, AdManagerSession session, long orderId)
        throws RemoteException {
      // Get the OrderService.
      OrderServiceInterface orderService =
          adManagerServices.get(session, OrderServiceInterface.class);
  
      // Create a statement to only select a single order by ID.
      StatementBuilder statementBuilder =
          new StatementBuilder()
              .where("id = :id")
              .orderBy("id ASC")
              .limit(1)
              .withBindVariableValue("id", orderId);
  
      // Get the order.
      OrderPage page = orderService.getOrdersByStatement(statementBuilder.toStatement());
  
      Order order = Iterables.getOnlyElement(Arrays.asList(page.getResults()));
  
      // Update the order's notes.
      order.setNotes("Spoke to advertiser. All is well.");
  
      // Update the order on the server.
      Order[] orders = orderService.updateOrders(new Order[] {order});
  
      for (Order updatedOrder : orders) {
        System.out.printf(
            "Order with ID %d and name '%s' was updated.%n",
            updatedOrder.getId(), updatedOrder.getName());
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param orderId the ID of the order 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.