kevinfrom / cvr-api
CakePHP 的 CvrApi 插件
1.0.2
2020-05-11 08:55 UTC
Requires (Dev)
- phpunit/phpunit: ^5.7.14|^6.0
This package is auto-updated.
Last update: 2024-09-11 18:26:10 UTC
README
安装
通过 composer 安装
composer require kevinfrom/cvr-api
PHP 示例
初始化 api
use \kevinfrom\CvrApi\CvrApi;
$cvrApi = new CvrApi();
国家
默认情况下,API 搜索丹麦,但您可以根据需要更改此设置
$cvrApi = new CvrApi('de');
SSL/HTTPS
默认情况下,API 请求启用 SSL/HTTPS,但您可以根据需要禁用此功能
$cvrApi = new CvrApi('dk', true);
查询搜索
使用查询搜索
$result = $cvrApi->search('Kevin From');
按名称搜索
按名称搜索
$result = $cvrApi->searchByName('Kevin From');
按增值税识别号(VAT)搜索
按增值税识别号(VAT)(整数)搜索
$result = $cvrApi->searchByVat(39090325);
或字符串
$result = $cvrApi->searchByVat('39090325');
按 CVR 搜索
这是“按 VAT 搜索”的别名。
按 CVR 搜索(整数)
$result = $cvrApi->searchByCvr(39090325);
或字符串
$result = $cvrApi->searchByCvr('39090325');
按生产单元搜索
按生产单元搜索
$result = $cvrApi->searchByProductionUnit(1025204855);
按电话搜索
按电话搜索
$result = $cvrApi->searchByPhone(51927117);