/// <summary> /// The relative url (rest resource) of the entity type /// </summary> internal virtual string GetRelativeUrl(PenneoConnector con) { return(con.ServiceLocator.GetInstance <RestResources>().GetResource(GetType(), Parent)); }
/// <summary> /// Get file assets with the given name for this entity /// </summary> protected byte[] GetFileAssets(PenneoConnector con, string assetName) { return(con.ApiConnector.GetFileAssets(this, assetName)); }
protected T GetAsset <T>(PenneoConnector con, string assetName) { return(con.ApiConnector.GetAsset <T>(this, assetName)); }
/// <summary> /// Activate the case file /// </summary> public bool Activate(PenneoConnector con) { return(PerformAction(con, ACTION_ACTIVATE).Success); }
/// <summary> /// Get entity linked with this entity based on url /// </summary> protected QuerySingleObjectResult <T> GetLinkedEntity <T>(PenneoConnector con, string url = null) where T : Entity { return(con.ApiConnector.GetLinkedEntity <T>(this, url)); }
/// <summary> /// Get all available case file templates /// </summary> public QueryResult <CaseFileTemplate> GetTemplates(PenneoConnector con) { return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes")); }
/// <summary> /// Get all errors associated with the case file /// </summary> public IEnumerable <string> GetErrors(PenneoConnector con) { return(GetStringListAsset(con, "errors")); }
public IEnumerable <LogEntry> GetEventLog(PenneoConnector con) { return(GetLinkedEntities <LogEntry>(con).Objects); }
public RestConnector(PenneoConnector con) { _con = con; }
public string GetLink(PenneoConnector con) { return(GetTextAssets(con, ASSET_LINK)); }
public ValidationContents GetContents(PenneoConnector con) { return(GetAsset <ValidationContents>(con, ASSET_CONTENTS)); }
public byte[] GetPdf(PenneoConnector con) { return(GetFileAssets(con, ASSET_PDF)); }
/// <summary> /// Get request data from the entity as a property->value dictionary /// </summary> public Dictionary <string, object> GetRequestData(PenneoConnector con) { var values = IsNew ? GetMapping(con).GetCreateValues(this) : GetMapping(con).GetUpdateValues(this); return(values); }
/// <summary> /// The entity type mapping /// </summary> internal IMapping GetMapping(PenneoConnector con) { return(con.ServiceLocator.GetInstance <Mappings>().GetMapping(GetType())); }
public IEnumerable <Customer> GetCustomers(PenneoConnector con) { return(_customers ?? (_customers = GetLinkedEntities <Customer>(con).Objects.ToList())); }
public Query(PenneoConnector con) { _con = con; }
public IEnumerable <CaseFileTemplate> GetCaseFileTemplates(PenneoConnector con) { return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes").Objects); }
internal override string GetRelativeUrl(PenneoConnector con) { return("/casefiles/" + CaseFileId + "/signers/" + SignerId + "/signertypes/" + SignerTypeId); }
/// <summary> /// Get all available documents types for this case file /// </summary> public IEnumerable <DocumentType> GetDocumentTypes(PenneoConnector con) { return(GetLinkedEntities <DocumentType>(con, "casefiles/" + Id + "/documenttypes").Objects); }
public bool AddCaseFile(PenneoConnector con, CaseFile caseFile) { return(LinkEntity(con, caseFile)); }
/// <summary> /// Send the case file for signing /// </summary> public bool Send(PenneoConnector con) { return(PerformAction(con, ACTION_SEND).Success); }
public bool RemoveCaseFile(PenneoConnector con, CaseFile caseFile) { return(UnlinkEntity(con, caseFile)); }
/// <summary> /// Get the latest server result for the entity /// </summary> public ServerResult GetLatestServerResult(PenneoConnector con) { return(con.ApiConnector.GetLatestEntityServerResult(this)); }
public bool AddValidation(PenneoConnector con, Validation validation) { return(LinkEntity(con, validation)); }
/// <summary> /// Find a specific linked entity /// </summary> protected T FindLinkedEntity <T>(PenneoConnector con, int id) { return(con.ApiConnector.FindLinkedEntity <T>(this, id)); }
public bool RemoveValidation(PenneoConnector con, Validation validation) { return(UnlinkEntity(con, validation)); }
/// <summary> /// Get text assets with the given name for this entity /// </summary> protected string GetTextAssets(PenneoConnector con, string assetName) { return(con.ApiConnector.GetTextAssets(this, assetName)); }
public bool SetSigner(PenneoConnector con, Signer signer) { Signer = signer; return(LinkEntity(con, Signer)); }
/// <summary> /// Get list of string asset with the given name for this entity /// </summary> protected IEnumerable <string> GetStringListAsset(PenneoConnector con, string assetName) { return(con.ApiConnector.GetStringListAsset(this, assetName)); }
/// <summary> /// Perform the given action on this entity /// </summary> protected ServerResult PerformAction(PenneoConnector con, string action) { return(con.ApiConnector.PerformAction(this, action)); }