Add "ZoneHold" extensions
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals
|
||||
{
|
||||
internal class InternalCreateZoneHoldFilter : IQueryParameterFilter
|
||||
{
|
||||
public bool? IncludeSubdomains { get; set; }
|
||||
|
||||
public IDictionary<string, string> GetQueryParameters()
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
if (IncludeSubdomains.HasValue)
|
||||
dict.Add("include_subdomains", IncludeSubdomains.Value ? "true" : "false");
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals
|
||||
{
|
||||
internal class InternalRemoveZoneHoldFilter : IQueryParameterFilter
|
||||
{
|
||||
public DateTime? HoldAfter { get; set; }
|
||||
|
||||
public IDictionary<string, string> GetQueryParameters()
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
if (HoldAfter.HasValue)
|
||||
dict.Add("hold_after", HoldAfter.Value.ToUniversalTime().ToString("yyyy-MM-dd'T'HH:mm:ss'Z'"));
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals
|
||||
{
|
||||
internal class InternalUpdateZoneHoldRequest
|
||||
{
|
||||
[JsonProperty("hold_after")]
|
||||
public DateTime? HoldAfter { get; set; }
|
||||
|
||||
[JsonProperty("include_subdomains")]
|
||||
public bool? IncludeSubdomains { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user