/// <summary> /// Return a text representation of the given remote start/stop value. /// </summary> /// <param name="RemoteStartStopValue">An remote start/stop value.</param> public static String AsText(this RemoteStartStopValues RemoteStartStopValue) { switch (RemoteStartStopValue) { case RemoteStartStopValues.Start: return("1"); case RemoteStartStopValues.Stop: return("2"); default: return("undefined"); } }
/// <summary> /// Return a numeric representation of the given remote start/stop value. /// </summary> /// <param name="RemoteStartStopValue">An remote start/stop value.</param> public static Byte AsNumber(this RemoteStartStopValues RemoteStartStopValue) { switch (RemoteStartStopValue) { case RemoteStartStopValues.Start: return(1); case RemoteStartStopValues.Stop: return(2); default: return(0); } }
/// <summary> /// Create a SetServiceAuthorisationRequest XML/SOAP request. /// </summary> /// <param name="PartnerId">The partner identification.</param> /// <param name="OperatorId">The operator identification.</param> /// <param name="TargetOperatorId">The target operator identification.</param> /// <param name="EVSEId">The EVSE identification.</param> /// <param name="UserId">The user identification.</param> /// <param name="RequestedServiceId">The service identification for which an authorisation is requested.</param> /// <param name="ServiceSessionId">The service session identification.</param> /// <param name="AuthorisationValue">Whether to start or stop the charging process.</param> /// <param name="IntermediateCDRRequested">Whether the eMSP wishes to receive intermediate charging session records.</param> /// /// <param name="TransactionId">An optional transaction identification.</param> /// <param name="UserContractIdAlias">Anonymized alias of the contract id between the end-user and the eMSP.</param> /// <param name="MeterLimits">Meter limits for this authorisation: The eMSP can authorise the charge but for less than x Wh or y minutes, or z euros.</param> /// <param name="Parameter">eMSP parameter string (reserved for future use).</param> /// <param name="BookingId"></param> /// /// <param name="HTTPRequest">The correlated HTTP request of this eMIP request.</param> /// <param name="Timestamp">The optional timestamp of the request.</param> /// <param name="CancellationToken">An optional token to cancel this request.</param> /// <param name="EventTrackingId">An optional event tracking identification for correlating this request with other events.</param> /// <param name="RequestTimeout">An optional timeout for this request.</param> public SetServiceAuthorisationRequest(HTTPRequest HTTPRequest, Partner_Id PartnerId, Operator_Id OperatorId, Operator_Id TargetOperatorId, EVSE_Id EVSEId, User_Id UserId, Service_Id RequestedServiceId, ServiceSession_Id ServiceSessionId, RemoteStartStopValues AuthorisationValue, Boolean IntermediateCDRRequested, Transaction_Id? TransactionId = null, Contract_Id? UserContractIdAlias = null, IEnumerable<MeterReport> MeterLimits = null, String Parameter = null, Booking_Id? BookingId = null, DateTime? Timestamp = null, CancellationToken? CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan? RequestTimeout = null) : base(HTTPRequest, PartnerId, TransactionId, Timestamp, CancellationToken, EventTrackingId, RequestTimeout) { this.OperatorId = OperatorId; this.TargetOperatorId = TargetOperatorId; this.EVSEId = EVSEId; this.UserId = UserId; this.RequestedServiceId = RequestedServiceId; this.ServiceSessionId = ServiceSessionId; this.AuthorisationValue = AuthorisationValue; this.IntermediateCDRRequested = IntermediateCDRRequested; this.UserContractIdAlias = UserContractIdAlias; this.MeterLimits = MeterLimits; this.Parameter = Parameter; this.BookingId = BookingId; }
SetServiceAuthorisation(this IEMPClient EMPClient, Partner_Id PartnerId, Operator_Id OperatorId, EVSE_Id EVSEId, User_Id UserId, Service_Id RequestedServiceId, RemoteStartStopValues AuthorisationValue, Boolean IntermediateCDRRequested, Transaction_Id?TransactionId = null, PartnerServiceSession_Id?PartnerServiceSessionId = null, Contract_Id?UserContractIdAlias = null, IEnumerable <MeterReport> MeterLimits = null, String Parameter = null, Booking_Id?BookingId = null, Booking_Id?SalePartnerBookingId = null, HTTPRequest HTTPRequest = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.SetServiceAuthorisation(new SetServiceAuthorisationRequest(PartnerId, OperatorId, EVSEId, UserId, RequestedServiceId, AuthorisationValue, IntermediateCDRRequested, TransactionId, PartnerServiceSessionId, UserContractIdAlias, MeterLimits, Parameter, BookingId, SalePartnerBookingId, HTTPRequest, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));