public SendText(CfSendText cfSendText) { RequestId = cfSendText.RequestId; Type = EnumeratedMapper.ToSoapEnumerated<BroadcastType>(cfSendText.Type.ToString()).ToString(); BroadcastName = cfSendText.BroadcastName; ToNumber = ToNumberMapper.ToToNumber(cfSendText.ToNumber); ScrubBroadcastDuplicates = cfSendText.ScrubBroadcastDuplicates; TextBroadcastConfig = TextBroadcastConfigMapper.ToSoapTextBroadcastConfig(cfSendText.TextBroadcastConfig); if (cfSendText.BroadcastId.HasValue) { BroadcastId = cfSendText.BroadcastId.Value; BroadcastIdSpecified = true; } UseDefaultBroadcast = cfSendText.UseDefaultBroadcast; }
public void Test_SendTextLabels() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendText = new CfSendText { ToNumber = toNumberList, UseDefaultBroadcast = true, Type = CfBroadcastType.Text, TextBroadcastConfig = new CfTextBroadcastConfig { Message = "Test message", }, Labels = new string[] { "Test Label 1", "Test Label 2" } }; var id = Client.SendText(sendText); Assert.IsNotNull(id); }
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 long SendText(CfSendText cfSendText) { return TextService.SendText(new SendText(cfSendText)); }