Skip to content

SudoSOS Back-end API / invoicing / InvoiceController

Class: InvoiceController ​

The Invoice controller.

Extends ​

Constructors ​

Constructor ​

ts
new InvoiceController(options): InvoiceController;

Creates a new Invoice controller instance.

Parameters ​

ParameterTypeDescription
optionsBaseControllerOptionsThe options passed to the base controller.

Returns ​

InvoiceController

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 ​

createInvoice() ​

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

POST /invoices

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - The created invoice entity

Operation Id ​

createInvoice

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


deleteInvoice() ​

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

DELETE /invoices/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

404 - Invoice not found

Operation Id ​

deleteInvoice

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


deleteInvoiceUser() ​

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

DELETE /invoices/users/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

404 - Invoice User not found

Operation Id ​

deleteInvoiceUser

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


getAllInvoices() ​

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

GET /invoices

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - All existing invoices

Operation Id ​

getAllInvoices

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


getEligibleTransactions() ​

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

GET /invoices/eligible-transactions

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - The eligible transactions

Operation Id ​

getEligibleTransactions

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


getInvoicePDF() ​

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

GET /invoices/{id}/pdf

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

404 - Invoice not found

Operation Id ​

getInvoicePdf

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


getPolicy() ​

ts
getPolicy(): Policy;

Returns ​

Policy

Inhertidoc ​

Overrides ​

BaseController.getPolicy


getRouter() ​

ts
getRouter(): Router;

Returns ​

Router

the router used by this controller.

Inherited from ​

BaseController.getRouter


getSingleInvoice() ​

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

GET /invoices/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - All existing invoices

Operation Id ​

getSingleInvoice

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


getSingleInvoiceUser() ​

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

GET /invoices/users/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

404 - Invoice User not found

Operation Id ​

getSingleInvoiceUser

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


updateInvoice() ​

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

PATCH /invoices/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

200 - The updated invoice entity

Operation Id ​

updateInvoice

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


updateInvoiceUser() ​

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

PUT /invoices/users/

Parameters ​

ParameterType
reqRequestWithToken
resResponse

Returns ​

Promise<void>

404 - User not found

Operation Id ​

putInvoiceUser

Tags ​

invoices - Operations of the invoices controller

Security ​

JWT


getRelation() ​

ts
static getRelation(req): Promise<string>;

Function to determine which credentials are needed to get invoice all if user is not connected to invoice own if user is connected to invoice

Parameters ​

ParameterTypeDescription
reqRequestWithToken-

Returns ​

Promise<string>

whether invoice is connected to used token