internal static CfContactBatch FromSoapContactBatch(ContactBatch source) { if (source == null) { return(null); } return(new CfContactBatch(source.id, source.Name, EnumeratedMapper.EnumFromSoapEnumerated <CfBatchStatus>(source.Status.ToString()), source.BroadcastId, source.Created, source.Size, source.Remaining)); }
internal static CfBroadcast FromSoapBroadCast(Broadcast source) { if (source == null) { return(null); } var broadcastConfig = BroadcastConfigMapper.FromBroadcastConfig(source.Item, source.Type); return(new CfBroadcast(source.id, source.Name, EnumeratedMapper.EnumFromSoapEnumerated <CfBroadcastStatus>(source.Status.ToString()), source.LastModified, EnumeratedMapper.EnumFromSoapEnumerated <CfBroadcastType>(source.Type.ToString()), broadcastConfig)); }
internal static CfBroadcastConfigRetryConfig FromBroadcastConfigRetryConfig(BroadcastConfigRetryConfig source) { if (source == null) { return(null); } var retry = EnumeratedMapper.ArrayFromSoapEnumerated <CfResult>(source.RetryResults); var retryPhoneType = EnumeratedMapper.ArrayFromSoapEnumerated <CfRetryPhoneType>(source.RetryPhoneTypes); return(new CfBroadcastConfigRetryConfig(source.MaxAttempts, source.MinutesBetweenAttempts, retry, retryPhoneType)); }
internal static BroadcastConfigRetryConfig ToBroadcastConfigRetryConfig(CfBroadcastConfigRetryConfig source) { if (source == null) { return(null); } var retry = EnumeratedMapper.ToSoapEnumerated(source.RetryResults); var retryPhoneType = EnumeratedMapper.ToSoapEnumerated(source.RetryPhoneTypes); return(new BroadcastConfigRetryConfig(source.MaxAttempts, source.MinutesBetweenAttempts, retry, retryPhoneType)); }
internal static CfKeyword FromKeyword(Keyword source) { if (source == null) { return(null); } var state = EnumeratedMapper.EnumFromSoapEnumerated <CfNumberStatus>(source.Status.ToString()); var leaseInfo = LeaseInfoMapper.FromLeaseInfo(source.LeaseInfo); return(new CfKeyword(source.ShortCode, source.Keyword1, state, leaseInfo)); }
internal static CfTextRecord FromTextRecord(TextRecord source) { if (source == null) { return(null); } var result = EnumeratedMapper.EnumFromSoapEnumerated <CfResult>(source.Result); var questionResponse = ActionRecordQuestionResponseMapper.FromActionRecordQuestionResponse(source.QuestionResponse); return(new CfTextRecord(result, source.FinishTime, source.BilledAmount, questionResponse, source.id, source.Message)); }
internal static TextRecord ToTextRecord(CfTextRecord source) { if (source == null) { return(null); } var result = EnumeratedMapper.ScreamingSnakeCase(source.Result.ToString()); var questionResponse = ActionRecordQuestionResponseMapper.ToActionRecordQuestionResponse(source.QuestionResponse); return(new TextRecord(result, source.FinishTime, source.BilledAmount, questionResponse, source.Id, source.Message)); }
internal static CfBroadcastSchedule FromSoapBroadcastSchedule(BroadcastSchedule source) { if (source == null) { return(null); } var daysOfWeek = EnumeratedMapper.ArrayFromSoapEnumerated <CfDaysOfWeek>(source.DaysOfWeek); return(new CfBroadcastSchedule(source.id, source.StartTimeOfDay, source.StopTimeOfDay, source.TimeZone, source.BeginDate, source.EndDate, daysOfWeek)); }
internal static CfSubscription FromSoapSubscription(Subscription source) { if (source == null) { return(null); } var subscriptionFilter = SubscriptionSubscriptionFilterMapper.FromSoapSubscriptionSubscriptionFilter(source.SubscriptionFilter); return(new CfSubscription(source.id, source.Enabled, source.Endpoint, EnumeratedMapper.EnumFromSoapEnumerated <CfNotificationFormat>(source.NotificationFormat.ToString()), EnumeratedMapper.EnumFromSoapEnumerated <CfSubscriptionTriggerEvent>(source.TriggerEvent.ToString()), subscriptionFilter)); }
internal static CfTextBroadcastConfig FromSoapTextBroadcastConfig(TextBroadcastConfig source) { if (source == null) { return(null); } var localTimeZoneRestriction = LocalTimeZoneRestrictionMapper.FromSoapLocalTimeZoneRestriction(source.LocalTimeZoneRestriction); var retryConfig = BroadcastConfigRetryConfigMapper.FromBroadcastConfigRetryConfig(source.RetryConfig); var bigMessageStrategy = EnumeratedMapper.EnumFromSoapEnumerated <CfBigMessageStrategy>(source.BigMessageStrategy.ToString()); return(new CfTextBroadcastConfig(source.id, source.Created, source.FromNumber, localTimeZoneRestriction, retryConfig, source.Message, bigMessageStrategy)); }
internal static CfCallRecord FromCallRecord(CallRecord source) { if (source == null) { return(null); } var result = EnumeratedMapper.EnumFromSoapEnumerated <CfResult>(source.Result); var questionResponse = ActionRecordQuestionResponseMapper.FromActionRecordQuestionResponse(source.QuestionResponse); var recordingMeta = RecordingMetaMapper.FromRecordingMeta(source.RecordingMeta); return(new CfCallRecord(result, source.FinishTime, source.BilledAmount, questionResponse, source.id, source.OriginateTime, source.AnswerTime, source.Duration, recordingMeta)); }
internal static CfNumberOrder FromNumberOrder(NumberOrder source) { if (source == null) { return(null); } var status = EnumeratedMapper.EnumFromSoapEnumerated <CfOrderStatus>(source.Status.ToString()); var localNumbers = NumberOrderItemMapper.FromNumberOrderItem(source.LocalNumbers); var tollFreeNumbers = NumberOrderItemMapper.FromNumberOrderItem(source.TollFreeNumbers); var keywords = NumberOrderItemMapper.FromNumberOrderItem(source.Keywords); return(new CfNumberOrder(status, source.Created, source.TotalCost, localNumbers, tollFreeNumbers, keywords, source.id)); }
internal static CfNumber FromNumber(Number source) { if (source == null) { return(null); } var region = RegionMapper.FromRegion(source.Region); var status = EnumeratedMapper.EnumFromSoapEnumerated <CfNumberStatus>(source.Status.ToString()); var leaseInfo = LeaseInfoMapper.FromLeaseInfo(source.LeaseInfo); var numberConfiguration = NumberConfigurationMapper.FromNumberConfiguration(source.NumberConfiguration); return(new CfNumber(source.Number1, source.NationalFormat, source.TollFree, region, status, leaseInfo, numberConfiguration)); }
internal static CfNumberConfiguration FromNumberConfiguration(NumberConfiguration source) { if (source == null) { return(null); } var callFeature = EnumeratedMapper.EnumFromSoapEnumerated <CfNumberFeature>(source.CallFeature.ToString()); var textFeature = EnumeratedMapper.EnumFromSoapEnumerated <CfNumberFeature>(source.TextFeature.ToString()); var inboundCallConfigurationType = EnumeratedMapper.EnumFromSoapEnumerated <CfInboundType>(source.InboundCallConfigurationType.ToString()); var inboundCallConfiguration = NumberConfigurationInboundCallConfigurationMapper.FromNumberConfigurationInboundCallConfiguration(source.InboundCallConfiguration); return(new CfNumberConfiguration(callFeature, textFeature, inboundCallConfigurationType, inboundCallConfiguration)); }
internal static CfCall FromCall(Call source) { if (source == null) { return(null); } var toNumber = ToNumberMapper.FromToNumber(source.ToNumber); var state = EnumeratedMapper.EnumFromSoapEnumerated <CfActionState>(source.State); var label = LabelMapper.FromLabel(source.Label); var callRecord = CallRecordMapper.FromCallRecord(source.CallRecord); var result = EnumeratedMapper.EnumFromSoapEnumerated <CfResult>(source.FinalResult); return(new CfCall(source.FromNumber, toNumber, state, source.BatchId, source.BroadcastId, source.ContactId, source.Inbound, source.Created, source.Modified, result, label, source.id, callRecord)); }
internal static CfVoiceBroadcastConfig FromSoapVoiceBroadcastConfig(VoiceBroadcastConfig source) { if (source == null) { return(null); } var localTimeZoneRestriction = LocalTimeZoneRestrictionMapper.FromSoapLocalTimeZoneRestriction(source.LocalTimeZoneRestriction); var retryConfig = BroadcastConfigRetryConfigMapper.FromBroadcastConfigRetryConfig(source.RetryConfig); var answeringMachineConfig = EnumeratedMapper.EnumFromSoapEnumerated <CfAnsweringMachineConfig>(source.AnsweringMachineConfig.ToString()); return(new CfVoiceBroadcastConfig(source.id, source.Created, source.FromNumber, localTimeZoneRestriction, retryConfig, answeringMachineConfig, source.Item, source.LiveSoundTextVoice, source.Item1, source.MachineSoundTextVoice, source.Item2, source.TransferSoundTextVoice, source.TransferDigit, source.TransferNumber, source.Item3, source.DncSoundTextVoice, source.DncDigit, source.MaxActiveTransfers)); }
internal static CfSoundMeta FromSoundMeta(SoundMeta source) { return(source == null ? null : new CfSoundMeta(EnumeratedMapper.EnumFromSoapEnumerated <CfSoundStatus>(source.Status.ToString()), source.Name, source.Created, source.LengthInSeconds, source.id)); }