Snippets

OICP 2.1 Authorize Start | C#

Updated by Julius Poessnecker

File (0) OICP Modified

  • Ignore whitespace
  • Hide word diff
-The service descrciption can be found in the OICP 2.1.
+The service description can be found in the OICP 2.1.
 
 Section:
 3.1.1 eRoamingAuthorizeStart
Updated by Julius Poessnecker

File (0) OICP Added

  • Ignore whitespace
  • Hide word diff
+The service descrciption can be found in the OICP 2.1.
+
+Section:
+3.1.1 eRoamingAuthorizeStart
+
+To download the latest OICP Version, please visit our website:
+https://www.hubject.com/downloads/
Updated by Gregor Schermuly

File (1) Authorize Start | C#.cs Added

  • Ignore whitespace
  • Hide word diff
+/// <summary>
+/// Create an OICP v2.0 authorize start request.
+/// </summary>
+/// <param name="OperatorId">An EVSE operator identification.</param>
+/// <param name="AuthToken">A (RFID) user identification.</param>
+/// <param name="EVSEId">An optional EVSE identification.</param>
+/// <param name="SessionId">An optional session identification.</param>
+/// <param name="PartnerProductId">An optional partner product identification.</param>
+/// <param name="PartnerSessionId">An optional partner session identification.</param>
+/// <param name="QueryTimeout">An optional timeout for this query.</param>
+public async Task<HTTPResponse<AUTHSTARTResult>>
+
+    AuthorizeStart(EVSEOperator_Id     OperatorId,
+                   Auth_Token          AuthToken,
+                   EVSE_Id             EVSEId            = null,
+                   ChargingSession_Id  SessionId         = null,
+                   ChargingProduct_Id  PartnerProductId  = null,   // [maxlength: 100]
+                   ChargingSession_Id  PartnerSessionId  = null,   // [maxlength: 50]
+                   TimeSpan?           QueryTimeout      = null)
+
+{ ... }

File (2) Example.cs Added

  • Ignore whitespace
  • Hide word diff
+Task.Factory.StartNew(async () => {
+
+    var AuthStartResult = await new CPOClient("api.playground.hubject.com").
+        AuthorizeStart(EVSEOperator_Id.Parse("DE*GEF"),
+                       Auth_Token.     Parse("08152305"));
+
+    ConsoleX.WriteLines("AuthStart result:",
+                        AuthStartResult.Content.AuthorizationStatus,
+                        AuthStartResult.Content.StatusCode.Code,
+                        AuthStartResult.Content.StatusCode.Description,
+                        AuthStartResult.Content.StatusCode.AdditionalInfo);
+
+}).
+
+// Wait for the task to complete...
+Wait();

File Authorize Start | C#.cs Deleted

  • Ignore whitespace
  • Hide word diff
-/// <summary>
-/// Create an OICP v2.0 authorize start request.
-/// </summary>
-/// <param name="OperatorId">An EVSE operator identification.</param>
-/// <param name="AuthToken">A (RFID) user identification.</param>
-/// <param name="EVSEId">An optional EVSE identification.</param>
-/// <param name="SessionId">An optional session identification.</param>
-/// <param name="PartnerProductId">An optional partner product identification.</param>
-/// <param name="PartnerSessionId">An optional partner session identification.</param>
-/// <param name="QueryTimeout">An optional timeout for this query.</param>
-public async Task<HTTPResponse<AUTHSTARTResult>>
-
-    AuthorizeStart(EVSEOperator_Id     OperatorId,
-                   Auth_Token          AuthToken,
-                   EVSE_Id             EVSEId            = null,
-                   ChargingSession_Id  SessionId         = null,
-                   ChargingProduct_Id  PartnerProductId  = null,   // [maxlength: 100]
-                   ChargingSession_Id  PartnerSessionId  = null,   // [maxlength: 50]
-                   TimeSpan?           QueryTimeout      = null)
-
-{ ... }

File Example.cs Deleted

  • Ignore whitespace
  • Hide word diff
-Task.Factory.StartNew(async () => {
-
-    var AuthStartResult = await new CPOClient("api.playground.hubject.com").
-        AuthorizeStart(EVSEOperator_Id.Parse("DE*GEF"),
-                       Auth_Token.     Parse("08152305"));
-
-    ConsoleX.WriteLines("AuthStart result:",
-                        AuthStartResult.Content.AuthorizationStatus,
-                        AuthStartResult.Content.StatusCode.Code,
-                        AuthStartResult.Content.StatusCode.Description,
-                        AuthStartResult.Content.StatusCode.AdditionalInfo);
-
-}).
-
-// Wait for the task to complete...
-Wait();
Updated by Gregor Schermuly

File Authorize Start | C# Deleted

  • Ignore whitespace
  • Hide word diff
