public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Replace("{documentId}", documentId)
                          .Replace("{approvalId}", signatureId.Id)
                          .Replace("{fieldId}", fieldId)
                          .Build();

            try {
                restClient.Delete(path);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not delete field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not delete field from signature.\t" + " Exception: " + e.Message, e);
            }
        }
        public void ModifyField(PackageId packageId, string documentId, SignatureId signatureId, Silanis.ESL.API.Field field)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Replace("{documentId}", documentId)
                          .Replace("{approvalId}", signatureId.Id)
                          .Replace("{fieldId}", field.Id)
                          .Build();

            try {
                string json = JsonConvert.SerializeObject(field, jsonSettings);
                restClient.Put(path, json);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not modify field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not modify field from signature.\t" + " Exception: " + e.Message, e);
            }
        }
        public string AddField(PackageId packageId, string documentId, SignatureId signatureId, Silanis.ESL.API.Field field)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Replace("{documentId}", documentId)
                          .Replace("{approvalId}", signatureId.Id)
                          .Build();

            try {
                string json     = JsonConvert.SerializeObject(field, jsonSettings);
                string response = restClient.Post(path, json);
                Silanis.ESL.API.Field apiField = JsonConvert.DeserializeObject <Silanis.ESL.API.Field> (response, jsonSettings);
                return(apiField.Id);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not add field to signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not add field to signature.\t" + " Exception: " + e.Message, e);
            }
        }
Exemplo n.º 4
0
 public Field GetField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     Silanis.ESL.API.Field apiField = apiClient.GetField(packageId, documentId, signatureId, fieldId);
     return(new FieldConverter(apiField).ToSDKField());
 }
Exemplo n.º 5
0
 public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     apiClient.DeleteField(packageId, documentId, signatureId, fieldId);
 }
Exemplo n.º 6
0
 public string AddField(PackageId packageId, string documentId, SignatureId signatureId, Field sdkField)
 {
     Silanis.ESL.API.Field apiField = new FieldConverter(sdkField).ToAPIField();
     return(apiClient.AddField(packageId, documentId, signatureId, apiField));
 }
Exemplo n.º 7
0
 public void ModifyConditionalField(PackageId packageId, string documentId, SignatureId signatureId, ConditionalField sdkField)
 {
     Silanis.ESL.API.ConditionalField apiField = new ConditionalFieldConverter(sdkField).ToAPIConditionalField();
     apiClient.ModifyConditionalField(packageId, documentId, signatureId, apiField);
 }
Exemplo n.º 8
0
 public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     apiClient.DeleteField(packageId, documentId, signatureId, fieldId);
 }
Exemplo n.º 9
0
 public string AddField(PackageId packageId, string documentId, SignatureId signatureId, Field sdkField)
 {
     Silanis.ESL.API.Field apiField = new FieldConverter(sdkField).ToAPIField();
     return apiClient.AddField(packageId, documentId, signatureId, apiField);
 }
Exemplo n.º 10
0
 public Field GetField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     Silanis.ESL.API.Field apiField = apiClient.GetField(packageId, documentId, signatureId, fieldId);
     return new FieldConverter(apiField).ToSDKField();
 }
Exemplo n.º 11
0
 public void ModifyField(PackageId packageId, string documentId, SignatureId signatureId, Field sdkField)
 {
     Silanis.ESL.API.Field apiField = new FieldConverter(sdkField).ToAPIField();
     apiClient.ModifyField(packageId, documentId, signatureId, apiField);
 }
Exemplo n.º 12
0
        public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                .Replace("{packageId}", packageId.Id)
                    .Replace("{documentId}", documentId)
                    .Replace("{approvalId}", signatureId.Id)
                    .Replace("{fieldId}", fieldId)
                    .Build();

            try {
                restClient.Delete(path);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not delete field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not delete field from signature.\t" + " Exception: " + e.Message, e);
            }
        }
Exemplo n.º 13
0
        public Silanis.ESL.API.Field GetField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                .Replace("{packageId}", packageId.Id)
                    .Replace("{documentId}", documentId)
                    .Replace("{approvalId}", signatureId.Id)
                    .Replace("{fieldId}", fieldId)
                    .Build();

            try {
                string response = restClient.Get(path);
                Silanis.ESL.API.Field apiField = JsonConvert.DeserializeObject<Silanis.ESL.API.Field> (response, jsonSettings);
                return apiField;
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not get field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not get field from signature.\t" + " Exception: " + e.Message, e);
            }

        }
Exemplo n.º 14
0
        public void ModifyField(PackageId packageId, string documentId, SignatureId signatureId, Silanis.ESL.API.Field field)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                .Replace("{packageId}", packageId.Id)
                    .Replace("{documentId}", documentId)
                    .Replace("{approvalId}", signatureId.Id)
                    .Replace("{fieldId}", field.Id)
                    .Build();

            try {
                string json = JsonConvert.SerializeObject (field, jsonSettings);
                restClient.Put(path, json);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not modify field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not modify field from signature.\t" + " Exception: " + e.Message, e);
            }
        }