Beispiel #1
0
        OutOfService(IId AuthorizatorId,
                     IReceiveChargeDetailRecords IReceiveChargeDetailRecords,
                     IEnumerable <ChargeDetailRecord> RejectedChargeDetailRecords,
                     String Description            = null,
                     IEnumerable <String> Warnings = null,
                     TimeSpan?Runtime = null)


        => new SendCDRsResult(AuthorizatorId,
                              IReceiveChargeDetailRecords,
                              SendCDRsResultTypes.OutOfService,
                              RejectedChargeDetailRecords.Select(cdr => new SendCDRResult(cdr, SendCDRResultTypes.OutOfService)),
                              Description,
                              Warnings,
                              Runtime);
Beispiel #2
0
        Error(IId AuthorizatorId,
              IReceiveChargeDetailRecords IReceiveChargeDetailRecords,
              IEnumerable <ChargeDetailRecord> ResultMap,
              String Description            = null,
              IEnumerable <String> Warnings = null,
              TimeSpan?Runtime = null)


        => new SendCDRsResult(AuthorizatorId,
                              IReceiveChargeDetailRecords,
                              SendCDRsResultTypes.Success,
                              ResultMap.Select(cdr => new SendCDRResult(cdr, SendCDRResultTypes.Error)),
                              Description,
                              Warnings,
                              Runtime);
Beispiel #3
0
        /// <summary>
        /// Create a new send charge detail records result.
        /// </summary>
        /// <param name="AuthorizatorId">The identification of the charge detail record receiving entity.</param>
        /// <param name="IReceiveChargeDetailRecords">The entity receiving charge detail records.</param>
        /// <param name="Result">The result of the charge detail record transmission.</param>
        /// <param name="ResultMap">Status information about all charge detail records.</param>
        /// <param name="Description">An optional description of the send charge detail records result.</param>
        /// <param name="Warnings">Warnings or additional information.</param>
        /// <param name="Runtime">The runtime of the request.</param>
        internal SendCDRsResult(IId AuthorizatorId,
                                IReceiveChargeDetailRecords IReceiveChargeDetailRecords,
                                SendCDRsResultTypes Result,
                                IEnumerable <SendCDRResult> ResultMap = null,
                                String Description            = null,
                                IEnumerable <String> Warnings = null,
                                TimeSpan?Runtime = null)
        {
            this.AuthorizatorId = AuthorizatorId;
            this.IReceiveChargeDetailRecords = IReceiveChargeDetailRecords;
            this.Result      = Result;
            this.ResultMap   = ResultMap ?? new SendCDRResult[0];
            this.Description = Description;
            this.Warnings    = Warnings != null
                                                    ? Warnings.Where(warning => warning != null).
                               SafeSelect(warning => warning.Trim()).
                               Where(warning => warning.IsNotNullOrEmpty())
                                                    : new String[0];

            this.Runtime = Runtime;
        }