-/// <summary>
-/// Create an OICP v2.0 authorize start request.
-/// </summary>
-/// <param name="OperatorId">An EVSE operator identification.</param>
-/// <param name="AuthToken">A (RFID) user identification.</param>
-/// <param name="EVSEId">An optional EVSE identification.</param>
-/// <param name="SessionId">An optional session identification.</param>
-/// <param name="PartnerProductId">An optional partner product identification.</param>
-/// <param name="PartnerSessionId">An optional partner session identification.</param>
-/// <param name="QueryTimeout">An optional timeout for this query.</param>
-public async Task<HTTPResponse<AUTHSTARTResult>>
-
-    AuthorizeStart(EVSEOperator_Id     OperatorId,
-                   Auth_Token          AuthToken,
-                   EVSE_Id             EVSEId            = null,
-                   ChargingSession_Id  SessionId         = null,
-                   ChargingProduct_Id  PartnerProductId  = null,   // [maxlength: 100]
-                   ChargingSession_Id  PartnerSessionId  = null,   // [maxlength: 50]
-                   TimeSpan?           QueryTimeout      = null)
-
-{ ... }

File Authorize Start | C#.cs Added

  • Ignore whitespace
  • Hide word diff
+/// <summary>
+/// Create an OICP v2.0 authorize start request.
+/// </summary>
+/// <param name="OperatorId">An EVSE operator identification.</param>
+/// <param name="AuthToken">A (RFID) user identification.</param>
+/// <param name="EVSEId">An optional EVSE identification.</param>
+/// <param name="SessionId">An optional session identification.</param>
+/// <param name="PartnerProductId">An optional partner product identification.</param>
+/// <param name="PartnerSessionId">An optional partner session identification.</param>
+/// <param name="QueryTimeout">An optional timeout for this query.</param>
+public async Task<HTTPResponse<AUTHSTARTResult>>
+
+    AuthorizeStart(EVSEOperator_Id     OperatorId,
+                   Auth_Token          AuthToken,
+                   EVSE_Id             EVSEId            = null,
+                   ChargingSession_Id  SessionId         = null,
+                   ChargingProduct_Id  PartnerProductId  = null,   // [maxlength: 100]
+                   ChargingSession_Id  PartnerSessionId  = null,   // [maxlength: 50]
+                   TimeSpan?           QueryTimeout      = null)
+
+{ ... }

File Example Deleted

  • Ignore whitespace
  • Hide word diff
-Task.Factory.StartNew(async () => {
-
-    var AuthStartResult = await new CPOClient("api.playground.hubject.com").
-        AuthorizeStart(EVSEOperator_Id.Parse("DE*GEF"),
-                       Auth_Token.     Parse("08152305"));
-
-    ConsoleX.WriteLines("AuthStart result:",
-                        AuthStartResult.Content.AuthorizationStatus,
-                        AuthStartResult.Content.StatusCode.Code,
-                        AuthStartResult.Content.StatusCode.Description,
-                        AuthStartResult.Content.StatusCode.AdditionalInfo);
-
-}).
-
-// Wait for the task to complete...
-Wait();

File Example.cs Added

  • Ignore whitespace
  • Hide word diff
+Task.Factory.StartNew(async () => {
+
+    var AuthStartResult = await new CPOClient("api.playground.hubject.com").
+        AuthorizeStart(EVSEOperator_Id.Parse("DE*GEF"),
+                       Auth_Token.     Parse("08152305"));
+
+    ConsoleX.WriteLines("AuthStart result:",
+                        AuthStartResult.Content.AuthorizationStatus,
+                        AuthStartResult.Content.StatusCode.Code,
+                        AuthStartResult.Content.StatusCode.Description,
+                        AuthStartResult.Content.StatusCode.AdditionalInfo);
+
+}).
+
+// Wait for the task to complete...
+Wait();
Created by Gregor Schermuly

File Authorize Start | C# Added

  • Ignore whitespace
  • Hide word diff
+/// <summary>
+/// Create an OICP v2.0 authorize start request.
+/// </summary>
+/// <param name="OperatorId">An EVSE operator identification.</param>
+/// <param name="AuthToken">A (RFID) user identification.</param>
+/// <param name="EVSEId">An optional EVSE identification.</param>
+/// <param name="SessionId">An optional session identification.</param>
+/// <param name="PartnerProductId">An optional partner product identification.</param>
+/// <param name="PartnerSessionId">An optional partner session identification.</param>
+/// <param name="QueryTimeout">An optional timeout for this query.</param>
+public async Task<HTTPResponse<AUTHSTARTResult>>
+
+    AuthorizeStart(EVSEOperator_Id     OperatorId,
+                   Auth_Token          AuthToken,
+                   EVSE_Id             EVSEId            = null,
+                   ChargingSession_Id  SessionId         = null,
+                   ChargingProduct_Id  PartnerProductId  = null,   // [maxlength: 100]
+                   ChargingSession_Id  PartnerSessionId  = null,   // [maxlength: 50]
+                   TimeSpan?           QueryTimeout      = null)
+
+{ ... }

File Example Added

  • Ignore whitespace
  • Hide word diff
+Task.Factory.StartNew(async () => {
+
+    var AuthStartResult = await new CPOClient("api.playground.hubject.com").
+        AuthorizeStart(EVSEOperator_Id.Parse("DE*GEF"),
+                       Auth_Token.     Parse("08152305"));
+
+    ConsoleX.WriteLines("AuthStart result:",
+                        AuthStartResult.Content.AuthorizationStatus,
+                        AuthStartResult.Content.StatusCode.Code,
+                        AuthStartResult.Content.StatusCode.Description,
+                        AuthStartResult.Content.StatusCode.AdditionalInfo);
+
+}).
+
+// Wait for the task to complete...
+Wait();
HTTPS SSH

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