Class ChartOfAccountController
java.lang.Object
org.cardanofoundation.lob.app.organisation.resource.ChartOfAccountController
@RestController
@RequestMapping("/api/v1/organisations")
@CrossOrigin(origins="http://localhost:3000")
@ConditionalOnProperty(value="lob.organisation.enabled",
havingValue="true",
matchIfMissing=true)
public class ChartOfAccountController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Set<ChartOfAccountView>> getChartOfAccounts(String orgId) org.springframework.http.ResponseEntity<List<ChartOfAccountTypeView>> getChartOfAccountTypes(String orgId) org.springframework.http.ResponseEntity<?> insertChartOfAccount(String orgId, @Valid ChartOfAccountUpdate chartOfAccountUpdate) org.springframework.http.ResponseEntity<?> insertChartOfAccountByCsv(String orgId, org.springframework.web.multipart.MultipartFile file) org.springframework.http.ResponseEntity<?> updateChartOfAccount(String orgId, @Valid ChartOfAccountUpdate chartOfAccountUpdate)
-
Constructor Details
-
ChartOfAccountController
public ChartOfAccountController()
-
-
Method Details
-
getChartOfAccountTypes
@GetMapping(value="/{orgId}/chart-types", produces="application/json") @Transactional public org.springframework.http.ResponseEntity<List<ChartOfAccountTypeView>> getChartOfAccountTypes(@PathVariable("orgId") String orgId) -
getChartOfAccounts
@GetMapping(value="/{orgId}/chart-of-accounts", produces="application/json") public org.springframework.http.ResponseEntity<Set<ChartOfAccountView>> getChartOfAccounts(@PathVariable("orgId") String orgId) -
insertChartOfAccount
@PostMapping(value="/{orgId}/chart-of-accounts", produces="application/json", consumes="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAccountantRole()) or hasRole(@securityConfig.getAdminRole())") public org.springframework.http.ResponseEntity<?> insertChartOfAccount(@PathVariable("orgId") String orgId, @Valid @RequestBody @Valid ChartOfAccountUpdate chartOfAccountUpdate) -
insertChartOfAccountByCsv
@PostMapping(value="/{orgId}/chart-of-accounts", consumes="multipart/form-data", produces="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAccountantRole()) or hasRole(@securityConfig.getAdminRole())") public org.springframework.http.ResponseEntity<?> insertChartOfAccountByCsv(@PathVariable("orgId") String orgId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file) -
updateChartOfAccount
@PutMapping(value="/{orgId}/chart-of-accounts", produces="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAccountantRole()) or hasRole(@securityConfig.getAdminRole())") public org.springframework.http.ResponseEntity<?> updateChartOfAccount(@PathVariable("orgId") String orgId, @Valid @RequestBody @Valid ChartOfAccountUpdate chartOfAccountUpdate)
-