Show/Hide Toolbars

The following sample allocates money to an existing active account record.

Code Snippet

// this sample assumes an active account already exists with the unique key (String) value equal to uniqueKey

protected AccountRepository accountRepository;

//the allocated variable defines the monetary amount to allocate to the account

BigDecimal allocated = new BigDecimal("1000.000000000000");

//the third parameter of the allocateMoney method is a String description of the fund allocation transaction

accountRepository.allocateMoney(uniqueKey, allocated, "test money allocation through Web Services");