public Task <EmployeeSubscriptions> UpdateSubscriptionsAsync(string authToken, string boxId, string userId, SubscriptionsToUpdate subscriptionsToUpdate)
        {
            var queryString = new PathAndQueryBuilder("/UpdateSubscriptions");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("userId", userId);
            return(PerformHttpRequestAsync <SubscriptionsToUpdate, EmployeeSubscriptions>(authToken, queryString.BuildPathAndQuery(), subscriptionsToUpdate));
        }
        public Task <Employee> GetEmployeeAsync(string authToken, string boxId, string userId)
        {
            var queryString = new PathAndQueryBuilder("/GetEmployee");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("userId", userId);
            return(PerformHttpRequestAsync <Employee>(authToken, "GET", queryString.BuildPathAndQuery()));
        }
        public EmployeeSubscriptions GetSubscriptions(string authToken, string boxId, string userId)
        {
            var queryString = new PathAndQueryBuilder("/GetSubscriptions");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("userId", userId);
            return(PerformHttpRequest <EmployeeSubscriptions>(authToken, "GET", queryString.BuildPathAndQuery()));
        }
        public Task <Employee> UpdateEmployeeAsync(string authToken, string boxId, string userId, EmployeeToUpdate employeeToUpdate)
        {
            var queryString = new PathAndQueryBuilder("/UpdateEmployee");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("userId", userId);
            return(PerformHttpRequestAsync <EmployeeToUpdate, Employee>(authToken, queryString.BuildPathAndQuery(), employeeToUpdate));
        }
        public void DeleteEmployee(string authToken, string boxId, string userId)
        {
            var queryString = new PathAndQueryBuilder("/DeleteEmployee");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("userId", userId);
            PerformHttpRequest(authToken, "POST", queryString.BuildPathAndQuery());
        }
        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()));
        }
Beispiel #7
0
        public Task <DssSignResult> DssSignResultAsync(string authToken, string boxId, string taskId)
        {
            var queryString = new PathAndQueryBuilder("/DssSignResult");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("taskId", taskId);
            return(PerformHttpRequestAsync <DssSignResult>(authToken, "GET", queryString.BuildPathAndQuery()));
        }
