using System; using System.Collections.Generic; using System.Web.Script.Serialization; namespace Retailcrm.Versions.V4 { public partial class Client { /// /// Edit marketplace module settings /// /// /// public Response MarketplaceSettingsEdit(Dictionary configuration) { if (configuration.Count < 1) { throw new ArgumentException("Parameter `configuration` must contain data"); } if (!configuration.ContainsKey("code")) { throw new ArgumentException("Parameter `configuration` should contain `code`"); } if (!configuration.ContainsKey("name")) { throw new ArgumentException("Parameter `configuration` should contain `name`"); } return Request.MakeRequest( $"/marketplace/external/setting/{configuration["code"].ToString()}/edit", Request.MethodPost, new Dictionary { { "configuration", new JavaScriptSerializer().Serialize(configuration) } } ); } } }