/** * 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. */publicAuthorizeStopRequestAuthorizeStop(finalEVSEOperator_IdEVSEOperatorId,finalChargingSession_IdSessionId){...}/** * 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. */publicAuthorizeStopRequestAuthorizeStop(finalEVSEOperator_IdEVSEOperatorId,finalChargingSession_IdSessionId,finalAuth_TokenAuthToken){...}// AuthorizeStopRequest builder methodspublicAuthorizeStopRequestsetSessionId(ChargingSession_IdSessionId){...}publicAuthorizeStopRequestsetPartnerSessionId(ChargingSession_IdPartnerSessionId){...}publicAuthorizeStopRequestsetEVSEId(EVSE_IdEVSEId){...}publicAuthorizeStopRequestsetAuthToken(Auth_TokenAuthToken){...}publicAuthorizeStopRequestsetQRCodeIdentification(EVCO_IdEVCOId,PINPIN){...}publicAuthorizeStopRequestsetPlugAndChargeIdentification(EVCO_IdEVCOId){...}publicAuthorizeStopRequestsetRemoteIdentification(EVCO_IdEVCOId){...}
CPOClientHubjectCPO=newCPOClient("api.playground.hubject.com");EVSEOperator_IdEVSEOperator=EVSEOperator_Id.Parse("DE*GEF");Auth_TokenAuthToken=Auth_Token.Parse("16EC7B0F");CompletableFuturereq=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(Exceptione){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();
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.