pricing - test fix text
MODIFY
src/types/Pricing.ts
src/types/Pricing.ts
@@ -55,10 +55,10 @@ export interface PricingRestriction {
endTime?: string, // End time of day, for example 19:45, valid until this time of the day. Same syntax as start_time
startDate?: string, // Start date, for example: 2015-12-24, valid from this day
endDate?: string, // End date, for example: 2015-12-27, valid until this day (excluding this day)
- minKWh?: number, // Minimum used energy in kWh, for example 20, valid from this amount of energy is used
- maxKWh?: number, // Maximum used energy in kWh, for example 50, valid until this amount of energy is used
- minPowerkW?: number, // Minimum power in kW, for example 0, valid from this charging speed
- maxPowerkW?: number, // Maximum power in kW, for example 20, valid up to this charging speed
+ minEnergyKWh?: number, // Minimum used energy in kWh, for example 20, valid from this amount of energy is used
+ maxEnergyKWh?: number, // Maximum used energy in kWh, for example 50, valid until this amount of energy is used
+ minOutputPowerkW?: number, // Minimum power in kW, for example 0, valid from this charging speed
+ maxOutputPowerkW?: number, // Maximum power in kW, for example 20, valid up to this charging speed
minDurationSecs?: number, // Minimum duration in seconds, valid for a duration from x seconds
maxDurationSecs?: number, // Maximum duration in seconds, valid for a duration up to x seconds
daysOfWeek?: DayOfWeek[], // Which day(s) of the week this tariff is valid

MODIFY
test/api/BillingStripeTestData.ts
test/api/BillingStripeTestData.ts
@@ -287,7 +287,7 @@ export default class StripeIntegrationTestData {
taxes // Array of taxes - cannot be null
},
parkingTime: {
- itemDescription: `Parking time - ${consumptionTestData.partingTime} minutes * ${consumptionTestData.parkingAmount} Eur`,
+ itemDescription: `Parking time - ${consumptionTestData.partingTime} minutes * ${consumptionTestData.parkingAmount} Eur/hour`,
unitPrice: Utils.createDecimal(consumptionTestData.parkingAmount).div(consumptionTestData.partingTime).toNumber(),
amount: consumptionTestData.parkingAmount, // Euros
roundedAmount: Utils.truncTo(consumptionTestData.parkingAmount, 2),
@@ -453,7 +453,7 @@ export default class StripeIntegrationTestData {
active: true
};
const lowConsumptionRestrictions: PricingRestriction = {
- maxPowerkW: 40000,
+ maxOutputPowerkW: 40000,
};
const tariff1: PricingDefinition = {
name: 'BLUE Tariff',
@@ -466,7 +466,7 @@ export default class StripeIntegrationTestData {
}
};
const fastChargerRestrictions: PricingRestriction = {
- minPowerkW: 40000
+ minOutputPowerkW: 40000
};
const price4TheEnergy: PricingDimension = {
price: 0.35,

MODIFY
test/api/BillingTest.ts
test/api/BillingTest.ts
@@ -341,9 +341,9 @@ class TestData {
const tariff: PricingDefinition = {
name: 'GREEN Tariff',
- description: 'Tariff for low EVSE',
+ description: 'Tariff for slow chargers',
restrictions: {
- maxPowerkW: 40,
+ maxOutputPowerkW: 40,
},
dimensions: {
flatFee: {
@@ -389,7 +389,7 @@ class TestData {
name: 'RED Tariff',
description: 'Tariff for fast chargers',
restrictions: {
- minPowerkW: 40,
+ minOutputPowerkW: 40,
},
dimensions: {
flatFee: {

pricing - test fix text