Exemplo n.º 1
0
        public void CustomFieldCanBeConverted()
        {
            IConverter <CustomField, Chronicy.Web.Models.CustomField> converter = new CustomFieldConverter();
            CustomField initial = new CustomField("A Field", FieldType.String)
            {
                Value = "Hello, world!"
            };

            Chronicy.Web.Models.CustomField webNotebook = converter.Convert(initial);
            CustomField convertedBack = converter.ReverseConvert(webNotebook);

            Assert.AreEqual(initial, convertedBack);
        }
Exemplo n.º 2
0
 ///
 /// Create an account custom field.
 /// If the custom field already existed then update it.
 ///
 /// @param customField
 /// @return the custom field added created or updated
 /// @throws com.silanis.esl.sdk.EslException
 ///
 public CustomField CreateCustomField(CustomField customField)
 {
     Silanis.ESL.API.CustomField apiCustomField = new CustomFieldConverter(customField).ToAPICustomField();
     apiCustomField = apiClient.CreateCustomField(apiCustomField);
     return(new CustomFieldConverter(apiCustomField).ToSDKCustomField());
 }
Exemplo n.º 3
0
		///
		/// Create an account custom field.
		/// If the custom field already existed then update it.
		///
		/// @param customField
		/// @return the custom field added created or updated
		/// @throws com.silanis.esl.sdk.EslException
		///
		public CustomField CreateCustomField(CustomField customField)
		{
            Silanis.ESL.API.CustomField apiCustomField = new CustomFieldConverter( customField ).ToAPICustomField();
            apiCustomField = apiClient.CreateCustomField( apiCustomField );
            return new CustomFieldConverter(apiCustomField).ToSDKCustomField();
		}
Exemplo n.º 4
0
 ///
 /// Create an account custom field.
 /// If the custom field already existed then update it.
 ///
 /// @param customField
 /// @return the custom field added created or updated
 /// @throws com.OneSpanSign.Sdk.OssException
 ///
 public CustomField CreateCustomField(CustomField customField)
 {
     OneSpanSign.API.CustomField apiCustomField = new CustomFieldConverter(customField).ToAPICustomField();
     apiCustomField = apiClient.CreateCustomField(apiCustomField);
     return(new CustomFieldConverter(apiCustomField).ToSDKCustomField());
 }