Class LedgerController


  • @RestController
    public class LedgerController
    extends Object
    • Method Detail

      • newLedger

        @PostMapping(path="/ledgers")
        public org.springframework.http.ResponseEntity<Void> newLedger​(LedgerBO ledger,
                                                                       org.springframework.web.util.UriBuilder uri)
        Creates a new Ledger.
        Parameters:
        ledger - Ledger object
        Returns:
        void response with HttpStatus 201 if successful
      • findLedgerById

        @GetMapping(path="/ledgers/{id}")
        public org.springframework.http.ResponseEntity<LedgerBO> findLedgerById​(@PathVariable("id")
                                                                                String id)
      • findLedgerByName

        @GetMapping(path="/ledgers",
                    params="ledgerName")
        public org.springframework.http.ResponseEntity<LedgerBO> findLedgerByName​(@RequestParam(name="ledgerName")
                                                                                  String ledgerName)
        Find the ledger with the given name.
        Parameters:
        ledgerName - name of corresponding Ledger
        Returns:
        Ledger object
      • newLedgerAccount

        @PostMapping(path="/accounts")
        public org.springframework.http.ResponseEntity<Void> newLedgerAccount​(@RequestBody
                                                                              LedgerAccountBO ledgerAccount,
                                                                              org.springframework.web.util.UriBuilder uri)
        Create a new Ledger account.

        While creating a ledger account, the parent hat to be specified.

        Parameters:
        ledgerAccount - Ledger account
        Returns:
        Void response with 201 HttpStatus if successful
      • findLedgerAccountById

        @GetMapping(path="/accounts/{id}")
        public org.springframework.http.ResponseEntity<LedgerAccountBO> findLedgerAccountById​(@PathVariable("id")
                                                                                              String id)
      • findLedgerAccountByName

        @GetMapping(path="/accounts",
                    params={"ledgerName","accountName"})
        public org.springframework.http.ResponseEntity<LedgerAccountBO> findLedgerAccountByName​(@RequestParam(name="ledgerName")
                                                                                                String ledgerName,
                                                                                                @RequestParam(name="accountName")
                                                                                                String accountName)
        Find the ledger account with the given ledger name and account name and reference date.
        Parameters:
        ledgerName - name of ledger
        accountName - name of account
        Returns:
        Ledger Account
      • findLedgerAccount

        @GetMapping(path="/ledgers/{ledgerId}/accounts",
                    params="accountName")
        public org.springframework.http.ResponseEntity<LedgerAccountBO> findLedgerAccount​(@PathVariable("ledgerId")
                                                                                          String ledgerId,
                                                                                          @RequestParam(name="accountName")
                                                                                          String accountName)
        Find the ledger account with the given name
        Parameters:
        accountName - name of corresponding account
        Returns:
        Ledger account