andrzejl/wl-api-client

1.1 2020-01-27 10:00 UTC

This package is auto-updated.

Last update: 2020-09-27 12:08:04 UTC


README

WlApiClient library for WL API (API Wykazu podatników VAT)

Requirements

WlApiClient depends on HTTPlug and requires virtual package php-http/client-implementation. Please check http://docs.php-http.org/en/latest/httplug/users.html before installation.

Installation

composer require andrzejl/wl-api-client

or with all requirements

composer require php-http/guzzle6-adapter nyholm/psr7 andrzejl/wl-api-client

Usage

require 'vendor/autoload.php';

use Andrzejl\WlApi\Client;

$client = new Client;
$result = $client->searchBankAccounts(['70506405335016096312945164']);

Limits

WL API is limited. Search methods may be used 10 times with maximum of 30 elements in query per day. Queries above limit throws LimitExceeded exception.

Search query is splitted when more than 30 elements is passed.

Check methods also have limit to 10 request per day and the limit is shared with search methods.

Testing

composer test

PHP 5.6 compatibility

Use WlApiClient v0.3 in legacy PHP 5.6 project:

composer require --ignore-platform-reqs php-http/guzzle6-adapter ^1.0 php-http/httplug ^1.0 php-http/message ^1.0 andrzejl/wl-api-client ^0.3