PostmarkDotNet.PostmarkAdminClient.EditServerAsync C# (CSharp) Method

EditServerAsync() public method

Update a Server.
public EditServerAsync ( int serverId, String name = null, string color = null, bool rawEmailEnabled = null, bool smtpApiActivated = null, string inboundHookUrl = null, string bounceHookUrl = null, string openHookUrl = null, bool postFirstOpenOnly = null, bool trackOpens = null, string inboundDomain = null, int inboundSpamThreshold = null ) : Task
serverId int
name String
color string
rawEmailEnabled bool
smtpApiActivated bool
inboundHookUrl string
bounceHookUrl string
openHookUrl string
postFirstOpenOnly bool
trackOpens bool
inboundDomain string
inboundSpamThreshold int
return Task
        public async Task<PostmarkServer> EditServerAsync(int serverId, String name = null, string color = null,
            bool? rawEmailEnabled = null, bool? smtpApiActivated = null, string inboundHookUrl = null,
            string bounceHookUrl = null, string openHookUrl = null, bool? postFirstOpenOnly = null,
            bool? trackOpens = null, string inboundDomain = null, int? inboundSpamThreshold = null)
        {

            var body = new Dictionary<string, object>();
            body["Name"] = name;
            body["Color"] = color;
            body["RawEmailEnabled"] = rawEmailEnabled;
            body["SmtpApiActivated"] = smtpApiActivated;
            body["InboundHookUrl"] = inboundHookUrl;
            body["BounceHookUrl"] = bounceHookUrl;
            body["OpenHookUrl"] = openHookUrl;
            body["PostFirstOpenOnly"] = postFirstOpenOnly;
            body["TrackOpens"] = trackOpens;
            body["InboundDomain"] = inboundDomain;
            body["InboundSpamThreshold"] = inboundSpamThreshold;

            return await this.ProcessRequestAsync<Dictionary<string, object>, PostmarkServer>
                ("/servers/" + serverId, HttpMethod.Put, body);
        }