Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename stop_date_time to end_date_time to be inline with OCPI 2.2.1 #37

Merged
merged 1 commit into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ocpi-tariffs/resources/025kwh_min_price/cdr1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"start_date_time": "2022-01-13T14:30:00Z",
"stop_date_time": "2022-01-13T15:30:00Z",
"end_date_time": "2022-01-13T15:30:00Z",
"currency": "EUR",
"tariffs": [],
"charging_periods": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"start_date_time": "2022-01-13T14:30:00Z",
"stop_date_time": "2022-01-13T15:30:00Z",
"end_date_time": "2022-01-13T15:30:00Z",
"currency": "EUR",
"tariffs": [],
"charging_periods": [
Expand Down
2 changes: 1 addition & 1 deletion ocpi-tariffs/resources/025kwh_start/cdr1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"start_date_time": "2022-01-13T14:30:00Z",
"stop_date_time": "2022-01-13T15:30:00Z",
"end_date_time": "2022-01-13T15:30:00Z",
"currency": "EUR",
"tariffs": [],
"charging_periods": [
Expand Down
2 changes: 1 addition & 1 deletion ocpi-tariffs/resources/simple_025kwh/cdr1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"start_date_time": "2022-01-13T14:30:00Z",
"stop_date_time": "2022-01-13T15:30:00Z",
"end_date_time": "2022-01-13T15:30:00Z",
"currency": "EUR",
"tariffs": [],
"charging_periods": [
Expand Down
2 changes: 1 addition & 1 deletion ocpi-tariffs/resources/simple_3hour_5parking/cdr1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"start_date_time": "2022-01-13T16:00:00Z",
"stop_date_time": "2022-01-13T19:12:00Z",
"end_date_time": "2022-01-13T19:12:00Z",
"currency": "EUR",
"tariffs": [],
"charging_periods": [
Expand Down
2 changes: 1 addition & 1 deletion ocpi-tariffs/resources/step_size/cdr1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"start_date_time": "2022-01-13T16:55:00Z",
"stop_date_time": "2022-01-13T17:07:00Z",
"end_date_time": "2022-01-13T17:07:00Z",
"currency": "EUR",
"tariffs": [],
"charging_periods": [
Expand Down
2 changes: 1 addition & 1 deletion ocpi-tariffs/src/ocpi/cdr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Cdr {
pub start_date_time: DateTime,

/// Stop timestamp of the charging session.
pub stop_date_time: DateTime,
pub end_date_time: DateTime,

/// Currency of the CDR in ISO 4217 Code.
pub currency: String,
Expand Down
2 changes: 1 addition & 1 deletion ocpi-tariffs/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl ChargeSession {
let end_date_time = if let Some(next_period) = cdr.charging_periods.get(i + 1) {
next_period.start_date_time
} else {
cdr.stop_date_time
cdr.end_date_time
};

let next = if let Some(last) = periods.last() {
Expand Down