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); }
/// /// 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()); }
/// /// 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(); }
/// /// 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()); }