public Invoice(string subject, string fileType, string path, decimal amount, string account, DateTime duedate, string kid = null, AuthenticationLevel authenticationLevel = AuthenticationLevel.Password, SensitivityLevel sensitivityLevel = SensitivityLevel.Normal, ISmsNotification smsNotification = null) : this( subject, fileType, ExtractBytesFromPath(path), amount, account, duedate, kid, authenticationLevel, sensitivityLevel, smsNotification) { }
public Invoice(string subject, string fileType, byte[] contentBytes, decimal amount, string account, DateTime duedate, string kid = null, AuthenticationLevel authenticationLevel = AuthenticationLevel.Password, SensitivityLevel sensitivityLevel = SensitivityLevel.Normal, ISmsNotification smsNotification = null) : base(subject, fileType, contentBytes, authenticationLevel, sensitivityLevel, smsNotification) { Kid = kid; Amount = amount; Account = account; Duedate = duedate; }
/// <param name="subject">The subject of the document.</param> /// <param name="fileType">The file type of the file (e.g pdf,txt.. ).</param> /// <param name="contentBytes">The content of file in byteArray.</param> /// <param name="authenticationLevel">Required authentication level of the document. Default password.</param> /// <param name="sensitivityLevel">Sensitivity level of the document. Default normal.</param> /// <param name="smsNotification">Optional notification to receiver of message via SMS. </param> /// <param name="dataType">Optional metadata for enriching the document when viewed in Digipost</param> public Document(string subject, string fileType, byte[] contentBytes, AuthenticationLevel authenticationLevel = AuthenticationLevel.Password, SensitivityLevel sensitivityLevel = SensitivityLevel.Normal, ISmsNotification smsNotification = null, string dataType = null) { Guid = System.Guid.NewGuid().ToString(); Subject = subject; FileType = fileType; ContentBytes = contentBytes; AuthenticationLevel = authenticationLevel; SensitivityLevel = sensitivityLevel; SmsNotification = smsNotification; DataType = dataType; }
public static sensitivitylevel ToSensitivityLevel(this SensitivityLevel sensitivityLevel) { switch (sensitivityLevel) { case SensitivityLevel.Normal: return(sensitivitylevel.NORMAL); case SensitivityLevel.Sensitive: return(sensitivitylevel.SENSITIVE); default: throw new ArgumentOutOfRangeException(nameof(sensitivityLevel), sensitivityLevel, null); } }
internal override IEnumerable <KeyValuePair <string, string> > GetQueryParameters() { yield return(new KeyValuePair <string, string>("sensitivityLevel", SensitivityLevel.ToString().ToLowerInvariant())); yield return(new KeyValuePair <string, string>("detectLightChange", DetectLightChange.ToString().ToLowerInvariant())); yield return(new KeyValuePair <string, string>("frameSamplingValue", FrameSamplingValue.ToString(CultureInfo.InvariantCulture))); yield return(new KeyValuePair <string, string>("mergeTimeThreshold", MergeTimeThreshold.ToString(CultureInfo.InvariantCulture))); if (DetectionZones != null) { yield return(new KeyValuePair <string, string>( "detectionZones", string.Join("|", DetectionZones.Select( polygon => string.Join(";", polygon.Points.Select(point => $"{point.X},{point.Y}")))))); } }
public virtual async Task<IMessageDeliveryResult> Send(byte[] fileContent, string filetype, string subject,IdentificationType identification, string identificationValue, SensitivityLevel sensitivity = SensitivityLevel.Normal, AuthenticationLevel authentication = AuthenticationLevel.Password, SmsNotification smsNotification = null,PrintDetails printDetails= null) { var recipient = new RecipientById(identification, identificationValue); var primaryDocument = new Document(subject, filetype, fileContent) { SensitivityLevel = sensitivity, AuthenticationLevel = authentication }; if (smsNotification != null) primaryDocument.SmsNotification = smsNotification; var m = new Message(recipient, primaryDocument); if (printDetails != null) m.PrintDetails = printDetails; return await GetClient().SendMessageAsync(m); }
/// <param name="subject">The subject of the document.</param> /// <param name="fileType">The mime type of the file. e.g pdf,txt..</param> /// <param name="authenticationLevel">Required authentication level of the document. Default password.</param> /// <param name="sensitivityLevel">Sensitivity level of the document. Default normal.</param> /// <param name="smsNotification">Optional notification to receiver of message via SMS. </param> /// <param name="dataType">Optional metadata for enriching the document when viewed in Digipost</param> internal Document(string subject, string fileType, AuthenticationLevel authenticationLevel = AuthenticationLevel.Password, SensitivityLevel sensitivityLevel = SensitivityLevel.Normal, ISmsNotification smsNotification = null, string dataType = null) : this(subject, fileType, new byte[] { }, authenticationLevel, sensitivityLevel, smsNotification, dataType) { }
/// <param name="subject">The subject of the document.</param> /// <param name="fileType">The file type of the file (e.g pdf,txt.. ).</param> /// <param name="path">The path to the file. e.g c:\docs\file01.txt</param> /// <param name="authenticationLevel">Required authentication level of the document. Default password.</param> /// <param name="sensitivityLevel">Sensitivity level of the document. Default normal.</param> /// <param name="smsNotification">Optional notification to receiver of message via SMS. </param> /// <param name="dataType">Optional metadata for enriching the document when viewed in Digipost</param> public Document(string subject, string fileType, string path, AuthenticationLevel authenticationLevel = AuthenticationLevel.Password, SensitivityLevel sensitivityLevel = SensitivityLevel.Normal, ISmsNotification smsNotification = null, string dataType = null) : this(subject, fileType, new byte[] { }, authenticationLevel, sensitivityLevel, smsNotification, dataType) { ContentBytes = ExtractBytesFromPath(path); }