public void UpdateCustomFields(string customFieldKey, List <string> options, bool keepExistingOptions) { HttpHelper.Put(string.Format("/lists/{0}/customfields/{1}/options.json", _listID, customFieldKey), null, JavaScriptConvert.SerializeObject( new { KeepExistingOptions = keepExistingOptions, Options = options }) ); }
public void Update(string title, string unsubscribePage, bool confirmedOptIn, string confirmationSuccessPage) { HttpHelper.Put(string.Format("/lists/{0}.json", _listID), null, JavaScriptConvert.SerializeObject( new ListDetail() { Title = title, UnsubscribePage = unsubscribePage, ConfirmedOptIn = confirmedOptIn, ConfirmationSuccessPage = confirmationSuccessPage }) ); }
public void SetAccess(string userName, string password, int accessLevel) { HttpHelper.Put(string.Format("/clients/{0}/setaccess.json", _clientID), null, JavaScriptConvert.SerializeObject( new ClientAccessSettings() { Username = userName, Password = password, AccessLevel = accessLevel }) ); }
public void SetBasics(string companyName, string contactName, string emailAddress, string country, string timezone) { HttpHelper.Put(string.Format("/clients/{0}/setbasics.json", _clientID), null, JavaScriptConvert.SerializeObject( new ClientDetail() { CompanyName = companyName, ContactName = contactName, EmailAddress = emailAddress, Country = country, TimeZone = timezone }) ); }
public void SetMonthlyBilling(string currency, bool clientPays, bool canPurchaseCredits, int markupPercentage) { HttpHelper.Put(string.Format("/clients/{0}/setmonthlybilling.json", _clientID), null, JavaScriptConvert.SerializeObject( new BillingOptions() { Currency = currency, ClientPays = clientPays, CanPurchaseCredits = canPurchaseCredits, MarkupPercentage = markupPercentage }) ); }
public void SetPAYGBilling(string currency, bool clientPays, bool canPurchaseCredits, int markupPercentage, decimal markupOnDelivery, decimal markupPerRecipient, decimal markupOnDesignSpamTest) { HttpHelper.Put(string.Format("/clients/{0}/setpaygbilling.json", _clientID), null, JavaScriptConvert.SerializeObject( new BillingOptions() { Currency = currency, ClientPays = clientPays, CanPurchaseCredits = canPurchaseCredits, MarkupPercentage = markupPercentage, MarkupOnDelivery = markupOnDelivery, MarkupPerRecipient = markupPerRecipient, MarkupOnDesignSpamTest = markupOnDesignSpamTest }) ); }
public void Update(string title, SegmentRules rules) { HttpHelper.Put(string.Format("/segments/{0}.json", _segmentID), null, JavaScriptConvert.SerializeObject( new Dictionary <string, object>() { { "Title", title }, { "Rules", rules } }) ); }
public void Update(string name, string htmlPageUrl, bool zipUrl, string screenshotUrl) { HttpHelper.Put(string.Format("/templates/{0}.json", _templateID), null, JavaScriptConvert.SerializeObject( new Dictionary <string, object>() { { "Name", name }, { "HtmlPageURL", htmlPageUrl }, { "ZipFileUrl", zipUrl }, { "ScreenshotUrl", screenshotUrl } }) ); }
public U HttpPut <T, U>(string path, NameValueCollection queryArguments, T payload) where T : class { return(HttpHelper.Put <T, U>(AuthDetails, path, queryArguments, payload, options.BaseUri, HttpHelper.APPLICATION_JSON_CONTENT_TYPE)); }
public void DeactivateWebhook(string webhookID) { HttpHelper.Put(string.Format("/lists/{0}/webhooks/{1}/deactivate.json", _listID, System.Web.HttpUtility.UrlEncode(webhookID)), null, ""); }