Class ReferenceCodeResource

java.lang.Object
org.cardanofoundation.lob.app.organisation.resource.ReferenceCodeResource

@RestController @RequestMapping("/api/v1/organisations") @CrossOrigin(origins="http://localhost:3000") @ConditionalOnProperty(value="lob.organisation.enabled", havingValue="true", matchIfMissing=true) public class ReferenceCodeResource extends Object
  • Constructor Details

    • ReferenceCodeResource

      public ReferenceCodeResource()
  • Method Details

    • getReferenceCodes

      @GetMapping(value="/{orgId}/reference-codes", produces="application/json") public List<ReferenceCodeView> getReferenceCodes(@PathVariable("orgId") String orgId)
    • insertReferenceCode

      @PostMapping(value="/{orgId}/reference-codes", produces="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAccountantRole()) or hasRole(@securityConfig.getAdminRole())") public org.springframework.http.ResponseEntity<?> insertReferenceCode(@PathVariable("orgId") String orgId, @Valid @RequestBody @Valid ReferenceCodeUpdate referenceCodeUpdate)
    • insertRefCodeByCsv

      @PostMapping(value="/{orgId}/reference-codes", consumes="multipart/form-data", produces="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAccountantRole()) or hasRole(@securityConfig.getAdminRole())") public org.springframework.http.ResponseEntity<?> insertRefCodeByCsv(@PathVariable("orgId") String orgId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file)
    • updateReferenceCode

      @PutMapping(value="/{orgId}/reference-codes", produces="application/json") @PreAuthorize("hasRole(@securityConfig.getManagerRole()) or hasRole(@securityConfig.getAccountantRole()) or hasRole(@securityConfig.getAdminRole())") public org.springframework.http.ResponseEntity<?> updateReferenceCode(@PathVariable("orgId") String orgId, @Valid @RequestBody @Valid ReferenceCodeUpdate referenceCodeUpdate)