From e49bf825f245b5c071f4e6747e061d3998908db6 Mon Sep 17 00:00:00 2001 From: Frederik Date: Thu, 29 Jul 2021 13:41:04 +0200 Subject: [PATCH] Ensure CustomDomainVerification.Methods can be serialized Fix #508 --- .../Models/CustomDomainVerification.cs | 2 +- .../Models/CustomDomainVerificationMethod.cs | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/Auth0.ManagementApi/Models/CustomDomainVerificationMethod.cs diff --git a/src/Auth0.ManagementApi/Models/CustomDomainVerification.cs b/src/Auth0.ManagementApi/Models/CustomDomainVerification.cs index 32ba70de1..c0346c81e 100644 --- a/src/Auth0.ManagementApi/Models/CustomDomainVerification.cs +++ b/src/Auth0.ManagementApi/Models/CustomDomainVerification.cs @@ -11,6 +11,6 @@ public class CustomDomainVerification /// The custom domain verification methods. /// [JsonProperty("methods")] - public string[] Methods { get; set; } + public CustomDomainVerificationMethod[] Methods { get; set; } } } \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/CustomDomainVerificationMethod.cs b/src/Auth0.ManagementApi/Models/CustomDomainVerificationMethod.cs new file mode 100644 index 000000000..8ea305c1e --- /dev/null +++ b/src/Auth0.ManagementApi/Models/CustomDomainVerificationMethod.cs @@ -0,0 +1,28 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models +{ + /// + /// The custom domain verification method. + /// + public class CustomDomainVerificationMethod + { + /// + /// Domain verification method. ("cname" or "txt") + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// Value used to verify the domain. + /// + [JsonProperty("record")] + public string Record { get; set; } + + /// + /// The name of the txt record for verification. + /// + [JsonProperty("domain")] + public string Domain { get; set; } + } +} \ No newline at end of file