File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -149,16 +149,23 @@ pub enum PreludeBlockedReason {
149149 InBlockList ,
150150 /// The phone number is not a valid line number (e.g. landline).
151151 InvalidPhoneLine ,
152+ /// The phone number is not a valid phone number (e.g. unallocated range).
153+ InvalidPhoneNumber ,
152154 /// The signature of the SDK signals is invalid.
153155 InvalidSignature ,
154156 /// The phone number has made too many verification attempts.
155157 RepeatedAttempts ,
156158 /// The verification attempt was deemed suspicious by the anti-fraud system.
157159 Suspicious ,
158- /// Prelude API returned Blocked status without a reason.
160+ /// Prelude API returned a blocked reason we don't recognise.
161+ #[ serde( other) ]
159162 Unknown ,
160163}
161164
165+ fn default_blocked_reason ( ) -> PreludeBlockedReason {
166+ PreludeBlockedReason :: Unknown
167+ }
168+
162169#[ derive( Serialize , Deserialize , Debug ) ]
163170#[ serde( tag = "status" , rename_all = "lowercase" ) ]
164171pub enum PreludeCreateVerificationResponse {
@@ -170,6 +177,7 @@ pub enum PreludeCreateVerificationResponse {
170177 } ,
171178 Blocked {
172179 id : String ,
180+ #[ serde( default = "default_blocked_reason" ) ]
173181 reason : PreludeBlockedReason ,
174182 } ,
175183}
You can’t perform that action at this time.
0 commit comments