示例#1
0
 public OneSpanSign.Sdk.DelegationReport DownloadDelegationReport(string senderId, DateTime from, DateTime to)
 {
     try
     {
         string path     = BuildDelegationReportUrl(senderId, from, to);
         string response = restClient.Get(path);
         OneSpanSign.API.DelegationReport apiDelegationReport = JsonConvert.DeserializeObject <OneSpanSign.API.DelegationReport>(response, settings);
         return(new DelegationReportConverter(apiDelegationReport).ToSDKDelegationReport());
     }
     catch (OssServerException e)
     {
         throw new OssServerException("Could not download the delegation report." + " Exception: " + e.Message, e.ServerError, e);
     }
     catch (Exception e)
     {
         throw new OssException("Could not download the delegation report." + " Exception: " + e.Message, e);
     }
 }
示例#2
0
        internal OneSpanSign.API.DelegationReport ToAPIDelegationReport()
        {
            if (sdkDelegationReport == null)
            {
                return(apiDelegationReport);
            }

            OneSpanSign.API.DelegationReport result = new OneSpanSign.API.DelegationReport();

            result.From = sdkDelegationReport.From;
            result.To   = sdkDelegationReport.To;

            foreach (KeyValuePair <string, IList <DelegationEventReport> > sdkDelegationEventDictionary in sdkDelegationReport.DelegationEvents)
            {
                result.DelegationEvents.Add(sdkDelegationEventDictionary.Key, GetAPIDelegationEventList(sdkDelegationEventDictionary.Value));
            }

            return(result);
        }
示例#3
0
 internal DelegationReportConverter(OneSpanSign.API.DelegationReport apiDelegationReport)
 {
     this.apiDelegationReport = apiDelegationReport;
 }