/// <summary> /// Create a reserve now request. /// </summary> /// <param name="ConnectorId">The identification of the connector to be reserved. A value of 0 means that the reservation is not for a specific connector.</param> /// <param name="ReservationId">The unique identification of this reservation.</param> /// <param name="ExpiryDate">The timestamp when the reservation ends.</param> /// <param name="IdTag">The identifier for which the charge point has to reserve a connector.</param> /// <param name="ParentIdTag">An optional ParentIdTag.</param> public ReserveNowRequest(Connector_Id ConnectorId, Reservation_Id ReservationId, DateTime ExpiryDate, IdToken IdTag, IdToken?ParentIdTag = null) { #region Initial checks if (ConnectorId.IsNullOrEmpty) { throw new ArgumentNullException(nameof(ConnectorId), "The given unique connector identification must not be null!"); } if (ReservationId.IsNullOrEmpty) { throw new ArgumentNullException(nameof(ReservationId), "The given unique reservation identification must not be null!"); } if (IdTag == null) { throw new ArgumentNullException(nameof(IdTag), "The given identification tag must not be null!"); } #endregion this.ConnectorId = ConnectorId; this.ReservationId = ReservationId; this.ExpiryDate = ExpiryDate; this.IdTag = IdTag; this.ParentIdTag = ParentIdTag ?? new IdToken?(); }
public static Task <CancelReservationResponse> CancelReservation(this ICentralSystemClient ICentralSystemClient, ChargeBox_Id ChargeBoxId, Reservation_Id ReservationId, Request_Id?RequestId = null, DateTime?RequestTimestamp = null, TimeSpan?Timeout = null) => ICentralSystemClient.CancelReservation(new CancelReservationRequest(ChargeBoxId, ReservationId, RequestId, RequestTimestamp), Timeout);
/// <summary> /// Create a CancelReservation request. /// </summary> /// <param name="ChargeBoxId">The charge box identification.</param> /// <param name="ReservationId">The unique identification of this reservation.</param> /// /// <param name="RequestId">An optional request identification.</param> /// <param name="RequestTimestamp">An optional request timestamp.</param> public CancelReservationRequest(ChargeBox_Id ChargeBoxId, Reservation_Id ReservationId, Request_Id?RequestId = null, DateTime?RequestTimestamp = null) : base(ChargeBoxId, "CancelReservation", RequestId, RequestTimestamp) { this.ReservationId = ReservationId; }
public static Task <ReserveNowResponse> ReserveNow(this ICentralSystemClient ICentralSystemClient, ChargeBox_Id ChargeBoxId, Connector_Id ConnectorId, Reservation_Id ReservationId, DateTime ExpiryDate, IdToken IdTag, IdToken?ParentIdTag = null, Request_Id?RequestId = null, DateTime?RequestTimestamp = null, TimeSpan?Timeout = null) => ICentralSystemClient.ReserveNow(new ReserveNowRequest(ChargeBoxId, ConnectorId, ReservationId, ExpiryDate, IdTag, ParentIdTag, RequestId, RequestTimestamp), Timeout);
/// <summary> /// Create a new ReserveNow request. /// </summary> /// <param name="ChargeBoxId">The charge box identification.</param> /// <param name="ConnectorId">The identification of the connector to be reserved. A value of 0 means that the reservation is not for a specific connector.</param> /// <param name="ReservationId">The unique identification of this reservation.</param> /// <param name="ExpiryDate">The timestamp when the reservation ends.</param> /// <param name="IdTag">The identifier for which the charge point has to reserve a connector.</param> /// <param name="ParentIdTag">An optional ParentIdTag.</param> /// /// <param name="RequestId">An optional request identification.</param> /// <param name="RequestTimestamp">An optional request timestamp.</param> public ReserveNowRequest(ChargeBox_Id ChargeBoxId, Connector_Id ConnectorId, Reservation_Id ReservationId, DateTime ExpiryDate, IdToken IdTag, IdToken?ParentIdTag = null, Request_Id?RequestId = null, DateTime?RequestTimestamp = null) : base(ChargeBoxId, "ReserveNow", RequestId, RequestTimestamp) { this.ConnectorId = ConnectorId; this.ReservationId = ReservationId; this.ExpiryDate = ExpiryDate; this.IdTag = IdTag; this.ParentIdTag = ParentIdTag ?? new IdToken?(); }
public override string ToString() { return(From_Date.ToString("MM/dd/yyy").PadRight(15) + To_Date.ToString("MM/dd/yyy").PadRight(15) + Site_Id.ToString().PadRight(10) + Reservation_Id.ToString().PadRight(15) + Name.PadRight(30)); }
/// <summary> /// Create a cancel reservation request. /// </summary> /// <param name="ReservationId">The unique identification of this reservation.</param> public CancelReservationRequest(Reservation_Id ReservationId) { this.ReservationId = ReservationId; }