modified entityIDs and entityType to entityID and entityType
MODIFY
src/integration/pricing/PricingEngine.ts
src/integration/pricing/PricingEngine.ts
@@ -89,8 +89,7 @@ export default class PricingEngine {
private static async fetchPricingDefinitions4Entity(tenant: Tenant, entityID: string): Promise<PricingDefinition[]> {
if (entityID) {
- const entityIDs = [ entityID ];
- const pricingModelResults = await PricingStorage.getPricingDefinitions(tenant, { entityIDs }, {
+ const pricingModelResults = await PricingStorage.getPricingDefinitions(tenant, { entityID }, {
limit: Constants.DB_RECORD_COUNT_NO_LIMIT, skip: 0, sort: { createdOn: -1 }
});
if (pricingModelResults.count > 0) {

MODIFY
src/server/odata/odata-model/ODataModel.ts
src/server/odata/odata-model/ODataModel.ts
export default {
namespace: 'eMobility',
- entityTypes: {
+ entityType: {
'Company': {
'uniqueID': { 'type': 'Edm.String', key: true },
'tenant': { 'type': 'Edm.String' },

MODIFY
src/server/rest/v1/service/PricingService.ts
src/server/rest/v1/service/PricingService.ts
@@ -48,8 +48,8 @@ export default class PricingService {
// Get the pricing definitions
const pricingDefinitions = await PricingStorage.getPricingDefinitions(req.tenant,
{
- entityIDs: filteredRequest.entityID ? filteredRequest.entityID.split('|') : null,
- entityTypes: filteredRequest.entityType ? filteredRequest.entityType.split('|') : null,
+ entityID: filteredRequest.entityID ? filteredRequest.entityID : null,
+ entityType: filteredRequest.entityType ? filteredRequest.entityType : null,
withEntityInformation: filteredRequest?.WithEntityInformation,
...authorizationPricingDefinitionsFilter.filters
}, {

modified entityIDs and entityType to entityID and entityType