public ActionQuery(CfActionQuery source)
     : base(source.MaxResults, source.FirstResult)
 {
     if (source.BroadcastId.HasValue)
     {
         BroadcastId = source.BroadcastId.Value;
         BroadcastIdSpecified = true;
     }
     if (source.BatchId.HasValue)
     {
         BatchId = source.BatchId.Value;
         BatchIdSpecified = true;
     }
     State = EnumeratedMapper.ToSoapEnumerated(source.State);
     Result = EnumeratedMapper.ToSoapEnumerated(source.Result);
     if (source.Inbound.HasValue)
     {
         Inbound = source.Inbound.Value;
         InboundSpecified = true;
     }
     if (source.IntervalBegin.HasValue)
     {
         IntervalBegin = source.IntervalBegin.Value;
         IntervalBeginSpecified = true;
     }
     if (source.IntervalEnd.HasValue)
     {
         IntervalEnd = source.IntervalEnd.Value;
         IntervalEndSpecified = true;
     }
     FromNumber = source.FromNumber;
     ToNumber = source.ToNumber;
     LabelName = source.LabelName;
 }
        public void FixtureSetup()
        {
            Client = new RestTextClient(MockClient.User(), MockClient.Password());

            var localTimeZoneRestriction = new CfLocalTimeZoneRestriction(DateTime.Now, DateTime.Now);
            CfResult[] result = { CfResult.Received };
            CfRetryPhoneType[] phoneTypes = { CfRetryPhoneType.FirstNumber };
            var broadcastConfigRestryConfig = new CfBroadcastConfigRetryConfig(1000, 2, result, phoneTypes);
            var textBroadcastConfig = new CfTextBroadcastConfig(1, DateTime.Now, "14252163710", localTimeZoneRestriction, broadcastConfigRestryConfig, "Test", CfBigMessageStrategy.DoNotSend);

            var toNumber = new [] { new CfToNumber("Data", null, "14252163710") };
            SendText = new CfSendText(String.Empty, CfBroadcastType.Text, "broadcastSoap", toNumber, false, textBroadcastConfig, 1875873001, true);

            CfActionQuery = new CfActionQuery(100, 0, 1838228001, 1092170001, new[] { CfActionState.Ready }, null , false, new DateTime(2014, 1, 1),
                new DateTime(2014, 12, 1), null, null, null);

            QueryAutoReplies = new CfQueryAutoReplies(100, 0, null);
        }
        public void FixtureSetup()
        {
            Client = new RestCallClient(MockClient.User(), MockClient.Password());

            var localTimeZoneRestriction = new CfLocalTimeZoneRestriction(DateTime.Now, DateTime.Now);
            CfResult[] result = { CfResult.Received };
            CfRetryPhoneType[] phoneTypes = { CfRetryPhoneType.FirstNumber };
            var broadcastConfigRestryConfig = new CfBroadcastConfigRetryConfig(1000, 2, result, phoneTypes);
            var ivrBroadcastConfig = new CfIvrBroadcastConfig(1, DateTime.Now, "14252163710", localTimeZoneRestriction, broadcastConfigRestryConfig,
                "<dialplan><play type=\"tts\">Congratulations! You have successfully configured a CallFire I V R.</play></dialplan>");

            var toNumber = new[] { new CfToNumber("Data", null, "14252163710") };
            SendCall = new CfSendCall(String.Empty, CfBroadcastType.Ivr, "broadcastSoap", toNumber, false, ivrBroadcastConfig);

            ActionQuery = new CfActionQuery(100, 0, 1836940001, 1092170001, new[] { CfActionState.Finished }, new[] { CfResult.La },
                false, new DateTime(2014, 1, 1), new DateTime(2014, 12, 1), "12132609784", "14252163710", string.Empty);

            QuerySoundMeta = new CfQuery();
        }
 public CfTextQueryResult QueryTexts(CfActionQuery cfQueryText)
 {
     var textQueryResult = TextService.QueryTexts(new ActionQuery(cfQueryText));
     return TextQueryResultMapper.FromSoapContactBatchQueryResult(textQueryResult);
 }
 public CfCallQueryResult QueryCalls(CfActionQuery cfActionQuery)
 {
     return CallQueryResultMapper.FromCallQueryResult(CallService.QueryCalls(new ActionQuery(cfActionQuery)));
 }