dhl sdk api unified location finder
3.2.0
El paquete DPDHL Unified Ubication Finder API SDK ofrece una interfaz a los siguientes servicios web:
netresearch/jsonmapper : Mapper para la deserialización de los mensajes de respuesta JSON en objetos PHPphp-http/discovery : Servicio de descubrimiento para implementaciones de fábrica de clientes y fábrica de mensajes HTTPphp-http/httplug : abstracción del cliente http enchufablephp-http/logger-plugin : HTTP Cliente Logger Plugin para httplugpsr/http-client : interfaces del cliente PSR-18 HTTPpsr/http-factory : PSR-7 HTTP Mensajes Interfacespsr/http-message : interfaces de mensajes HTTP PSR-7psr/log : interfaces PSR-3 Loggerpsr/http-client-implementation : cualquier paquete que proporcione un cliente HTTP compatible con PSR-18psr/http-factory-implementation : cualquier paquete que proporcione fábricas de mensajes HTTP compatibles con PSR-7psr/http-message-implementation : cualquier paquete que proporcione mensajes HTTP PSR-7nyholm/psr7 : PSR-7 HTTP Mensajes Factory e Implementación de mensajesphpunit/phpunit : marco de pruebaphp-http/mock-client : httplug simulando implementación del clientephpstan/phpstan : Herramienta de análisis estáticosquizlabs/php_codesniffer : herramienta de análisis estáticorector/rector : herramienta de refactorización automática para ayudar con las actualizaciones de PHPfig/log-test : Test Utilidades para psr/log $ composer require dhl/sdk-api-unified-location-finder$ composer remove dhl/sdk-api-unified-location-finder$ ./vendor/bin/phpunit -c test/phpunit.xmlEl DPDHL Unified Ubication Finder API SDK admite las siguientes características:
Los componentes de la biblioteca adecuados para el consumo comprenden
$ consumerKey = ' Your application consumer key ' ;
$ logger = new Psr Log NullLogger ();
$ serviceFactory = new Dhl Sdk UnifiedLocationFinder Service ServiceFactory ();
$ service = $ serviceFactory -> createLocationFinderService ( $ consumerKey , $ logger );
try {
/** @var DhlSdkUnifiedLocationFinderApiDataLocationInterface $locations */
$ locations = $ service -> getPickUpLocations (
$ countryCode = ' DE ' ,
$ postalCode = ' 04129 ' ,
$ city = ' Leipzig ' ,
$ street = ' Nonnenstraße 11d ' ,
$ service = ' parcel-eu ' ,
$ radius = 2000 ,
$ limit = 25
);
} catch ( Dhl Sdk UnifiedLocationFinder Exception ServiceException $ e ) {
// handle errors
} El SDK solo arrojará excepciones de tipo DhlSdkUnifiedLocationFinderExceptionServiceException . Se pueden usar subclases de ServiceException para describir el tipo de error que ocurrió.
A DhlSdkUnifiedLocationFinderExceptionDetailedServiceException indica que la excepción contiene un mensaje de error legible por humanos adecuado para visualizar al usuario final.