SudoSOS Back-end API / catalogue/vat / VatGroupController
Class: VatGroupController ​
The BaseController class is responsible for:
- Storing route definitions.
- Generating router objects based on the policy.
Extends ​
Constructors ​
Constructor ​
new VatGroupController(options): VatGroupController;Creates a new VAT Group controller instance.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
options | BaseControllerOptions | The options passed to the base controller. |
Returns ​
VatGroupController
Overrides ​
Properties ​
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
roleManager | protected | RoleManager | A reference to the role manager passed in the base controller options. | BaseController.roleManager |
specification | public | SwaggerSpecification | A reference to the swagger specification passed in the base controller options. | BaseController.specification |
Methods ​
createVatGroup() ​
createVatGroup(req, res): Promise<void>;POST /vatgroups
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The created VAT group entity
Operation Id ​
createVatGroup
Tags ​
vatGroups - Operations of the VAT group controller
Security ​
JWT
getAllVatGroups() ​
getAllVatGroups(req, res): Promise<void>;GET /vatgroups
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - A list of all VAT groups
Operation Id ​
getAllVatGroups
Tags ​
vatGroups - Operations of the VAT groups controller
Security ​
JWT
getPolicy() ​
getPolicy(): Policy;Gets the policy defined by child classes. This policy includes all routes that the controller accepts, the authorization middleware, and the final handler function for every route.
Returns ​
The policy of this controller.
Overrides ​
getRouter() ​
getRouter(): Router;Returns ​
Router
the router used by this controller.
Inherited from ​
getSingleVatGroup() ​
getSingleVatGroup(req, res): Promise<void>;GET /vatgroups/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The requested VAT group entity
Operation Id ​
getSingleVatGroup
Tags ​
vatGroups - Operations of the VAT groups controller
Security ​
JWT
getVatDeclarationAmounts() ​
getVatDeclarationAmounts(req, res): Promise<void>;GET /vatgroups/declaration
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - A list of all VAT groups with declarations
Operation Id ​
getVatDeclarationAmounts
Tags ​
vatGroups - Operations of the VAT groups controller
Security ​
JWT
updateVatGroup() ​
updateVatGroup(req, res): Promise<void>;PATCH /vatgroups/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The created VAT group entity
Operation Id ​
updateVatGroup
Tags ​
vatGroups - Operations of the VAT group controller
Security ​
JWT