public SiteResponseModel(Cipher cipher)
: base("site")
{
if(cipher == null)
{
throw new ArgumentNullException(nameof(cipher));
}
if(cipher.Type != Core.Enums.CipherType.Site)
{
throw new ArgumentException(nameof(cipher.Type));
}
var data = new SiteDataModel(cipher);
Id = cipher.Id.ToString();
FolderId = cipher.FolderId?.ToString();
Favorite = cipher.Favorite;
Name = data.Name;
Uri = data.Uri;
Username = data.Username;
Password = data.Password;
Notes = data.Notes;
RevisionDate = cipher.RevisionDate;
}