@@ -41,10 +41,40 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
4141 return FieldConverterResult . Failed ;
4242 }
4343
44+ // Only convert the Account.Status value
45+ if ( ! token . Key . Equals ( "status" , StringComparison . OrdinalIgnoreCase ) )
46+ {
47+ return FieldConverterResult . Failed ;
48+ }
49+
4450 return new FieldConverterResult ( true , SDK . Account . AccountStatus . Parse ( token . Value . ToString ( ) ) ) ;
4551 }
4652 }
4753
54+ internal sealed class AccountEmailVerificationStatusConverter : AbstractFieldConverter
55+ {
56+ public AccountEmailVerificationStatusConverter ( )
57+ : base ( nameof ( AccountEmailVerificationStatusConverter ) , typeof ( SDK . Account . IAccount ) )
58+ {
59+ }
60+
61+ protected override FieldConverterResult ConvertImpl ( KeyValuePair < string , object > token )
62+ {
63+ if ( ! IsStatusField ( token ) )
64+ {
65+ return FieldConverterResult . Failed ;
66+ }
67+
68+ // Only convert the Account.EmailVerificationStatus value
69+ if ( ! token . Key . Equals ( "emailVerificationStatus" , StringComparison . OrdinalIgnoreCase ) )
70+ {
71+ return FieldConverterResult . Failed ;
72+ }
73+
74+ return new FieldConverterResult ( true , SDK . Account . EmailVerificationStatus . Parse ( token . Value . ToString ( ) ) ) ;
75+ }
76+ }
77+
4878 internal sealed class ApplicationStatusConverter : AbstractFieldConverter
4979 {
5080 public ApplicationStatusConverter ( )
@@ -59,6 +89,12 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
5989 return FieldConverterResult . Failed ;
6090 }
6191
92+ // Only convert the Application.Status value
93+ if ( ! token . Key . Equals ( "status" , StringComparison . OrdinalIgnoreCase ) )
94+ {
95+ return FieldConverterResult . Failed ;
96+ }
97+
6298 return new FieldConverterResult ( true , SDK . Application . ApplicationStatus . Parse ( token . Value . ToString ( ) ) ) ;
6399 }
64100 }
@@ -77,6 +113,12 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
77113 return FieldConverterResult . Failed ;
78114 }
79115
116+ // Only convert the Directory.Status value
117+ if ( ! token . Key . Equals ( "status" , StringComparison . OrdinalIgnoreCase ) )
118+ {
119+ return FieldConverterResult . Failed ;
120+ }
121+
80122 return new FieldConverterResult ( true , SDK . Directory . DirectoryStatus . Parse ( token . Value . ToString ( ) ) ) ;
81123 }
82124 }
@@ -95,6 +137,12 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
95137 return FieldConverterResult . Failed ;
96138 }
97139
140+ // Only convert the Group.Status value
141+ if ( ! token . Key . Equals ( "status" , StringComparison . OrdinalIgnoreCase ) )
142+ {
143+ return FieldConverterResult . Failed ;
144+ }
145+
98146 return new FieldConverterResult ( true , SDK . Group . GroupStatus . Parse ( token . Value . ToString ( ) ) ) ;
99147 }
100148 }
@@ -113,6 +161,12 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
113161 return FieldConverterResult . Failed ;
114162 }
115163
164+ // Only convert the Organization.Status value
165+ if ( ! token . Key . Equals ( "status" , StringComparison . OrdinalIgnoreCase ) )
166+ {
167+ return FieldConverterResult . Failed ;
168+ }
169+
116170 return new FieldConverterResult ( true , SDK . Organization . OrganizationStatus . Parse ( token . Value . ToString ( ) ) ) ;
117171 }
118172 }
@@ -131,6 +185,12 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
131185 return FieldConverterResult . Failed ;
132186 }
133187
188+ // Only convert the ApiKey.Status value
189+ if ( ! token . Key . Equals ( "status" , StringComparison . OrdinalIgnoreCase ) )
190+ {
191+ return FieldConverterResult . Failed ;
192+ }
193+
134194 return new FieldConverterResult ( true , SDK . Api . ApiKeyStatus . Parse ( token . Value . ToString ( ) ) ) ;
135195 }
136196 }
@@ -149,6 +209,12 @@ protected override FieldConverterResult ConvertImpl(KeyValuePair<string, object>
149209 return FieldConverterResult . Failed ;
150210 }
151211
212+ // Only convert the Email.Status value
213+ if ( ! token . Key . EndsWith ( "EmailStatus" , StringComparison . OrdinalIgnoreCase ) )
214+ {
215+ return FieldConverterResult . Failed ;
216+ }
217+
152218 return new FieldConverterResult ( true , SDK . Mail . EmailStatus . Parse ( token . Value . ToString ( ) ) ) ;
153219 }
154220 }
0 commit comments