Snippets

OICP 2.1 Get Charge Detail Record | C#

Updated by Julius Poessnecker

File (0) OICP Added

  • Ignore whitespace
  • Hide word diff
+The service description can be found in the OICP 2.1 (CPO).
+
+Section:
+3.1.6 eRoamingGetChargeDetailRecords
+
+To download the latest OICP Version, please visit our website:
+https://www.hubject.com/downloads/
Created by Gregor Schermuly

File (1) Pull Charge Detail Record | C#.cs Added

  • Ignore whitespace
  • Hide word diff
+/// <summary>
+/// Create a new task querying charge detail records from the OICP server.
+/// </summary>
+/// <param name="ProviderId">The unique identification of the EVSP.</param></param>
+/// <param name="From">The starting time.</param></param>
+/// <param name="To">The end time.</param></param>
+/// <param name="QueryTimeout">An optional timeout for this query.</param></param>
+public async Task<HTTPResponse<IEnumerable<eRoamingChargeDetailRecord>>>
+
+    GetChargeDetailRecords(EVSP_Id     ProviderId,
+                           DateTime    From,
+                           DateTime    To,
+                           TimeSpan?   QueryTimeout  = null)
+
+{
+    [...]
+}

File (2) Example.cs Added

  • Ignore whitespace
  • Hide word diff
+var HubjectEMP = new EMPClient("api.playground.hubject.com");
+
+Task.Factory.StartNew(async () => {
+
+    var result = await HubjectEMP.
+        GetChargeDetailRecords(EVSP_Id.Parse("DE*GDF"),
+                               new DateTime(2015, 10,  1),
+                               new DateTime(2015, 10, 31));
+
+    Console.WriteLine(result.Content.Count() + " charge detail records found!");
+
+}); 
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.