Example #1
0
 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 })
                    );
 }
Example #2
0
 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
     })
                    );
 }
Example #3
0
 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
     })
                    );
 }
Example #4
0
 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
     })
                    );
 }
Example #5
0
 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
     })
                    );
 }
Example #6
0
 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
     })
                    );
 }
Example #7
0
 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 }
     })
                    );
 }
Example #8
0
 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));
 }
Example #10
0
 public void DeactivateWebhook(string webhookID)
 {
     HttpHelper.Put(string.Format("/lists/{0}/webhooks/{1}/deactivate.json", _listID, System.Web.HttpUtility.UrlEncode(webhookID)), null, "");
 }