Search in sources :

Example 1 with RecordRefList

use of com.netsuite.webservices.v2016_2.platform.core.RecordRefList in project components by Talend.

the class NetSuiteOutputWriterIT method makeAccountRecords.

private static List<Account> makeAccountRecords(int count, RecordRef subsidiary) {
    List<Account> recordList = new ArrayList<>(count);
    for (int i = 1; i <= count; i++) {
        Account record = new Account();
        String id = Long.toString(System.currentTimeMillis());
        record.setAcctNumber(id);
        record.setAcctName("Test account " + id);
        record.setAcctType(AccountType.OTHER_ASSET);
        record.setDescription("Test description " + i);
        RecordRefList subsidiaries = new RecordRefList();
        subsidiaries.getRecordRef().add(subsidiary);
        record.setSubsidiaryList(subsidiaries);
        try {
            Thread.sleep(10);
        } catch (InterruptedException e) {
        }
        recordList.add(record);
    }
    return recordList;
}
Also used : RecordRefList(com.netsuite.webservices.v2016_2.platform.core.RecordRefList) Account(com.netsuite.webservices.v2016_2.lists.accounting.Account) ArrayList(java.util.ArrayList)

Aggregations

Account (com.netsuite.webservices.v2016_2.lists.accounting.Account)1 RecordRefList (com.netsuite.webservices.v2016_2.platform.core.RecordRefList)1 ArrayList (java.util.ArrayList)1