Beispiel #8
0
        public Task <Department> GetDepartmentByFullIdAsync(string authToken, string boxId, string departmentId)
        {
            var queryString = new PathAndQueryBuilder("/admin/GetDepartment");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("departmentId", departmentId);
            return(PerformHttpRequestAsync <Department>(authToken, "GET", queryString.BuildPathAndQuery()));
        }
		private Task MessageOrDocumentCommandAsync(string action, [NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId, [CanBeNull] string documentId)
		{
			var qsb = new PathAndQueryBuilder(action);
			qsb.AddParameter("boxId", boxId);
			qsb.AddParameter("messageId", messageId);
			if (!string.IsNullOrEmpty(documentId)) qsb.AddParameter("documentId", documentId);
			return PerformHttpRequestAsync(authToken, "POST", qsb.BuildPathAndQuery());
		}
        public Task <Counteragent> GetCounteragentAsync(string authToken, string myOrgId, string counteragentOrgId)
        {
            var qsb = new PathAndQueryBuilder("V2/GetCounteragent");

            qsb.AddParameter("myOrgId", myOrgId);
            qsb.AddParameter("counteragentOrgId", counteragentOrgId);
            return(PerformHttpRequestAsync <Counteragent>(authToken, "GET", qsb.BuildPathAndQuery()));
        }
Beispiel #11
0
        public Task <BoxEvent> GetEventAsync(string authToken, string boxId, string eventId)
        {
            var qsb = new PathAndQueryBuilder("/V2/GetEvent");

            qsb.AddParameter("eventId", eventId);
            qsb.AddParameter("boxId", boxId);
            return(PerformHttpRequestAsync <BoxEvent>(authToken, "GET", qsb.BuildPathAndQuery()));
        }
		public Task<SignatureInfo> GetSignatureInfoAsync(string authToken, string boxId, string messageId, string entityId)
		{
			var qsb = new PathAndQueryBuilder("/GetSignatureInfo");
			qsb.AddParameter("boxId", boxId);
			qsb.AddParameter("messageId", messageId);
			qsb.AddParameter("entityId", entityId);
			return PerformHttpRequestAsync<SignatureInfo>(authToken, "GET", qsb.BuildPathAndQuery());
		}
Beispiel #13
0
        public void DeleteDepartment(string authToken, string boxId, string departmentId)
        {
            var queryString = new PathAndQueryBuilder("/admin/DeleteDepartment");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("departmentId", departmentId);
            PerformHttpRequest(authToken, "Post", queryString.BuildPathAndQuery());
        }
Beispiel #14
0
        public CertificateList GetMyCertificates(string authToken, string boxId)
        {
            var queryBuilder = new PathAndQueryBuilder("/GetMyCertificates");

            queryBuilder.AddParameter("boxId", boxId);

            return(PerformHttpRequest <CertificateList>(authToken, "GET", queryBuilder.BuildPathAndQuery()));
        }
Beispiel #15
0
        public Department UpdateDepartment(string authToken, string boxId, string departmentId, DepartmentToUpdate departmentToUpdate)
        {
            var queryString = new PathAndQueryBuilder("/admin/UpdateDepartment");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("departmentId", departmentId);
            return(PerformHttpRequest <DepartmentToUpdate, Department>(authToken, queryString.BuildPathAndQuery(), departmentToUpdate));
        }
Beispiel #16
0
        public DocumentList GetDocumentsByCustomId([NotNull] string authToken, [NotNull] string boxId, [NotNull] string customDocumentId)
        {
            var qsb = new PathAndQueryBuilder("/GetDocumentsByCustomId");

            qsb.AddParameter("boxId", boxId);
            qsb.AddParameter("customDocumentId", customDocumentId);
            return(PerformHttpRequest <DocumentList>(authToken, "GET", qsb.BuildPathAndQuery()));
        }
Beispiel #17
0
        public Task <DetectDocumentTypesResponse> DetectDocumentTypesAsync(string authToken, string boxId, string nameOnShelf)
        {
            var qsb = new PathAndQueryBuilder("/DetectDocumentTypes");

            qsb.AddParameter("boxId", boxId);
            qsb.AddParameter("nameOnShelf", nameOnShelf);
            return(PerformHttpRequestAsync <DetectDocumentTypesResponse>(authToken, "GET", qsb.BuildPathAndQuery()));
        }
Beispiel #18
0
        public Department GetDepartment(string authToken, string orgId, string departmentId)
        {
            var queryBuilder = new PathAndQueryBuilder("/GetDepartment");

            queryBuilder.AddParameter("orgId", orgId);
            queryBuilder.AddParameter("departmentId", departmentId);
            return(PerformHttpRequest <Department>(authToken, "GET", queryBuilder.BuildPathAndQuery()));
        }
		public Task<Document> GetDocumentAsync([NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId, [NotNull] string entityId)
		{
			var qsb = new PathAndQueryBuilder("/V3/GetDocument");
			qsb.AddParameter("boxId", boxId);
			qsb.AddParameter("messageId", messageId);
			qsb.AddParameter("entityId", entityId);
			return PerformHttpRequestAsync<Document>(authToken, "GET", qsb.BuildPathAndQuery());
		}
Beispiel #20
0
        public Task <Message> TransformTemplateToMessageAsync(string authToken, TemplateTransformationToPost templateTransformation, string operationId = null)
        {
            var qsb = new PathAndQueryBuilder("/TransformTemplateToMessage");

            qsb.AddParameter("operationId", operationId);

            return(PerformHttpRequestAsync <TemplateTransformationToPost, Message>(authToken, qsb.BuildPathAndQuery(), templateTransformation));
        }
Beispiel #21
0
        public DocumentList GetDocumentsByMessageId(string authToken, string boxId, string messageId)
        {
            var qsb = new PathAndQueryBuilder("/GetDocumentsByMessageId");

            qsb.AddParameter("boxId", boxId);
            qsb.AddParameter("messageId", messageId);
            return(PerformHttpRequest <DocumentList>(authToken, "GET", qsb.BuildPathAndQuery()));
        }
Beispiel #22
0
        public DepartmentList GetDepartments(string authToken, string boxId, int?page = null, int?count = null)
        {
            var queryString = new PathAndQueryBuilder("/admin/GetDepartments");

            queryString.AddParameter("boxId", boxId);
            queryString.AddParameter("page", page.ToString());
            queryString.AddParameter("count", count.ToString());
            return(PerformHttpRequest <DepartmentList>(authToken, "GET", queryString.BuildPathAndQuery()));
        }
        public Task <ExtendedSignerDetails> PostExtendedSignerDetailsAsync(string token, string boxId, string thumbprint, DocumentTitleType documentTitleType, ExtendedSignerDetailsToPost signerDetails)
        {
            var queryBuilder = new PathAndQueryBuilder("/V2/ExtendedSignerDetails");

            queryBuilder.AddParameter("boxId", boxId);
            queryBuilder.AddParameter("thumbprint", thumbprint);
            queryBuilder.AddParameter("documentTitleType", ((int)documentTitleType).ToString());
            return(PerformHttpRequestAsync <ExtendedSignerDetails>(token, "POST", queryBuilder.ToString(), Serialize(signerDetails)));
        }
        public Task <GeneratedFile> GenerateTorg12XmlForBuyerAsync(string authToken, Torg12BuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId)
        {
            var queryBuilder = new PathAndQueryBuilder("/GenerateTorg12XmlForBuyer");

            queryBuilder.AddParameter("boxId", boxId);
            queryBuilder.AddParameter("sellerTitleMessageId", sellerTitleMessageId);
            queryBuilder.AddParameter("sellerTitleAttachmentId", sellerTitleAttachmentId);
            return(PerformGenerateXmlHttpRequestAsync(authToken, queryBuilder.BuildPathAndQuery(), buyerInfo));
        }
Beispiel #25
0
        public Task <PrintFormResult> GenerateForwardedDocumentPrintFormAsync([NotNull] string authToken, [NotNull] string boxId, [NotNull] ForwardedDocumentId forwardedDocumentId)
        {
            var queryString = new PathAndQueryBuilder("/GenerateForwardedDocumentPrintForm")
                              .WithBoxId(boxId)
                              .WithForwardedDocumentId(forwardedDocumentId)
                              .BuildPathAndQuery();

            return(GetPrintFormResultAsync(authToken, queryString));
        }
Beispiel #26
0
        public ExtendedSignerDetails GetExtendedSignerDetails(string token, string boxId, string thumbprint, DocumentTitleType documentTitleType)
        {
            var queryBuilder = new PathAndQueryBuilder("/V2/ExtendedSignerDetails");

            queryBuilder.AddParameter("boxId", boxId);
            queryBuilder.AddParameter("thumbprint", thumbprint);
            queryBuilder.AddParameter("documentTitleType", ((int)documentTitleType).ToString());
            return(PerformHttpRequest <ExtendedSignerDetails>(token, "GET", queryBuilder.ToString()));
        }
Beispiel #27
0
        public Task <byte[]> GetEntityContentAsync(string authToken, string boxId, string messageId, string entityId)
        {
            var qsb = new PathAndQueryBuilder("/V4/GetEntityContent");

            qsb.AddParameter("boxId", boxId);
            qsb.AddParameter("messageId", messageId);
            qsb.AddParameter("entityId", entityId);
            return(PerformHttpRequestAsync(authToken, "GET", qsb.BuildPathAndQuery()));
        }
Beispiel #28
0
        public async Task <string> AuthenticateBySidAsync(string sid)
        {
            var qsb = new PathAndQueryBuilder("/V2/Authenticate");

            qsb.AddParameter("sid", sid);
            var httpResponse = await PerformHttpRequestAsync(null, "POST", qsb.BuildPathAndQuery()).ConfigureAwait(false);

            return(Encoding.UTF8.GetString(httpResponse));
        }
        public string AuthenticateWithKeyConfirm(byte[] certificateBytes, string token, bool saveBinding = false)
        {
            var confirmQsb = new PathAndQueryBuilder("/V2/AuthenticateConfirm");

            confirmQsb.AddParameter("token", token);
            confirmQsb.AddParameter("saveBinding", saveBinding.ToString());
            return(PerformHttpRequest(null, "POST", confirmQsb.BuildPathAndQuery(), certificateBytes,
                                      responseContent => Encoding.UTF8.GetString(responseContent)));
        }
        public string AuthenticateBySid(string sid)
        {
            var qsb = new PathAndQueryBuilder("/V2/Authenticate");

            qsb.AddParameter("sid", sid);
            var httpResponse = PerformHttpRequest(null, "POST", qsb.BuildPathAndQuery());

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