Snippets

OICP 2.1 Push Authentication Data | Java

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 (EMP).

Section:
3.3.1 eRoamingPushAuthenticationData

To download the latest OICP Version, please visit our website:
https://www.hubject.com/downloads/
/**
 * 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)
{ ... }
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();

Comments (0)

HTTPS SSH

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