public static OrderWS createOrderObject( Integer userId, Integer currencyId, Integer billingType, Integer orderPeriod, Date activeSince) { /* * Create */ OrderWS newOrder = new OrderWS(); newOrder.setUserId(userId); newOrder.setCurrencyId(currencyId); newOrder.setBillingTypeId(billingType); newOrder.setPeriod(orderPeriod); // Defaults newOrder.setNotes("Domain: www.test.com"); newOrder.setActiveSince(activeSince); // On some branches this field is present, please uncomment if required // newOrder.setCycleStarts(cal.getTime()); return newOrder; }