Snippets

OICP 2.1 Get Charge Detail Record | C#

Created by Gregor Schermuly last modified Julius Poessnecker
1
2
3
4
5
6
7
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/
/// <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)

{
    [...]
}
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!");

}); 

Comments (0)

HTTPS SSH

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