synergitech / creditsafe-connect
Installs: 18 383
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 10
Forks: 14
Open Issues: 5
Requires
- php: >=7.1
- guzzlehttp/guzzle: ^6.3 || ^7.0
- lcobucci/jwt: ^3.2.5
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.2
- phpstan/phpstan: ^0.12.65 || ^1.0.0
- phpunit/phpunit: ^7.5 || ^8.0
- squizlabs/php_codesniffer: ^3.5
README
composer require synergitech/creditsafe-connect
Usage
Setting up Client
$config = [ 'username' => 'username', 'password' => 'password' ]; $creditsafe = new \SynergiTech\Creditsafe\Client($config);
Access countries and their codes
$creditsafe->countries()->access();
Search criteria using country code
$creditsafe->companies()->searchCriteria(['countries' => 'GB']);
Company search pagination
$search = $creditsafe->companies()->search(['countries' => 'GB', 'name' => 'GOOGLE UK LIMITED']); $search->setPageSize(100); foreach ($search as $result) { $company = $result->get(); }
Get Custom report data options
$creditsafe->()->reportCustomData()->get('DE');
Get company report
$creditsafe->companies()->get('GB001-0-03977902');
Change report language
$creditsafe->companies()->get('GB001-0-03977902', 'FR');
Adding reason code as extra parameter needed for German reports
$creditsafe->companies()->get('GB001-0-03977902', 'DE', ['customData' => 'de_reason_code::1']);
Running tests
vendor/bin/phpunit tests