Save currency in OCPI
MODIFY
src/server/rest/service/security/SettingSecurity.ts
src/server/rest/service/security/SettingSecurity.ts
@@ -98,6 +98,9 @@ export default class SettingSecurity {
partyID: sanitize(request.content.ocpi.emsp.partyID)
};
}
+ if (request.content.ocpi.currency) {
+ settings.content.ocpi.currency = request.content.ocpi.currency;
+ }
break;
case RefundSettingsType.CONCUR:
if (!Utils.isEmptyJSon(request.content.concur)) {

MODIFY
src/types/Setting.ts
src/types/Setting.ts
@@ -80,6 +80,7 @@ export interface RoamingSettings extends Setting {
export interface OcpiSetting {
cpo: OcpiIdentifier;
emsp: OcpiIdentifier;
+ currency: string;
businessDetails: OcpiBusinessDetails;
}

MODIFY
test/api/context/ContextDefinition.ts
test/api/context/ContextDefinition.ts
@@ -109,6 +109,7 @@ export default class ContextDefinition {
content: {
type: RoamingSettingsType.GIREVE,
ocpi: {
+ currency: 'EUR',
cpo: {
countryCode: 'FR',
partyID: 'UT',
@@ -243,6 +244,7 @@ export default class ContextDefinition {
countryCode: 'FR',
partyID: 'UT',
},
+ currency: 'EUR',
businessDetails: {
name: 'Test OCPI',
website: 'http://www.uttest.net'

Save currency in OCPI