You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valid_address attribute on the verification response is pointing to an enum that returns string values as "true" or "false". But the lob api actually returns this field as a boolean. This is not causing any bug in the response but when this enum is being used to compare against the returned value, the types don't match.
Expected Behavior
valid_address enum should be returning boolean values for both the True and False enums.
Current Behavior
valid_address attribute is defined as an enum that returns string values.
No direct bug in the response but pointing to the api docs that show valid_address as a boolean.
Context (Environment)
We are utilizing the enum UsVerificationValidAddressEnum in our code to compare against the value returned from the response and the types dont match. This is not a blocker for us because we can replace the enum check with a boolean, but it would be nice to use the enum if possible.
The text was updated successfully, but these errors were encountered:
doing this for now (my function returns a boolean):
// valid_address is typed as UsVerificationValidAddressEnum/string, but we know it's a boolean, this is// a temporary solution until the issue is fixed// github issue: https://github.com/lob/lob-typescript-sdk/issues/269,if(typeofsingleVerified.valid_address==='boolean'){returnsingleVerified.valid_addressasunknownasboolean}// This is the correct way to check if the address is valid, adding this in case the issue is fixedreturnsingleVerified.valid_address===UsVerificationValidAddressEnum.True}```
Summary
valid_address
attribute on the verification response is pointing to an enum that returns string values as"true"
or"false"
. But the lob api actually returns this field as a boolean. This is not causing any bug in the response but when this enum is being used to compare against the returned value, the types don't match.Expected Behavior
valid_address enum
should be returning boolean values for both theTrue
andFalse
enums.Current Behavior
valid_address
attribute is defined as an enum that returns string values.Possible Solution
Update the following enum to return
true
andfalse
instead of string values - https://github.com/lob/lob-typescript-sdk/blob/main/models/us-verification.ts#L186Steps to Reproduce
No direct bug in the response but pointing to the api docs that show
valid_address
as a boolean.Context (Environment)
We are utilizing the enum
UsVerificationValidAddressEnum
in our code to compare against the value returned from the response and the types dont match. This is not a blocker for us because we can replace the enum check with a boolean, but it would be nice to use the enum if possible.The text was updated successfully, but these errors were encountered: