Skip to content

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 ​

ts
new VatGroupController(options): VatGroupController;

Creates a new VAT Group controller instance.

Parameters ​

ParameterTypeDescription
optionsBaseControllerOptionsThe options passed to the base controller.

Returns ​

VatGroupController

Overrides ​

BaseController.constructor

Properties ​

PropertyModifierTypeDescriptionInherited from
roleManagerprotectedRoleManagerA reference to the role manager passed in the base controller options.BaseController.roleManager
specificationpublicSwaggerSpecificationA reference to the swagger specification passed in the base controller options.BaseController.specification

Methods ​

createVatGroup() ​

ts
createVatGroup(req, res): Promise<void>;

POST /vatgroups

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - The created VAT group entity

Operation Id ​

createVatGroup

Tags ​

vatGroups - Operations of the VAT group controller

Security ​

JWT


getAllVatGroups() ​

ts
getAllVatGroups(req, res): Promise<void>;

GET /vatgroups

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - A list of all VAT groups

Operation Id ​

getAllVatGroups

Tags ​

vatGroups - Operations of the VAT groups controller

Security ​

JWT


getPolicy() ​

ts
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 ​

Policy

The policy of this controller.

Overrides ​

BaseController.getPolicy


getRouter() ​

ts
getRouter(): Router;

Returns ​

Router

the router used by this controller.

Inherited from ​

BaseController.getRouter


getSingleVatGroup() ​

ts
getSingleVatGroup(req, res): Promise<void>;

GET /vatgroups/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - The requested VAT group entity

Operation Id ​

getSingleVatGroup

Tags ​

vatGroups - Operations of the VAT groups controller

Security ​

JWT


getVatDeclarationAmounts() ​

ts
getVatDeclarationAmounts(req, res): Promise<void>;

GET /vatgroups/declaration

Parameters ​

ParameterType
reqRequestWithToken
resResponse

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() ​

ts
updateVatGroup(req, res): Promise<void>;

PATCH /vatgroups/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - The created VAT group entity

Operation Id ​

updateVatGroup

Tags ​

vatGroups - Operations of the VAT group controller

Security ​

JWT