예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TicketNonSrSettleResponse"/> class
        /// </summary>
        /// <param name="ticketNonSrSetter">The ticket non-sr settle sender</param>
        /// <param name="ticketId">The ticket identifier</param>
        /// <param name="status">The status</param>
        /// <param name="reason">The reason</param>
        /// <param name="correlationId">The correlation id</param>
        /// <param name="signature">The signature</param>
        /// <param name="version">The version</param>
        /// <param name="additionalInfo">The additional information</param>
        /// <param name="orgJson">The original json string received from the mts</param>
        public TicketNonSrSettleResponse(ITicketSender ticketNonSrSetter,
                                         string ticketId,
                                         NonSrSettleAcceptance status,
                                         IResponseReason reason,
                                         string correlationId,
                                         string signature,
                                         string version = TicketHelper.MtsTicketVersion,
                                         IDictionary <string, string> additionalInfo = null,
                                         string orgJson = null)
        {
            TicketId       = ticketId;
            Status         = status;
            Reason         = reason;
            Signature      = signature;
            Version        = version;
            Timestamp      = DateTime.UtcNow;
            CorrelationId  = correlationId;
            AdditionalInfo = additionalInfo;
            _originalJson  = orgJson;

            _ticketNonSrSettle = ticketNonSrSetter;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TicketResponse"/> class
        /// </summary>
        /// <param name="ticketSender">The ticket sender</param>
        /// <param name="ticketId">The ticket identifier</param>
        /// <param name="status">The status</param>
        /// <param name="reason">The reason</param>
        /// <param name="betDetails">The bet details</param>
        /// <param name="correlationId">The correlation id</param>
        /// <param name="signature">The signature</param>
        /// <param name="exchangeRate">The exchange rate</param>
        /// <param name="version">The version</param>
        /// <param name="additionalInfo">The additional information</param>
        /// <param name="autoAcceptedOdds">Auto accepted odds</param>
        /// <param name="orgJson">The original json string received from the mts</param>
        public TicketResponse(ITicketSender ticketSender,
                              string ticketId,
                              TicketAcceptance status,
                              IResponseReason reason,
                              IEnumerable <IBetDetail> betDetails,
                              string correlationId,
                              string signature  = null,
                              long exchangeRate = -1,
                              string version    = TicketHelper.MtsTicketVersion,
                              IDictionary <string, string> additionalInfo      = null,
                              IEnumerable <IAutoAcceptedOdds> autoAcceptedOdds = null,
                              string orgJson = null)
        {
            Guard.Argument(ticketId, nameof(ticketId)).Require(TicketHelper.ValidateTicketId(ticketId));
            Guard.Argument(version, nameof(version)).NotNull().NotEmpty();

            TicketId = ticketId;
            Status   = status;
            Reason   = reason;
            if (betDetails != null)
            {
                BetDetails = betDetails as IReadOnlyCollection <IBetDetail>;
            }
            Signature      = signature;
            ExchangeRate   = exchangeRate;
            Version        = version;
            Timestamp      = DateTime.UtcNow;
            CorrelationId  = correlationId;
            AdditionalInfo = additionalInfo != null && additionalInfo.Any()
                                 ? additionalInfo
                                 : null;
            AutoAcceptedOdds = autoAcceptedOdds;
            _originalJson    = orgJson;

            _ticketSender = ticketSender;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="TicketNonSrSettleResponseMapper"/> class
 /// </summary>
 /// <param name="ticketSender">The ticket non-sportradar settle ack sender (null)</param>
 public TicketNonSrSettleResponseMapper(ITicketSender ticketSender)
 {
     _ticketSender = ticketSender;
 }
예제 #4
0
 public EntitiesMapper(ITicketSender ticketAckSender, ITicketSender ticketCancelAckSender)
 {
     _ticketAckSender       = ticketAckSender;
     _ticketCancelAckSender = ticketCancelAckSender;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TicketResponseMapper"/> class
 /// </summary>
 /// <param name="ticketSender">The ticket ack sender</param>
 public TicketResponseMapper(ITicketSender ticketSender)
 {
     _ticketSender = ticketSender;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TicketCancelResponseMapper"/> class
 /// </summary>
 /// <param name="ticketCancelAckSender">The ticket cancel ack sender</param>
 public TicketCancelResponseMapper(ITicketSender ticketCancelAckSender)
 {
     _ticketCancelAckSender = ticketCancelAckSender;
 }