Class InvoiceController
java.lang.Object
springboot.bg.harisauto.invoice.web.InvoiceController
InvoiceController.java - Web endpoints for listing, viewing, and downloading invoices.
- Author:
- Kristian Popov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.servlet.ModelAndViewdetail(UUID id, AuthenticationMetaData metaData) Show invoice detail page.org.springframework.http.ResponseEntity<byte[]> downloadPdf(UUID id, AuthenticationMetaData metaData) Download invoice as PDF.org.springframework.web.servlet.ModelAndViewlist(AuthenticationMetaData metaData) List all invoices for the current user.
-
Constructor Details
-
InvoiceController
-
-
Method Details
-
list
@GetMapping public org.springframework.web.servlet.ModelAndView list(@AuthenticationPrincipal AuthenticationMetaData metaData) List all invoices for the current user. -
detail
@GetMapping("/{id}") public org.springframework.web.servlet.ModelAndView detail(@PathVariable("id") UUID id, @AuthenticationPrincipal AuthenticationMetaData metaData) Show invoice detail page. -
downloadPdf
@GetMapping("/{id}/pdf") public org.springframework.http.ResponseEntity<byte[]> downloadPdf(@PathVariable("id") UUID id, @AuthenticationPrincipal AuthenticationMetaData metaData) Download invoice as PDF.
-