code: public Iteration iteration(String name, Schedule schedule,
                                 DateTime beginDate, DateTime endDate, Map<String, Object> attributes) {
          Iteration iteration = new Iteration(instance);
  
          iteration.setName(name);
          iteration.setSchedule(schedule);
          iteration.setBeginDate(beginDate);
          iteration.setEndDate(endDate);
          addAttributes(iteration, attributes);
          iteration.save();
          return iteration;
      }
docs: Create a new iteration with a name, begin date, and end date.
  
  @param name       The name of the iteration.
  @param schedule   The schedule this iteration belongs to.
  @param beginDate  The begin date or start date of this iteration.
  @param endDate    The end date of this iteration.
  @param attributes additional attributes for the Iteration.
  @return A newly minted Iteration that exists in the VersionOne system.