aligned routes with dashboard (comments)
renamed serverActions
MODIFY
src/server/rest/v1/router/api/BillingRouter.ts
src/server/rest/v1/router/api/BillingRouter.ts
@@ -33,8 +33,8 @@ export default class BillingRouter {
// ROUTES for INVOICES
// -----------------------------------
this.buildRouteBillingInvoices();
- // not yet implemented in dashboard - working
- // this.buildRouteBillingInvoice();
+ // implemented in dashboard - working but never used yet
+ this.buildRouteBillingInvoice();
// not yet implemented in dashboard - needs to be tested
// this.buildRouteBillingInvoiceDownload();
return this.router;
@@ -118,11 +118,11 @@ export default class BillingRouter {
}
// not yet implemented in dashboard - needs to be tested
- protected buildRouteBillingInvoiceDownload(): void {
- this.router.get(`/${ServerRoute.REST_BILLING_DOWNLOAD_INVOICE}`, (req: Request, res: Response, next: NextFunction) => {
- // GET {{base_url}}/v1/api/billing/invoices/606193168f22ac7f02223c8c
- req.query.ID = req.params.invoiceID;
- void RouterUtils.handleServerAction(BillingService.handleDownloadInvoice.bind(this), ServerAction.BILLING_DOWNLOAD_INVOICE, req, res, next);
- });
- }
+ // protected buildRouteBillingInvoiceDownload(): void {
+ // this.router.get(`/${ServerRoute.REST_BILLING_DOWNLOAD_INVOICE}`, (req: Request, res: Response, next: NextFunction) => {
+ // // GET {{base_url}}/v1/api/billing/invoices/606193168f22ac7f02223c8c
+ // req.query.ID = req.params.invoiceID;
+ // void RouterUtils.handleServerAction(BillingService.handleDownloadInvoice.bind(this), ServerAction.BILLING_DOWNLOAD_INVOICE, req, res, next);
+ // });
+ // }
}

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -409,8 +409,8 @@ export enum ServerAction {
BILLING_FORCE_SYNCHRONIZE_USER = 'BillingForceSynchronizeUser',
CHECK_BILLING_CONNECTION = 'CheckBillingConnection',
BILLING_TAXES = 'BillingTaxes',
- BILLING_INVOICES = 'BillingUserInvoices',
- BILLING_USER_INVOICE = 'BillingUserInvoice',
+ BILLING_INVOICES = 'BillingInvoices',
+ BILLING_INVOICE = 'BillingInvoice',
BILLING_SYNCHRONIZE_INVOICES = 'BillingSynchronizeInvoices',
BILLING_PERFORM_OPERATIONS = 'BillingPeriodicOperations',
BILLING_FORCE_SYNCHRONIZE_USER_INVOICES = 'BillingForceSynchronizeUserInvoices',
@@ -509,9 +509,14 @@ export enum ServerRoute {
REST_BILLING_SETTING = 'billing-setting', // GET and PUT
REST_BILLING_CHECK = 'billing/check',
+
+ // BILLING URLs for CRUD operations on INVOICES
REST_BILLING_INVOICES = 'invoices',
REST_BILLING_INVOICE = 'invoices/:invoiceID',
- REST_BILLING_DOWNLOAD_INVOICE = 'invoices/:invoiceID/download',
+
+ // BILLING URLs for Non-CRUD operations on INVOICES
+ // not yet implemented
+ // REST_BILLING_DOWNLOAD_INVOICE = 'invoices/:invoiceID/download',
}
export enum ServerProtocol {

aligned routes with dashboard (comments)
renamed serverActions