Added billing getTaxes endpoint + doc
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
}
}
}
+ },
+ "/api/billing/taxes": {
+ "get": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Get billing taxes",
+ "tags": [
+ "Billing"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return billing taxes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "###"
+ },
+ "description": {
+ "type": "string",
+ "example": "###"
+ },
+ "displayName": {
+ "type": "string",
+ "example": "###"
+ },
+ "percentage": {
+ "type": "number",
+ "example": "20"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ }
}
},
"components": {

MODIFY
src/server/rest/v1/router/api/BillingRouter.ts
src/server/rest/v1/router/api/BillingRouter.ts
@@ -36,6 +36,10 @@ export default class BillingRouter {
this.buildRouteBillingInvoices();
this.buildRouteBillingInvoice();
this.buildRouteBillingInvoiceDownload();
+ // -----------------------------------
+ // ROUTES for TAXES
+ // -----------------------------------
+ this.buildRouteBillingGetTaxes();
return this.router;
}
@@ -128,4 +132,10 @@ export default class BillingRouter {
void RouterUtils.handleServerAction(BillingService.handleDownloadInvoice.bind(this), ServerAction.BILLING_DOWNLOAD_INVOICE, req, res, next);
});
}
+
+ private buildRouteBillingGetTaxes(): void {
+ this.router.get(`/${ServerRoute.REST_BILLING_TAXES}`, (req: Request, res: Response, next: NextFunction) => {
+ void RouterUtils.handleServerAction(BillingService.handleGetBillingTaxes.bind(this), ServerAction.BILLING_TAXES, req, res, next);
+ });
+ }
}

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -666,7 +666,9 @@ export enum ServerRoute {
// PRICING URLs for CRUD operations
REST_PRICING_DEFINITIONS = 'pricing-definitions',
- REST_PRICING_DEFINITION = 'pricing-definitions/:id'
+ REST_PRICING_DEFINITION = 'pricing-definitions/:id',
+
+ REST_BILLING_TAXES = 'billing/taxes',
}
export enum ServerProtocol {

Added billing getTaxes endpoint + doc