Snippets

OICP 2.1 Authorize Stop | Java

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.2 eRoamingAuthorizeStop
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.2 eRoamingAuthorizeStop
+
+To download the latest OICP Version, please visit our website:
+https://www.hubject.com/downloads/
Updated by Gregor Schermuly

File (1) Authorize Stop | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Create a new OICP v2.0 AuthorizeStop request.
+ *
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param SessionId the unique identification of the EV charging session for this request.
+ * @return a new AuthorizeStop request builder object.
+ */
+public AuthorizeStopRequest AuthorizeStop(final EVSEOperator_Id     EVSEOperatorId,
+                                          final ChargingSession_Id  SessionId)
+{ ... }
+
+
+/**
+ * Create a new OICP v2.0 AuthorizeStop request.
+ *
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param SessionId the unique identification of the EV charging session for this request.
+ * @param AuthToken the authentication token for this request.
+ * @return a new AuthorizeStop request builder object.
+ */
+public AuthorizeStopRequest AuthorizeStop(final EVSEOperator_Id     EVSEOperatorId,
+                                          final ChargingSession_Id  SessionId,
+                                          final Auth_Token          AuthToken)
+{ ... }
+
+
+// AuthorizeStopRequest builder methods
+
+public AuthorizeStopRequest setSessionId(ChargingSession_Id SessionId)
+{ ... }
+
+
+public AuthorizeStopRequest setPartnerSessionId(ChargingSession_Id PartnerSessionId)
+{ ... }
+
+
+public AuthorizeStopRequest setEVSEId(EVSE_Id EVSEId)
+{ ... }
+
+
+public AuthorizeStopRequest setAuthToken(Auth_Token AuthToken)
+{ ... }
+
+
+public AuthorizeStopRequest setQRCodeIdentification(EVCO_Id  EVCOId,
+                                                    PIN      PIN)
+{ ... }
+
+
+public AuthorizeStopRequest setPlugAndChargeIdentification(EVCO_Id EVCOId)
+{ ... }
+
+
+public AuthorizeStopRequest setRemoteIdentification(EVCO_Id EVCOId)
+{ ... }

File (2) Example.java Added

  • Ignore whitespace
  • Hide word diff
