Giter Site home page Giter Site logo

Comments (1)

alies-dev avatar alies-dev commented on June 8, 2024

I can confirm: I have similar issues:

Invalid value 'Housenumber/Building' for 'coverage', must be one of 'SUBBUILDING', 'HOUSENUMBER/BUILDING', 'STREET', 'LOCALITY', 'SPARSE'

and

Invalid value 'Subbuilding' for 'coverage', must be one of 'SUBBUILDING', 'HOUSENUMBER/BUILDING', 'STREET', 'LOCALITY', 'SPARSE'

Exception message is confusing

Example of API response:

{
    "id": "intl_ver_bf83dde51d4d738acd4a",
    "recipient": "John Zorn",
    "primary_line": "THE UNIVERSITY OF MELBOURNE, THOMAS CHERRY BUILDING, LEVEL 1",
    "secondary_line": "",
    "last_line": "MELBOURNE VIC 3010",
    "country": "AU",
    "coverage": "Subbuilding",
    "deliverability": "deliverable_missing_info",
    "status": "2",
    "components": {
        "primary_number": "",
        "building": "",
        "street_name": "THE UNIVERSITY OF MELBOURNE, THOMAS CHERRY BUILDING, LEVEL 1",
        "locality": "",
        "city": "MELBOURNE",
        "state": "VIC",
        "postal_code": "3010"
    },
    "object": "intl_verification"
}

Please note to the "coverage": "Subbuilding" part - it has a wrong case (should be SUBBUILDING)

But \OpenAPI\Client\Model\IntlVerification::getCoverageAllowableValues returns uppercase options only:

image

And similar issue with \OpenAPI\Client\Model\IntlVerification::setStatus method: API uses numeric values (1, 2, 3, 4), but this method accepts only string values prefixed by LV:
image

I'll create a PR to solve both issues

UPD: Sorry, it's not possible to fix \OpenAPI\Client\Model\IntlVerification::setStatus on this library level: when this method accept a numeric string (e.g. 1), we don't how to properly prefix the string because there are few possible prefixes (LV, LF, LM, LU. see the screenshot above). So, the only solution is to fix server response or lose IntlVerification validation in setCoverage and setStatus methods

version: v4.2.3 (latest)

from lob-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.