refactor(subaccounts): aligned naming convention
MODIFY
src/notification/email/EMailNotificationTask.ts
src/notification/email/EMailNotificationTask.ts
@@ -5,7 +5,7 @@ import BackendError from '../../exception/BackendError';
import Configuration from '../../utils/Configuration';
import Constants from '../../utils/Constants';
import EmailConfiguration from '../../types/configuration/EmailConfiguration';
-import { HttpBillingActivateSubAccount } from '../../types/requests/HttpBillingRequest';
+import { HttpBillingSubAccountActivate } from '../../types/requests/HttpBillingRequest';
import Logging from '../../utils/Logging';
import NotificationTask from '../NotificationTask';
import { ServerAction } from '../../types/Server';

MODIFY
src/server/rest/v1/validator/BillingValidator.ts
src/server/rest/v1/validator/BillingValidator.ts
-import { HttpBillingActivateSubAccount, HttpBillingCreateSubAccount, HttpBillingInvoiceRequest, HttpBillingInvoicesRequest, HttpDeletePaymentMethod, HttpPaymentMethods, HttpSetupPaymentMethod } from '../../../../types/requests/HttpBillingRequest';
+import { HttpBillingInvoiceRequest, HttpBillingInvoicesRequest, HttpBillingSubAccountActivate, HttpBillingSubAccountCreate, HttpDeletePaymentMethod, HttpPaymentMethods, HttpSetupPaymentMethod } from '../../../../types/requests/HttpBillingRequest';
import { BillingSettings } from '../../../../types/Setting';
import Schema from '../../../../types/validator/Schema';
@@ -52,11 +52,11 @@ export default class BillingValidator extends SchemaValidator {
return this.validate(this.billingInvoiceGet, data);
}
- public validateBillingCreateSubAccountReq(data: Record<string, unknown>): HttpBillingCreateSubAccount {
+ public validateBillingCreateSubAccountReq(data: Record<string, unknown>): HttpBillingSubAccountCreate {
return this.validate(this.billingCreateSubAccount, data);
}
- public validateBillingActivateSubAccountReq(data: Record<string, unknown>): HttpBillingActivateSubAccount {
+ public validateBillingActivateSubAccountReq(data: Record<string, unknown>): HttpBillingSubAccountActivate {
return this.validate(this.billingActivateSubAccount, data);
}
}

MODIFY
src/types/Authorization.ts
src/types/Authorization.ts
@@ -134,8 +134,8 @@ export enum Action {
BILLING_PAYMENT_METHODS = 'BillingPaymentMethods',
BILLING_DELETE_PAYMENT_METHOD = 'BillingDeletePaymentMethod',
BILLING_CHARGE_INVOICE = 'BillingChargeInvoice',
- BILLING_CREATE_SUB_ACCOUNT = 'BillingCreateSubAccount',
- BILLING_ACTIVATE_SUB_ACCOUNT = 'BillingActivateSubAccount',
+ BILLING_CREATE_SUB_ACCOUNT = 'BillingSubAccountCreate',
+ BILLING_ACTIVATE_SUB_ACCOUNT = 'BillingSubAccountActivate',
CHECK_CONNECTION = 'CheckConnection',
CLEAR_BILLING_TEST_DATA = 'ClearBillingTestData',
RETRIEVE_CONSUMPTION = 'RetrieveConsumption',

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -452,7 +452,7 @@ export enum ServerAction {
BILLING_CHARGE_INVOICE = 'BillingChargeInvoice',
BILLING_TEST_DATA_CLEANUP = 'BillingTestDataCleanup',
BILLING_BILL_PENDING_TRANSACTION = 'BillingBillPendingTransaction',
- BILLING_SUB_ACCOUNT_CREATE = 'BillingCreateSubAccount',
+ BILLING_SUB_ACCOUNT_CREATE = 'BillingSubAccountCreate',
BILLING_SUB_ACCOUNT_ACTIVATE = 'BillingSubAccountActivate',
PRICING = 'Pricing',

MODIFY
src/types/UserNotifications.ts
src/types/UserNotifications.ts
@@ -71,7 +71,7 @@ export enum UserNotificationType {
BILLING_INVOICE_SYNCHRONIZATION_FAILED = 'BillingInvoiceSynchronizationFailed',
BILLING_PERIODIC_OPERATION_FAILED = 'BillingPeriodicOperationFailed',
BILLING_NEW_INVOICE = 'BillingNewInvoice',
- BILLING_CREATE_SUB_ACCOUNT = 'BillingCreateSubAccount',
+ BILLING_CREATE_SUB_ACCOUNT = 'BillingSubAccountCreate',
BILLING_SUB_ACCOUNT_ACTIVATED = 'BillingSubAccountActivated',
CAR_CATALOG_SYNCHRONIZATION_FAILED = 'CarCatalogSynchronizationFailed',
CHECK_AND_APPLY_SMART_CHARGING_FAILED = 'ComputeAndApplyChargingProfilesFailed',

MODIFY
src/types/requests/HttpBillingRequest.ts
src/types/requests/HttpBillingRequest.ts
@@ -29,11 +29,11 @@ export interface HttpDeletePaymentMethod {
paymentMethodId: string;
}
-export interface HttpBillingCreateSubAccount {
+export interface HttpBillingSubAccountCreate {
userID: string;
}
-export interface HttpBillingActivateSubAccount {
+export interface HttpBillingSubAccountActivate {
ID: string;
TenantID: string;
}

refactor(subaccounts): aligned naming convention