{"id":18766328,"url":"https://github.com/navarr/m2-module-regionlookup","last_synced_at":"2025-12-08T23:30:17.752Z","repository":{"id":57024131,"uuid":"93525738","full_name":"navarr/m2-module-regionlookup","owner":"navarr","description":"RegionInformationAcquirer Service Contract","archived":false,"fork":false,"pushed_at":"2017-06-06T15:52:29.000Z","size":3,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T06:22:21.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/navarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-06T14:09:36.000Z","updated_at":"2017-06-06T14:23:23.000Z","dependencies_parsed_at":"2022-08-23T13:50:53.206Z","dependency_job_id":null,"html_url":"https://github.com/navarr/m2-module-regionlookup","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2Fm2-module-regionlookup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2Fm2-module-regionlookup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2Fm2-module-regionlookup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2Fm2-module-regionlookup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navarr","download_url":"https://codeload.github.com/navarr/m2-module-regionlookup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239669106,"owners_count":19677674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:40:18.642Z","updated_at":"2025-12-08T23:30:17.697Z","avatar_url":"https://github.com/navarr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RegionInformationAcquirer Service Contract\n\n## Installation\n\nThis module is really only for developers.  You can duplicate it in `app/code` if for some reason you can't use composer (how would that happen??) or you can just \n\n    composer require navarr/m2-module-regionlookup\n    \nSo far this works with all Magento versions, and the composer version constraints are setup so that it won't install if the modules it uses have a breaking change.\n\n## Usage\n\nThere are three methods for use, however only two are currently implemented:\n\n* `getRegionInfoByCode(string $countryId, string $regionCode) : \\Magento\\Directory\\Api\\Data\\RegionInformationInterface, throws NoSuchEntityException`\n* `getRegionInfoByName(string $countryId, string $regionName) : \\Magento\\Directory\\Api\\Data\\RegionInformationInterface, throws NoSuchEntityException`\n\n`NoSuchEntityException` is thrown when:\n\n* Country ID could not be found\n* Region Name/Code could not be found\n\nA `LocalizedException` is thrown if you dare to use `getRegionInfoById(int $regionId)`\n\n## Example\n\n    public function __construct(RegionInformationAcquirerInterface $regionAcquirer)\n    {\n        $state = $regionAcquirer-\u003egetRegionInfoByCode('US', 'OH');\n        $state-\u003egetId(); // some number\n        $state-\u003egetName(); // Ohio\n        $state-\u003egetCode(); // OH\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavarr%2Fm2-module-regionlookup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavarr%2Fm2-module-regionlookup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavarr%2Fm2-module-regionlookup/lists"}