Snippets

OICP 2.1 Push Authentication Data | Java

Updated by Julius Poessnecker

File (0) OICP Added

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

File (1) Push Authentication Data | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Create a new OICP v2.0 PushAuthenticationData request.
+ *
+ * @param ProviderId the unique identification of the EV service provider for this request.
+ * @param AuthorizationIdentifications a stream of authorization identifications.
+ * @param Action the server side data management operation for this request.
+ * @return a new PushAuthenticationData request builder object.
+ */
+public PushAuthenticationDataRequest
+
+    PushAuthenticationData(final EVSP_Id                              ProviderId,
+                           final ActionType                           Action,
+                           final Stream<AuthorizationIdentification>  AuthorizationIdentifications)
+{ ... }
+
+/**
+ * Create a new OICP v2.0 PushAuthenticationData request.
+ *
+ * @param ProviderId the unique identification of the EV service provider for this request.
+ * @param Action the server side data management operation for this request.
+ * @param AuthorizationIdentifications an array of authorization identifications.
+ * @return a new PushAuthenticationData request builder object.
+ */
+public PushAuthenticationDataRequest
+
+    PushAuthenticationData(final EVSP_Id                         ProviderId,
+                           final ActionType                      Action,
+                           final AuthorizationIdentification...  AuthorizationIdentifications)
+{ ... }

File (2) Example.java Added

  • Ignore whitespace
  • Hide word diff
+CompletableFuture req = new EMPClient("api.playground.hubject.com").
+
+    PushAuthenticationData(EVSP_Id.Parse("DE*GDF"),
+                           ActionType.fullLoad,
+                           AuthorizationIdentification.FromAuthToken(Auth_Token.Parse("08152305"))).
+
+    Run(ack -> {
+
+        if (ack.hasResult())
+            System.out.println("success!");
+
+        else {
+            System.out.println(ack.getStatusCode().getCode());
+            System.out.println(ack.getStatusCode().getDescription());
+            System.out.println(ack.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.