public Task <PrintFormResult> GetGeneratedPrintFormAsync(string authToken, DocumentType documentType, string printFormId)
        {
            var qsb = new PathAndQueryBuilder("/GetGeneratedPrintForm")
                      .With("documentType", documentType.ToString())
                      .With("printFormId", printFormId);

            return(GetPrintFormResultAsync(authToken, qsb.BuildPathAndQuery()));
        }
예제 #2
0
        public string GeneratePrintFormFromAttachment(string authToken, DocumentType documentType, byte[] content, string fromBoxId = null)
        {
            var queryString = new StringBuilder();

            queryString.AppendFormat("/GeneratePrintFormFromAttachment?documentType={0}", documentType);
            if (!string.IsNullOrEmpty(fromBoxId))
            {
                queryString.AppendFormat("&fromBoxId={0}", fromBoxId);
            }
            var responseBytes = PerformHttpRequest(authToken, "POST", queryString.ToString(), content);

            return(Encoding.UTF8.GetString(responseBytes));
        }
예제 #3
0
        public PrintFormResult GetGeneratedPrintForm(string authToken, DocumentType documentType, string printFormId)
        {
            var queryString = string.Format("/GetGeneratedPrintForm?documentType={0}&printFormId={1}", documentType, printFormId);

            return(GetPrintFormResult(authToken, queryString));
        }
        public async Task <string> GeneratePrintFormFromAttachmentAsync(string authToken, DocumentType documentType, byte[] content, string fromBoxId = null)
        {
            var qsb = new PathAndQueryBuilder("/GeneratePrintFormFromAttachment")
                      .With("documentType", documentType.ToString());

            if (!string.IsNullOrEmpty(fromBoxId))
            {
                qsb.AddParameter("fromBoxId", fromBoxId);
            }
            var responseBytes = await PerformHttpRequestAsync(authToken, "POST", qsb.BuildPathAndQuery(), content).ConfigureAwait(false);

            return(Encoding.UTF8.GetString(responseBytes));
        }