-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
[min|max]_duration
restriction in combination with `PARKING_TIM…
…E` (#53) * fix restrictions and add test * sum up duration
- Loading branch information
Showing
5 changed files
with
100 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"country_code": "BE", | ||
"start_date_time": "2015-06-29T15:00:00Z", | ||
"end_date_time": "2015-06-29T16:15:00Z", | ||
"currency": "EUR", | ||
"tariffs": [], | ||
"charging_periods": [{ | ||
"start_date_time": "2015-06-29T15:00:00Z", | ||
"dimensions": [{ | ||
"type": "PARKING_TIME", | ||
"volume": 0.5 | ||
}] | ||
}, { | ||
"start_date_time": "2015-06-29T15:30:00Z", | ||
"dimensions": [{ | ||
"type": "PARKING_TIME", | ||
"volume": 0.25 | ||
}] | ||
}, { | ||
"start_date_time": "2015-06-29T15:45:00Z", | ||
"dimensions": [{ | ||
"type": "ENERGY", | ||
"volume": 10 | ||
}] | ||
}], | ||
"total_parking_cost": { | ||
"excl_vat": 0.75, | ||
"incl_vat": 0.75 | ||
}, | ||
"total_energy_cost": { | ||
"excl_vat": 2.5, | ||
"incl_vat": 2.75 | ||
}, | ||
"total_cost": { | ||
"excl_vat": 3.25, | ||
"incl_vat": 3.5 | ||
}, | ||
"total_energy": 10, | ||
"total_time": 1.25, | ||
"total_parking_time": 0.75, | ||
"last_updated": "2015-06-29T22:01:13Z" | ||
} | ||
|
||
|
44 changes: 44 additions & 0 deletions
44
ocpi-tariffs/test_data/grace_period_parking_time/tariff.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"currency": "EUR", | ||
"elements": [ | ||
{ | ||
"price_components": [ | ||
{ | ||
"type": "PARKING_TIME", | ||
"price": 0.0, | ||
"vat": 0.0, | ||
"step_size": 1 | ||
} | ||
], | ||
"restrictions": { | ||
"min_duration": 0, | ||
"max_duration": 1800 | ||
} | ||
}, | ||
{ | ||
"price_components": [ | ||
{ | ||
"type": "PARKING_TIME", | ||
"price": 3.0, | ||
"vat": 0.0, | ||
"step_size": 1 | ||
} | ||
], | ||
"restrictions": { | ||
"min_duration": 1800 | ||
} | ||
}, | ||
{ | ||
"price_components": [ | ||
{ | ||
"type": "ENERGY", | ||
"price": 0.25, | ||
"vat": 10.0, | ||
"step_size": 1 | ||
} | ||
] | ||
} | ||
], | ||
"end_date_time": "2019-06-30T23:59:59Z", | ||
"last_updated": "2018-12-17T17:15:01Z" | ||
} |