Class SaleController
java.lang.Object
be.appify.prefab.example.sale.infrastructure.http.SaleController
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<SaleResponse> addCustomer(String id, @Valid SaleAddCustomerRequest request) org.springframework.http.ResponseEntity<SaleResponse> addItem(String id, @Valid SaleAddItemRequest request) org.springframework.http.ResponseEntity<SaleResponse> addPayment(String id, @Valid SaleAddPaymentRequest request) org.springframework.http.ResponseEntity<SaleResponse> org.springframework.http.ResponseEntity<Void> create(@Valid CreateSaleRequest request) org.springframework.http.ResponseEntity<SaleResponse> org.springframework.http.ResponseEntity<SaleResponse> setType(String id, @Valid SaleSetTypeRequest request)
-
Method Details
-
create
@RequestMapping(method=POST, path="") @PreAuthorize("hasAuthority('sale:create')") public org.springframework.http.ResponseEntity<Void> create(@Valid @RequestBody @Valid CreateSaleRequest request) -
getById
@RequestMapping(method=GET, path="/{id}") @PreAuthorize("hasAuthority('sale:view')") public org.springframework.http.ResponseEntity<SaleResponse> getById(@PathVariable String id) -
addItem
@RequestMapping(method=POST, path="/{id}/items") @PreAuthorize("hasAuthority('sale:add-item')") public org.springframework.http.ResponseEntity<SaleResponse> addItem(@PathVariable String id, @Valid @RequestBody @Valid SaleAddItemRequest request) -
addPayment
@RequestMapping(method=POST, path="/{id}/payments") @PreAuthorize("hasAuthority('sale:add-payment')") public org.springframework.http.ResponseEntity<SaleResponse> addPayment(@PathVariable String id, @Valid @RequestBody @Valid SaleAddPaymentRequest request) -
setType
@RequestMapping(method=POST, path="/{id}/type") @PreAuthorize("hasAuthority('sale:set-type')") public org.springframework.http.ResponseEntity<SaleResponse> setType(@PathVariable String id, @Valid @RequestBody @Valid SaleSetTypeRequest request) -
cancel
@RequestMapping(method=POST, path="/{id}/cancel") @PreAuthorize("hasAuthority('sale:cancel')") public org.springframework.http.ResponseEntity<SaleResponse> cancel(@PathVariable String id) -
addCustomer
@RequestMapping(method=POST, path="/{id}/customer") @PreAuthorize("hasAuthority('sale:add-customer')") public org.springframework.http.ResponseEntity<SaleResponse> addCustomer(@PathVariable String id, @Valid @RequestBody @Valid SaleAddCustomerRequest request)
-