Class LedgerController
- java.lang.Object
-
- de.adorsys.ledgers.rest.posting.controller.LedgerController
-
@RestController public class LedgerController extends Object
-
-
Constructor Summary
Constructors Constructor Description LedgerController(Principal principal, LedgerService ledgerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<LedgerAccountBO>findLedgerAccount(String ledgerId, String accountName)Find the ledger account with the given nameorg.springframework.http.ResponseEntity<LedgerAccountBO>findLedgerAccountById(String id)org.springframework.http.ResponseEntity<LedgerAccountBO>findLedgerAccountByName(String ledgerName, String accountName)Find the ledger account with the given ledger name and account name and reference date.org.springframework.http.ResponseEntity<LedgerBO>findLedgerById(String id)org.springframework.http.ResponseEntity<LedgerBO>findLedgerByName(String ledgerName)Find the ledger with the given name.org.springframework.http.ResponseEntity<Void>newLedger(LedgerBO ledger, org.springframework.web.util.UriBuilder uri)Creates a new Ledger.org.springframework.http.ResponseEntity<Void>newLedgerAccount(LedgerAccountBO ledgerAccount, org.springframework.web.util.UriBuilder uri)Create a new Ledger account.
-
-
-
Constructor Detail
-
LedgerController
public LedgerController(Principal principal, LedgerService ledgerService)
-
-
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 ledgeraccountName- 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
-
-