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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetReferenceCodes(String orgId) org.springframework.http.ResponseEntity<?> insertRefCodeByCsv(String orgId, org.springframework.web.multipart.MultipartFile file) org.springframework.http.ResponseEntity<?> insertReferenceCode(String orgId, @Valid ReferenceCodeUpdate referenceCodeUpdate) org.springframework.http.ResponseEntity<?> updateReferenceCode(String orgId, @Valid ReferenceCodeUpdate referenceCodeUpdate)
-
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)
-