+CPOClient       HubjectCPO    = new CPOClient("api.playground.hubject.com");
+EVSEOperator_Id EVSEOperator  = EVSEOperator_Id.Parse("DE*GEF");
+Auth_Token      AuthToken     = Auth_Token.     Parse("16EC7B0F");
+
+CompletableFuture req = HubjectCPO.
+
+    AuthorizeStart(EVSEOperator,
+                   AuthToken).
+
+    Run(StartResult -> {
+
+        if (StartResult.getAuthorizationStatus() == AuthorizationStatus.Authorized)
+        {
+
+            System.out.println("Authorized!");
+
+            try {
+
+                HubjectCPO.
+                    AuthorizeStop(EVSEOperator,
+                                  StartResult.getSessionId(),
+                                  AuthToken).
+
+                    Run(StopResult -> {
+
+                        if (StopResult.getAuthorizationStatus() == AuthorizationStatus.Authorized)
+                            System.out.println("Authorized!");
+
+                        else {
+                            System.out.println(StopResult.getStatusCode().getCode());
+                            System.out.println(StopResult.getStatusCode().getDescription());
+                            System.out.println(StopResult.getStatusCode().getAdditionalInfo());
+                        }
+
+                    });
+
+            } catch (Exception e) {
+                System.out.println(e.getMessage());
+            }
+        }
+
+        else {
+            System.out.println(StartResult.getStatusCode().getCode());
+            System.out.println(StartResult.getStatusCode().getDescription());
+            System.out.println(StartResult.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();

File Authorize Stop | Java.java Deleted

  • Ignore whitespace
  • Hide word diff
-/**
- * Create a new OICP v2.0 AuthorizeStop request.
- *
- * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
- * @param SessionId the unique identification of the EV charging session for this request.
- * @return a new AuthorizeStop request builder object.
- */
-public AuthorizeStopRequest AuthorizeStop(final EVSEOperator_Id     EVSEOperatorId,
-                                          final ChargingSession_Id  SessionId)
-{ ... }
-
-
-/**
- * Create a new OICP v2.0 AuthorizeStop request.
- *
- * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
- * @param SessionId the unique identification of the EV charging session for this request.
- * @param AuthToken the authentication token for this request.
- * @return a new AuthorizeStop request builder object.
- */
-public AuthorizeStopRequest AuthorizeStop(final EVSEOperator_Id     EVSEOperatorId,
-                                          final ChargingSession_Id  SessionId,
-                                          final Auth_Token          AuthToken)
-{ ... }
-
-
-// AuthorizeStopRequest builder methods
-
-public AuthorizeStopRequest setSessionId(ChargingSession_Id SessionId)
-{ ... }
-
-
-public AuthorizeStopRequest setPartnerSessionId(ChargingSession_Id PartnerSessionId)
-{ ... }
-
-
-public AuthorizeStopRequest setEVSEId(EVSE_Id EVSEId)
-{ ... }
-
-
-public AuthorizeStopRequest setAuthToken(Auth_Token AuthToken)
-{ ... }
-
-
-public AuthorizeStopRequest setQRCodeIdentification(EVCO_Id  EVCOId,
-                                                    PIN      PIN)
-{ ... }
-
-
-public AuthorizeStopRequest setPlugAndChargeIdentification(EVCO_Id EVCOId)
-{ ... }
-
-
-public AuthorizeStopRequest setRemoteIdentification(EVCO_Id EVCOId)
-{ ... }

File Example.java Deleted

  • Ignore whitespace
  • Hide word diff
-CPOClient       HubjectCPO    = new CPOClient("api.playground.hubject.com");
-EVSEOperator_Id EVSEOperator  = EVSEOperator_Id.Parse("DE*GEF");
-Auth_Token      AuthToken     = Auth_Token.     Parse("16EC7B0F");
-
-CompletableFuture req = HubjectCPO.
-
-    AuthorizeStart(EVSEOperator,
-                   AuthToken).
-
-    Run(StartResult -> {
-
-        if (StartResult.getAuthorizationStatus() == AuthorizationStatus.Authorized)
-        {
-
-            System.out.println("Authorized!");
-
-            try {
-
-                HubjectCPO.
-                    AuthorizeStop(EVSEOperator,
-                                  StartResult.getSessionId(),
-                                  AuthToken).
-
-                    Run(StopResult -> {
-
-                        if (StopResult.getAuthorizationStatus() == AuthorizationStatus.Authorized)
-                            System.out.println("Authorized!");
-
-                        else {
-                            System.out.println(StopResult.getStatusCode().getCode());
-                            System.out.println(StopResult.getStatusCode().getDescription());
-                            System.out.println(StopResult.getStatusCode().getAdditionalInfo());
-                        }
-
-                    });
-
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-            }
-        }
-
-        else {
-            System.out.println(StartResult.getStatusCode().getCode());
-            System.out.println(StartResult.getStatusCode().getDescription());
-            System.out.println(StartResult.getStatusCode().getAdditionalInfo());
-        }
-
-    });
-
-// Wait for the future to complete...
-req.get();
Created by Gregor Schermuly

File Authorize Stop | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Create a new OICP v2.0 AuthorizeStop request.
+ *
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param SessionId the unique identification of the EV charging session for this request.
+ * @return a new AuthorizeStop request builder object.
+ */
+public AuthorizeStopRequest AuthorizeStop(final EVSEOperator_Id     EVSEOperatorId,
+                                          final ChargingSession_Id  SessionId)
+{ ... }
+
+
+/**
+ * Create a new OICP v2.0 AuthorizeStop request.
+ *
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param SessionId the unique identification of the EV charging session for this request.
+ * @param AuthToken the authentication token for this request.
+ * @return a new AuthorizeStop request builder object.
+ */
+public AuthorizeStopRequest AuthorizeStop(final EVSEOperator_Id     EVSEOperatorId,
+                                          final ChargingSession_Id  SessionId,
+                                          final Auth_Token          AuthToken)
+{ ... }
+
+
+// AuthorizeStopRequest builder methods
+
+public AuthorizeStopRequest setSessionId(ChargingSession_Id SessionId)
+{ ... }
+
+
+public AuthorizeStopRequest setPartnerSessionId(ChargingSession_Id PartnerSessionId)
+{ ... }
+
+
+public AuthorizeStopRequest setEVSEId(EVSE_Id EVSEId)
+{ ... }
+
+
+public AuthorizeStopRequest setAuthToken(Auth_Token AuthToken)
+{ ... }
+
+
+public AuthorizeStopRequest setQRCodeIdentification(EVCO_Id  EVCOId,
+                                                    PIN      PIN)
+{ ... }
+
+
+public AuthorizeStopRequest setPlugAndChargeIdentification(EVCO_Id EVCOId)
+{ ... }
+
+
+public AuthorizeStopRequest setRemoteIdentification(EVCO_Id EVCOId)
+{ ... }

File Example.java Added

  • Ignore whitespace
  • Hide word diff
+CPOClient       HubjectCPO    = new CPOClient("api.playground.hubject.com");
+EVSEOperator_Id EVSEOperator  = EVSEOperator_Id.Parse("DE*GEF");
+Auth_Token      AuthToken     = Auth_Token.     Parse("16EC7B0F");
+
+CompletableFuture req = HubjectCPO.
+
+    AuthorizeStart(EVSEOperator,
+                   AuthToken).
+
+    Run(StartResult -> {
+
+        if (StartResult.getAuthorizationStatus() == AuthorizationStatus.Authorized)
+        {
+
+            System.out.println("Authorized!");
+
+            try {
+
+                HubjectCPO.
+                    AuthorizeStop(EVSEOperator,
+                                  StartResult.getSessionId(),
+                                  AuthToken).
+
+                    Run(StopResult -> {
+
+                        if (StopResult.getAuthorizationStatus() == AuthorizationStatus.Authorized)
+                            System.out.println("Authorized!");
+
+                        else {
+                            System.out.println(StopResult.getStatusCode().getCode());
+                            System.out.println(StopResult.getStatusCode().getDescription());
+                            System.out.println(StopResult.getStatusCode().getAdditionalInfo());
+                        }
+
+                    });
+
+            } catch (Exception e) {
+                System.out.println(e.getMessage());
+            }
+        }
+
+        else {
+            System.out.println(StartResult.getStatusCode().getCode());
+            System.out.println(StartResult.getStatusCode().getDescription());
+            System.out.println(StartResult.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();
HTTPS SSH

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