dvsoftsrl / pianeta-fibra-coverage
Client PHP per API di copertura PianetaFibra
Fund package maintenance!
DV Soft srl
Requires
- php: ^8.3
- illuminate/cache: ^11.0||^12.0
- illuminate/contracts: ^11.0||^12.0
- illuminate/http: ^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require dvsoftsrl/pianeta-fibra-coverage
You can publish the config file with:
php artisan vendor:publish --tag="pianeta-fibra-coverage-config"
This is the contents of the published config file:
return [ // Token API (header 'authorization: Bearer <TOKEN>') 'token' => env('PIANETAFIBRA_TOKEN', ''), // Endpoint base API 'base_uri' => env('PIANETAFIBRA_BASE_URI', 'https://api.pianetafibra.it/v2/api.php'), // HTTP client 'timeout' => env('PIANETAFIBRA_TIMEOUT', 10), 'max_retries' => env('PIANETAFIBRA_MAX_RETRIES', 2), // Caching 'use_cache' => env('PIANETAFIBRA_USE_CACHE', true), // Se valorizzato, usa questo store di cache (es. 'redis', 'file'); altrimenti usa quello di default se use_cache=true 'cache_store' => env('PIANETAFIBRA_CACHE_STORE', null), // TTL per anagrafiche city/street/civic (secondi) 'cache_ttl_seconds' => env('PIANETAFIBRA_CACHE_TTL', 43200), // Comportamento di default per la funzione totale (puoi sempre override col parametro) // true => match esatto o eccezione; false => ritorna ResolveOutcome::ambiguous(...) con alternative 'default_match_or_fail' => env('PIANETAFIBRA_MATCH_OR_FAIL', true), ];
Usage
PianetaFibraCoverage::resolveCoverageFromLocation($location, CustomerType::Azienda);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.