Skip to content

Commit

Permalink
feat: added missing countryCode and partyId (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
dv-rosales authored Sep 30, 2024
1 parent 17a24a2 commit 591fd85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ data class Session(@JsonProperty("country_code") val countryCode: String,
@JsonProperty("status") val status: SessionStatus,
@JsonProperty("last_updated") val lastUpdated: String)

data class CdrToken(@JsonProperty("uid") val uid: String,
data class CdrToken(@JsonProperty("country_code") val countryCode: String,
@JsonProperty("party_id") val partyID: String,
@JsonProperty("uid") val uid: String,
@JsonProperty("type") val tokenType: TokenType,
@JsonProperty("contract_id") val contractID: String)

Expand Down
8 changes: 6 additions & 2 deletions src/test/kotlin/snc/openchargingnetwork/node/data/OcpiData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ val exampleSession = Session(
cdrToken = CdrToken(
uid = "9874728973",
tokenType = TokenType.AD_HOC_USER,
contractID = "DE-ABC-1"),
contractID = "DE-ABC-1",
countryCode = "DE",
partyID = "XYZ"),
authMethod = AuthMethod.WHITELIST,
locationID = "LOC1",
evseUID = "1234",
Expand All @@ -82,7 +84,9 @@ val exampleCDR = CDR(
cdrToken = CdrToken(
uid = "abc223",
tokenType = TokenType.APP_USER,
contractID = "de-12342-x"),
contractID = "de-12342-x",
countryCode = "DE",
partyID = "XYZ"),
authMethod = AuthMethod.COMMAND,
cdrLocation = CdrLocation(
id = "LOC65",
Expand Down

0 comments on commit 591fd85

Please sign in to comment.