Пример #1
0
        /// <summary>
        /// Create a new charge detail record location containing only the relevant
        /// information from the official location.
        /// </summary>
        public CDRLocation(Location_Id Id,
                           String Address,
                           String City,
                           String Country,
                           GeoCoordinate Coordinates,
                           EVSE_UId EVSEUId,
                           EVSE_Id EVSEId,
                           Connector_Id ConnectorId,
                           ConnectorTypes ConnectorStandard,
                           ConnectorFormats ConnectorFormat,
                           PowerTypes ConnectorPowerType,

                           String Name       = null,
                           String PostalCode = null)

        {
            this.Id                 = Id;
            this.Address            = Address;
            this.City               = City;
            this.Country            = Country;
            this.Coordinates        = Coordinates;
            this.EVSEUId            = EVSEUId;
            this.EVSEId             = EVSEId;
            this.ConnectorId        = ConnectorId;
            this.ConnectorStandard  = ConnectorStandard;
            this.ConnectorFormat    = ConnectorFormat;
            this.ConnectorPowerType = ConnectorPowerType;

            this.Name       = Name;
            this.PostalCode = PostalCode;
        }
Пример #2
0
        /// <summary>
        /// Create a new charging session.
        /// </summary>
        public Session(CountryCode CountryCode,
                       Party_Id PartyId,
                       Session_Id Id,
                       DateTime Start,
                       Decimal kWh,
                       CDRToken CDRToken,
                       AuthMethods AuthMethod,
                       Location_Id LocationId,
                       EVSE_UId EVSEUId,
                       Connector_Id ConnectorId,
                       Currency Currency,
                       SessionStatusTypes Status,

                       DateTime?End = null,
                       AuthorizationReference?AuthorizationReference = null,
                       Meter_Id?MeterId        = null,
                       EnergyMeter EnergyMeter = null,
                       IEnumerable <TransparencySoftware> TransparencySoftwares = null,
                       IEnumerable <ChargingPeriod> ChargingPeriods             = null,
                       Price?TotalCosts = null,

                       DateTime?LastUpdated = null)

        {
            this.CountryCode = CountryCode;
            this.PartyId     = PartyId;
            this.Id          = Id;
            this.Start       = Start;
            this.kWh         = kWh;
            this.CDRToken    = CDRToken;
            this.AuthMethod  = AuthMethod;
            this.LocationId  = LocationId;
            this.EVSEUId     = EVSEUId;
            this.ConnectorId = ConnectorId;
            this.Currency    = Currency;
            this.Status      = Status;

            this.End = End;
            this.AuthorizationReference = AuthorizationReference;
            this.MeterId               = MeterId;
            this.EnergyMeter           = EnergyMeter;
            this.TransparencySoftwares = TransparencySoftwares;
            this.ChargingPeriods       = ChargingPeriods;
            this.TotalCosts            = TotalCosts;

            this.LastUpdated = LastUpdated ?? DateTime.Now;

            CalcSHA256Hash();
        }
        /// <summary>
        /// Create new 'unlock connector' command command.
        /// </summary>
        /// <param name="LocationId">Location identification of the location (belonging to the CPO this request is send to) of which it is requested to unlock the connector.</param>
        /// <param name="EVSEUId">EVSE identification of the EVSE of this location of which it is requested to unlock the connector.</param>
        /// <param name="ConnectorId">Connector identification of the connector of this location of which it is requested to unlock.</param>
        /// <param name="ResponseURL">URL that the CommandResult POST should be sent to. This URL might contain an unique identification to be able to distinguish between 'unlock connector' command requests.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="CorrelationId">An optional request correlation identification.</param>
        public UnlockConnectorCommand(Location_Id LocationId,
                                      EVSE_UId EVSEUId,
                                      Connector_Id ConnectorId,
                                      URL ResponseURL,

                                      Request_Id?RequestId         = null,
                                      Correlation_Id?CorrelationId = null)

            : base(ResponseURL,
                   RequestId,
                   CorrelationId)

        {
            this.LocationId  = LocationId;
            this.EVSEUId     = EVSEUId;
            this.ConnectorId = ConnectorId;
        }