Summary
We encountered an InvalidArgumentException while utilizing your SDK to verify an international address:
Failed to send a postcard using Lob: “Invalid value 'Housenumber/Building' for 'coverage', must be one of 'SUBBUILDING', 'HOUSENUMBER/BUILDING', 'STREET', 'LOCALITY', 'SPARSE'”.
Expected Behavior
In this case, the exception should not be thrown since the response from the Lob service is Housenumber/Building, whereas the SDK expects it to be in uppercase as HOUSENUMBER/BUILDING. It's worth noting that PHP's in_array method is case-sensitive.

Current Behavior
The SDK is throwing an exception, as mentioned before, when attempting to verify an international address.
Possible Solution
To address the issue, there are two potential solutions:
- Modify the response from the Lob service to send the
coverage in uppercase to match the SDK's expectations.
- Alternatively, you can modify the SDK code by adding
strtoupper($coverage) as the first parameter of the in_array method.
Steps to Reproduce
Using a simple code like this, leads to same error:
$verificationApi = new IntlVerificationsApi($this->config);
$verificationWritable = new IntlVerificationWritable([
'recipient' => $recipientFullname,
'primary_line' => $address->addressLine1,
'secondary_line' => $address->addressLine2,
'city' => $address->city,
'state' => $address->state,
'postal_code' => $address->postalCode,
'country' => $address->country->code,
]);
$verification = $verificationApi->verifySingle($verificationWritable);
Context (Environment)
Version: 4.2.0
Summary
We encountered an
InvalidArgumentExceptionwhile utilizing your SDK to verify an international address:Expected Behavior
In this case, the exception should not be thrown since the response from the Lob service is
Housenumber/Building, whereas the SDK expects it to be in uppercase asHOUSENUMBER/BUILDING. It's worth noting that PHP'sin_arraymethod is case-sensitive.Current Behavior
The SDK is throwing an exception, as mentioned before, when attempting to verify an international address.
Possible Solution
To address the issue, there are two potential solutions:
coveragein uppercase to match the SDK's expectations.strtoupper($coverage)as the first parameter of thein_arraymethod.Steps to Reproduce
Using a simple code like this, leads to same error:
Context (Environment)
Version: 4.2.0