diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml new file mode 100644 index 0000000..a5dffa6 --- /dev/null +++ b/.github/workflows/php-cs-fixer.yaml @@ -0,0 +1,35 @@ +name: php-cs-fixer + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - { operating-system: 'ubuntu-latest', php-version: '8.1', dependencies: '--ignore-platform-req=php' } + + name: PHP ${{ matrix.php-version }} + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: pcov + tools: composer:v2 + + - name: Install dependencies + run: | + composer install --no-interaction --prefer-dist --no-progress ${{ matrix.dependencies }} + - name: Check code style + run: | + php vendor/bin/php-cs-fixer --using-cache=no --diff --dry-run --stop-on-violation --verbose fix \ No newline at end of file diff --git a/.github/workflows/phpunit.yaml b/.github/workflows/phpunit.yaml new file mode 100644 index 0000000..09bd967 --- /dev/null +++ b/.github/workflows/phpunit.yaml @@ -0,0 +1,36 @@ +name: PHPUnit + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - { operating-system: 'ubuntu-latest', php-version: '8.0', dependencies: '--ignore-platform-req=php' } + - { operating-system: 'ubuntu-latest', php-version: '8.1', dependencies: '--ignore-platform-req=php' } + + name: PHP ${{ matrix.php-version }} + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: pcov + tools: composer:v2 + + - name: Install dependencies + run: | + composer install --no-interaction --prefer-dist --no-progress ${{ matrix.dependencies }} + - name: Run tests + run: | + php vendor/bin/phpunit tests \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0cd1724..d65c30c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea vendor -.php_cs.cache \ No newline at end of file +.php-cs-fixer.cache \ No newline at end of file diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..4bbc007 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,19 @@ +setRiskyAllowed(false) + ->setRules([ + '@PSR2' => true, + '@Symfony' => true, + '@PhpCsFixer' => true, + '@DoctrineAnnotation' => true, + 'concat_space' => ['spacing' => 'one'], + + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__ . '/src') + ->in(__DIR__ . '/examples') + ->in(__DIR__ . '/generators') + ->in(__DIR__ . '/tests') + ); diff --git a/.php_cs.dist b/.php_cs.dist deleted file mode 100644 index 47774ef..0000000 --- a/.php_cs.dist +++ /dev/null @@ -1,35 +0,0 @@ -setRiskyAllowed(false) - ->setRules([ - '@PSR2' => true, - '@Symfony' => true, - '@PhpCsFixer' => true, - 'array_syntax' => ['syntax' => 'short'], - 'cast_spaces' => ['space' => 'none'], - 'concat_space' => ['spacing' => 'one'], - 'yoda_style' => null, - 'ordered_class_elements' => null, - 'ordered_imports' => null, - //'method_argument_space' => null, - //'no_whitespace_in_blank_line' => null, - //'no_extra_blank_lines' => null, - //'braces' => null, - 'blank_line_before_statement' => null, - 'phpdoc_align' => ['align' => 'left'], - 'phpdoc_var_without_name' => null, - 'phpdoc_types_order' => null, - 'phpdoc_order' => null, - 'phpdoc_separation' => null, - //'no_superfluous_elseif' => null, - 'class_definition' => null, - 'ternary_to_null_coalescing' => true, - 'php_unit_test_class_requires_covers' => false, - 'php_unit_internal_class' => false, - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->in(__DIR__ . '/src') - ) -; diff --git a/Makefile b/Makefile deleted file mode 100644 index 844e3f7..0000000 --- a/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -current_dir = $(shell pwd) - -make: - composer install - composer dump-autoload - -cs-fix: - ./vendor/bin/php-cs-fixer fix ./src --config .php_cs.dist - ./vendor/bin/php-cs-fixer fix ./examples --config .php_cs.dist \ No newline at end of file diff --git a/README.md b/README.md index a4a49b7..00b0bf9 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,32 @@ composer require easybill/php-sdk ## Usage ```php -use easybill\SDK\Client; -use easybill\SDK\Endpoint; +use Easybill\SDK\Client; +use Easybill\SDK\Endpoint; +use Easybill\SDK\Models\Customer; $client = new Client(new Endpoint('... your API key ...')); -$result = $client->request('GET', 'documents'); +$customerCreate = new Customer(); +$customerCreate->setFirstName('Foo'); +$customerCreate->setLastName('Bar'); +$customerCreate->setCompanyName('FooBar GmbH'); +$customerCreate->setEmails(['foo.bar@foobar.com']); -print_r($result); +$result = $client->request('POST', 'customers', $customerCreate->toArray()); + +$customer = new Customer($result); + +var_dump($customer) ``` ## More examples -Check the **examples** folder. +Check the [examples](examples) folder and run: + +```shell +API_KEY= php examples/customers_01_load-list.php +``` ## Documentation diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 0000000..a1748ea --- /dev/null +++ b/UPGRADE.md @@ -0,0 +1,8 @@ +easybill PHP SDK Upgrade Guide +============================== + +3.0 to 4.0 +---------- + +- Namespace from `easybill\` to `Easybill\` +- Requires min PHP 8.0 \ No newline at end of file diff --git a/composer.json b/composer.json index a3cd163..ebbb181 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "easybill/php-sdk", - "description": "easybill PHP SDK (API)", + "description": "easybill PHP SDK (REST API)", "keywords": [ "PHP", "easybill", @@ -19,16 +19,36 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0 || ^8.1", "ext-json": "*", - "guzzlehttp/guzzle": "^7.3" + "guzzlehttp/guzzle": "^7.4" }, "autoload": { "psr-4": { - "easybill\\SDK\\": "src/" + "Easybill\\SDK\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Easybill\\SDK\\Tests\\": "tests/" } }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.17" + "friendsofphp/php-cs-fixer": "^3.4", + "nette/php-generator": "^3.6", + "phpunit/phpunit": "^9.5" + }, + "scripts": { + "sdk:models": [ + "@php generators/models.php", + "@sdk:cs-fix" + ], + "sdk:cs-fix": "./vendor/bin/php-cs-fixer fix", + "sdk:test": "./vendor/bin/phpunit tests" + }, + "scripts-descriptions": { + "sdk:models": "Gnerate models from swagger.json file.", + "sdk:cs-fix": "Run php-cs-fixer to reformat php files.", + "sdk:test": "Run test with PHPUnit" } } diff --git a/composer.lock b/composer.lock index 84eb0ae..2cbdb09 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,29 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e38a24289b54d2f99c8f4ade62eebec7", + "content-hash": "8aea787884ab60a688ad10c410d72176", "packages": [ { "name": "guzzlehttp/guzzle", - "version": "7.3.0", + "version": "7.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" }, "provide": { "psr/http-client-implementation": "1.0" @@ -35,7 +36,7 @@ "ext-curl": "*", "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { "ext-curl": "Required for CURL handler support", @@ -45,35 +46,59 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.4-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", @@ -87,7 +112,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" }, "funding": [ { @@ -99,28 +124,24 @@ "type": "github" }, { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" } ], - "time": "2021-03-23T11:33:13+00:00" + "time": "2022-03-20T14:16:28+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.4.1", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { @@ -132,26 +153,41 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", @@ -160,9 +196,23 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, - "time": "2021-03-07T09:25:29+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" }, { "name": "guzzlehttp/psr7", @@ -482,21 +532,159 @@ "source": "https://github.com/ralouphie/getallheaders/tree/develop" }, "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "shasum": "" + }, + "require": { + "php": ">=8.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-01T23:48:49+00:00" } ], "packages-dev": [ + { + "name": "composer/pcre", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", + "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-12-06T15:17:27+00:00" + }, { "name": "composer/semver", - "version": "3.2.4", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" + "reference": "83e511e247de329283478496f7a1e114c9517506" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", - "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506", + "reference": "83e511e247de329283478496f7a1e114c9517506", "shasum": "" }, "require": { @@ -548,7 +736,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.4" + "source": "https://github.com/composer/semver/tree/3.2.6" }, "funding": [ { @@ -564,29 +752,31 @@ "type": "tidelift" } ], - "time": "2020-11-13T08:59:24+00:00" + "time": "2021-10-25T11:34:17+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.6", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + "reference": "6555461e76962fd0379c444c46fd558a0fcfb65e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6555461e76962fd0379c444c46fd558a0fcfb65e", + "reference": "6555461e76962fd0379c444c46fd558a0fcfb65e", "shasum": "" }, "require": { + "composer/pcre": "^1", "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "type": "library", "autoload": { @@ -612,7 +802,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.3" }, "funding": [ { @@ -628,32 +818,34 @@ "type": "tidelift" } ], - "time": "2021-03-25T17:01:18+00:00" + "time": "2021-12-08T13:07:32+00:00" }, { "name": "doctrine/annotations", - "version": "1.12.1", + "version": "1.13.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", "shasum": "" }, "require": { "doctrine/lexer": "1.*", "ext-tokenizer": "*", - "php": "^7.1 || ^8.0" + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "1.*", + "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^6.0 || ^8.1", "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5" + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" }, "type": "library", "autoload": { @@ -696,9 +888,78 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.12.1" + "source": "https://github.com/doctrine/annotations/tree/1.13.2" + }, + "time": "2021-08-05T19:00:23+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" }, - "time": "2021-02-21T21:00:45+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" }, { "name": "doctrine/lexer", @@ -782,58 +1043,56 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.18.5", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "e0f6d05c8b157f50029ca6c65c19ed2694f475bf" + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/e0f6d05c8b157f50029ca6c65c19ed2694f475bf", - "reference": "e0f6d05c8b157f50029ca6c65c19ed2694f475bf", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", "shasum": "" }, "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2", - "doctrine/annotations": "^1.2", + "composer/semver": "^3.2", + "composer/xdebug-handler": "^2.0", + "doctrine/annotations": "^1.12", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + "php": "^7.2.5 || ^8.0", + "php-cs-fixer/diff": "^2.0", + "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", + "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", + "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.23", + "symfony/polyfill-php81": "^1.23", + "symfony/process": "^4.4.20 || ^5.0 || ^6.0", + "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" }, "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^1.5", + "mikey179/vfsstream": "^1.6.8", + "php-coveralls/php-coveralls": "^2.5.2", + "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunit/phpunit": "^8.5.21 || ^9.5", "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "symfony/phpunit-bridge": "^5.2.4 || ^6.0", + "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" @@ -842,20 +1101,7 @@ "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -874,7 +1120,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.5" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" }, "funding": [ { @@ -882,338 +1128,2304 @@ "type": "github" } ], - "time": "2021-04-06T18:37:33+00:00" + "time": "2021-12-11T16:25:08+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "name": "myclabs/deep-copy", + "version": "1.10.2", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { - "classmap": [ - "src/" + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nette/php-generator", + "version": "v3.6.5", + "source": { + "type": "git", + "url": "https://github.com/nette/php-generator.git", + "reference": "9370403f9d9c25b51c4596ded1fbfe70347f7c82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/php-generator/zipball/9370403f9d9c25b51c4596ded1fbfe70347f7c82", + "reference": "9370403f9d9c25b51c4596ded1fbfe70347f7c82", + "shasum": "" + }, + "require": { + "nette/utils": "^3.1.2", + "php": ">=7.2 <8.2" + }, + "require-dev": { + "nette/tester": "^2.4", + "nikic/php-parser": "^4.13", + "phpstan/phpstan": "^0.12", + "tracy/tracy": "^2.8" + }, + "suggest": { + "nikic/php-parser": "to use ClassType::withBodiesFrom() & GlobalFunction::withBodyFrom()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" }, { - "name": "SpacePossum" + "name": "Nette Community", + "homepage": "https://nette.org/contributors" } ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.1 features.", + "homepage": "https://nette.org", "keywords": [ - "diff" + "code", + "nette", + "php", + "scaffolding" ], "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + "issues": "https://github.com/nette/php-generator/issues", + "source": "https://github.com/nette/php-generator/tree/v3.6.5" }, - "time": "2020-10-14T08:39:05+00:00" + "time": "2021-11-24T16:23:44+00:00" }, { - "name": "psr/container", - "version": "1.1.1", + "name": "nette/utils", + "version": "v3.2.6", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "url": "https://github.com/nette/utils.git", + "reference": "2f261e55bd6a12057442045bf2c249806abc1d02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/nette/utils/zipball/2f261e55bd6a12057442045bf2c249806abc1d02", + "reference": "2f261e55bd6a12057442045bf2c249806abc1d02", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.2 <8.2" + }, + "conflict": { + "nette/di": "<3.0.6" + }, + "require-dev": { + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" }, "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.6" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-24T15:47:23+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "nikic/php-parser", + "version": "v4.13.2", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { - "php": ">=7.2.0" + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "4.9-dev" } }, "autoload": { "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Nikita Popov" } ], - "description": "Standard interfaces for event handling.", + "description": "A PHP parser written in PHP", "keywords": [ - "events", - "psr", - "psr-14" + "parser", + "php" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { - "name": "psr/log", - "version": "1.1.3", + "name": "phar-io/manifest", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { - "php": ">=5.3.0" + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { - "name": "symfony/console", - "version": "v5.2.6", + "name": "phar-io/version", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d" + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/35f039df40a3b335ebf310f244cb242b3a83ac8d", - "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "php": "^7.2 || ^8.0" }, - "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] }, - "provide": { - "psr/log-implementation": "1.0" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", + "description": "sebastian/diff v3 backport support for PHP 5.6+", + "homepage": "https://github.com/PHP-CS-Fixer", "keywords": [ - "cli", - "command line", - "console", - "terminal" + "diff" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.6" + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, + "time": "2020-10-14T08:32:19+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" } ], - "time": "2021-03-28T09:42:18+00:00" + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { - "name": "symfony/deprecation-contracts", - "version": "v2.2.0", + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", "source": { "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + }, + "time": "2021-10-02T14:08:47+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + }, + "time": "2021-12-08T12:19:24+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687", + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-05T09:12:13+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.11", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "2406855036db1102126125537adb1406f7242fdd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2406855036db1102126125537adb1406f7242fdd", + "reference": "2406855036db1102126125537adb1406f7242fdd", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.11" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-25T07:07:57+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T14:18:36+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v6.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "fafd9802d386bf1c267e0249ddb7ceb14dcfdad4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/fafd9802d386bf1c267e0249ddb7ceb14dcfdad4", + "reference": "fafd9802d386bf1c267e0249ddb7ceb14dcfdad4", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", - "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", - "shasum": "" + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, - "require": { - "php": ">=7.1" + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, "autoload": { - "files": [ - "function.php" + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1222,18 +3434,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "A generic function and convention to trigger deprecation notices", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/master" + "source": "https://github.com/symfony/console/tree/v6.0.1" }, "funding": [ { @@ -1249,44 +3467,42 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2021-12-09T12:47:37+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.2.4", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d08d6ec121a425897951900ab692b612a61d6240" + "reference": "4f06d19a5f78087061f9de6df3269c139c3d289d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", - "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4f06d19a5f78087061f9de6df3269c139c3d289d", + "reference": "4f06d19a5f78087061f9de6df3269c139c3d289d", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/event-dispatcher-contracts": "^2", - "symfony/polyfill-php80": "^1.15" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/error-handler": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^4.4|^5.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^5.4|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1318,7 +3534,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.1" }, "funding": [ { @@ -1334,24 +3550,24 @@ "type": "tidelift" } ], - "time": "2021-02-18T17:12:37+00:00" + "time": "2021-12-08T15:13:44+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.2.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2" + "reference": "aa5422287b75594b90ee9cd807caf8f0df491385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ba7d54483095a198fa51781bc608d17e84dffa2", - "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/aa5422287b75594b90ee9cd807caf8f0df491385", + "reference": "aa5422287b75594b90ee9cd807caf8f0df491385", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -1360,7 +3576,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -1397,7 +3613,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.2.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.0" }, "funding": [ { @@ -1413,25 +3629,26 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2021-07-15T12:33:35+00:00" }, { "name": "symfony/filesystem", - "version": "v5.2.6", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "8c86a82f51658188119e62cff0a050a12d09836f" + "reference": "52b3c9cce673b014915445a432339f282e002ce6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/8c86a82f51658188119e62cff0a050a12d09836f", - "reference": "8c86a82f51658188119e62cff0a050a12d09836f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/52b3c9cce673b014915445a432339f282e002ce6", + "reference": "52b3c9cce673b014915445a432339f282e002ce6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.0.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -1459,7 +3676,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.2.6" + "source": "https://github.com/symfony/filesystem/tree/v6.0.0" }, "funding": [ { @@ -1475,24 +3692,24 @@ "type": "tidelift" } ], - "time": "2021-03-28T14:30:26+00:00" + "time": "2021-10-29T07:35:21+00:00" }, { "name": "symfony/finder", - "version": "v5.2.4", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "0d639a0943822626290d169965804f79400e6a04" + "reference": "07debda41a4d32d33e59e6ab302af1701e15f173" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/0d639a0943822626290d169965804f79400e6a04", - "reference": "0d639a0943822626290d169965804f79400e6a04", + "url": "https://api.github.com/repos/symfony/finder/zipball/07debda41a4d32d33e59e6ab302af1701e15f173", + "reference": "07debda41a4d32d33e59e6ab302af1701e15f173", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -1520,7 +3737,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.4" + "source": "https://github.com/symfony/finder/tree/v6.0.0" }, "funding": [ { @@ -1536,27 +3753,25 @@ "type": "tidelift" } ], - "time": "2021-02-15T18:55:04+00:00" + "time": "2021-11-28T15:34:37+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.2.4", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" + "reference": "be0facf48a42a232d6c0daadd76e4eb5657a4798" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", - "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/be0facf48a42a232d6c0daadd76e4eb5657a4798", + "reference": "be0facf48a42a232d6c0daadd76e4eb5657a4798", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.15" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", "autoload": { @@ -1589,7 +3804,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.2.4" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.0" }, "funding": [ { @@ -1605,20 +3820,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T12:56:27+00:00" + "time": "2021-11-23T19:05:29+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -1630,7 +3845,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1668,7 +3883,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -1684,20 +3899,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.22.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "shasum": "" }, "require": { @@ -1709,7 +3924,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1749,7 +3964,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" }, "funding": [ { @@ -1765,20 +3980,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { @@ -1790,7 +4005,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1833,7 +4048,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" }, "funding": [ { @@ -1849,20 +4064,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.22.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { @@ -1874,7 +4089,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1913,151 +4128,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-22T09:19:47+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.22.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" }, "funding": [ { @@ -2073,20 +4144,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.22.1", + "name": "symfony/polyfill-php80", + "version": "v1.23.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { @@ -2095,7 +4166,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2104,7 +4175,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "files": [ "bootstrap.php" @@ -2118,6 +4189,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2127,7 +4202,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2136,7 +4211,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" }, "funding": [ { @@ -2152,20 +4227,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-07-28T13:41:28+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.22.1", + "name": "symfony/polyfill-php81", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "e66119f3de95efc359483f810c4c3e6436279436" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", + "reference": "e66119f3de95efc359483f810c4c3e6436279436", "shasum": "" }, "require": { @@ -2174,7 +4249,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2183,7 +4258,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, "files": [ "bootstrap.php" @@ -2197,10 +4272,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2210,7 +4281,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2219,7 +4290,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" }, "funding": [ { @@ -2235,25 +4306,24 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-05-21T13:25:03+00:00" }, { "name": "symfony/process", - "version": "v5.2.4", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f" + "reference": "d970c45c2186aa4331d1656950a82df64e232580" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f", - "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f", + "url": "https://api.github.com/repos/symfony/process/zipball/d970c45c2186aa4331d1656950a82df64e232580", + "reference": "d970c45c2186aa4331d1656950a82df64e232580", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -2281,7 +4351,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.2.4" + "source": "https://github.com/symfony/process/tree/v6.0.0" }, "funding": [ { @@ -2297,25 +4367,28 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-11-28T15:34:37+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.2.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" + "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603", + "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.0" + "php": ">=8.0.2", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -2323,7 +4396,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -2360,7 +4433,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/master" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.0" }, "funding": [ { @@ -2376,25 +4449,25 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2021-11-04T17:53:12+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.2.4", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c" + "reference": "0e0ed55d1ffdfadd03af180443fbdca9876483b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b12274acfab9d9850c52583d136a24398cdf1a0c", - "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0e0ed55d1ffdfadd03af180443fbdca9876483b3", + "reference": "0e0ed55d1ffdfadd03af180443fbdca9876483b3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1.0|^2" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", "autoload": { @@ -2422,7 +4495,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.2.4" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.0" }, "funding": [ { @@ -2438,35 +4511,37 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-11-23T19:05:29+00:00" }, { "name": "symfony/string", - "version": "v5.2.6", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + "reference": "0cfed595758ec6e0a25591bdc8ca733c1896af32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "url": "https://api.github.com/repos/symfony/string/zipball/0cfed595758ec6e0a25591bdc8ca733c1896af32", + "reference": "0cfed595758ec6e0a25591bdc8ca733c1896af32", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -2505,7 +4580,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.6" + "source": "https://github.com/symfony/string/tree/v6.0.1" }, "funding": [ { @@ -2521,7 +4596,115 @@ "type": "tidelift" } ], - "time": "2021-03-17T17:12:15+00:00" + "time": "2021-12-08T15:13:44+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -2530,7 +4713,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", + "php": "^8.0 || ^8.1", "ext-json": "*" }, "platform-dev": [], diff --git a/examples/customers_01_load-list.php b/examples/customers_01_load-list.php index 22fb5e4..9b4ac8e 100644 --- a/examples/customers_01_load-list.php +++ b/examples/customers_01_load-list.php @@ -1,11 +1,13 @@ request('GET', 'customers'); diff --git a/examples/customers_02_create.php b/examples/customers_02_create.php index bfcd293..5186dbc 100644 --- a/examples/customers_02_create.php +++ b/examples/customers_02_create.php @@ -1,11 +1,13 @@ request('POST', 'customers', [ 'first_name' => 'Foo', diff --git a/examples/customers_03_update.php b/examples/customers_03_update.php index f42f878..dbb1dc6 100644 --- a/examples/customers_03_update.php +++ b/examples/customers_03_update.php @@ -1,11 +1,13 @@ request('GET', 'documents'); diff --git a/examples/documents_02_filter-by-number.php b/examples/documents_02_filter-by-number.php index 3fff4bf..8fc4230 100644 --- a/examples/documents_02_filter-by-number.php +++ b/examples/documents_02_filter-by-number.php @@ -1,11 +1,13 @@ request( 'GET', diff --git a/examples/documents_03_load-page-2.php b/examples/documents_03_load-page-2.php index cf5faa7..fc99897 100644 --- a/examples/documents_03_load-page-2.php +++ b/examples/documents_03_load-page-2.php @@ -1,11 +1,13 @@ request( 'GET', diff --git a/examples/documents_04_create.php b/examples/documents_04_create.php index 8d8e526..191cb26 100644 --- a/examples/documents_04_create.php +++ b/examples/documents_04_create.php @@ -1,11 +1,13 @@ request('POST', 'documents', [ 'title' => 'Example Title', diff --git a/examples/documents_05_pdf_download.php b/examples/documents_05_pdf_download.php index 33b7ecc..6d1dd71 100644 --- a/examples/documents_05_pdf_download.php +++ b/examples/documents_05_pdf_download.php @@ -1,13 +1,15 @@ request('GET', "documents/{$docID}/pdf", null, true); diff --git a/examples/with_models/customers_create_and_update.php b/examples/with_models/customers_create_and_update.php new file mode 100644 index 0000000..7d13a2f --- /dev/null +++ b/examples/with_models/customers_create_and_update.php @@ -0,0 +1,34 @@ +setFirstName('Foo'); +$customerCreate->setLastName('Bar'); +$customerCreate->setCompanyName('FooBar GmbH'); +$customerCreate->setEmails(['foo.bar@foobar.com']); + +$result = $client->request('POST', 'customers', $customerCreate->toArray()); + +$customer = new Customer($result); + +var_dump($customer); + +//# Update Customer +$customerUpdate = new Customer(); +$customerUpdate->setCompanyName('FooBar Ltd.'); + +$result = $client->request('PUT', "customers/{$customer->getId()}", $customerUpdate->toArray()); + +$customer = new Customer($result); + +var_dump($customer->getCompanyName()); diff --git a/examples/with_models/customers_list.php b/examples/with_models/customers_list.php new file mode 100644 index 0000000..5891023 --- /dev/null +++ b/examples/with_models/customers_list.php @@ -0,0 +1,17 @@ +request('GET', 'customers'); + +$logins = array_map(static fn (array $data): Customer => new Customer($data), $result['items']); + +var_dump($result); diff --git a/examples/with_models/documents_list.php b/examples/with_models/documents_list.php new file mode 100644 index 0000000..93c2391 --- /dev/null +++ b/examples/with_models/documents_list.php @@ -0,0 +1,17 @@ +request('GET', 'documents'); + +$documents = array_map(static fn (array $data): Document => new Document($data), $result['items']); + +var_dump($documents); diff --git a/examples/with_models/logins_list.php b/examples/with_models/logins_list.php new file mode 100644 index 0000000..84e9a1b --- /dev/null +++ b/examples/with_models/logins_list.php @@ -0,0 +1,17 @@ +request('GET', 'logins'); + +$logins = array_map(static fn (array $data): Login => new Login($data), $result['items']); + +var_dump($result); diff --git a/generators/models.php b/generators/models.php new file mode 100644 index 0000000..627f768 --- /dev/null +++ b/generators/models.php @@ -0,0 +1,169 @@ + 'int', + 'number' => 'float', + 'boolean' => 'bool', + 'array' => 'array', + 'string' => 'string', + '' => '', + default => throw new RuntimeException('type not supported: ' . $type), + }; +} + +foreach ($swagger['definitions'] as $className => $classInfo) { + $className = 'List' === $className ? 'ResultList' : $className; + + if ( + 'ResultList' === $className + || 'PDFTemplates' === $className + || 'Discount' === $className + || ($classInfo['allOf'][0]['$ref'] ?? '') === '#/definitions/List' + ) { + // dont support this in first step; + continue; + } + + $classInfo['properties'] = $classInfo['properties'] ?? []; + $classInfo['allOf'] = $classInfo['allOf'] ?? []; + $classInfo['description'] = trim($classInfo['description'] ?? ''); + $classInfo['readOnly'] = $classInfo['readOnly'] ?? false; + + foreach ($classInfo['allOf'] as $of) { + if (array_key_exists('$ref', $of)) { + $classInfo['properties'] = array_merge($classInfo['properties'], $swagger['definitions'][classNameFromRef($of['$ref'])]['properties'] ?? []); + + continue; + } + if (array_key_exists('properties', $of)) { + $classInfo['properties'] = array_merge($classInfo['properties'], $of['properties']); + + continue; + } + } + + $file = new Nette\PhpGenerator\PhpFile(); + $file->setStrictTypes(); + $class = $file->addClass(classWithNamespace($className)); + $class->addComment('Auto-generated with `composer sdk:models`'); + $class->addComment('@version swagger ' . $swagger['info']['version']); + $class->addComment('@version rest v1'); + + if ('' !== $classInfo['description']) { + $class->addComment($classInfo['description']); + } + + $construct = $class->addMethod('__construct'); + $construct->addParameter('data', [])->setType('array'); + $class->addImplement(ToArrayInterface::class); + $class->addTrait(Data::class); + $construct->setBody('$this->data = $data;'); + + $errors = []; + + foreach ($classInfo['properties'] as $propertyName => $propertyInfo) { + $propertyInfo['readOnly'] = $propertyInfo['readOnly'] ?? false; + $propertyInfo['description'] = trim($propertyInfo['description'] ?? ''); + $propertyInfo['type'] = trim($propertyInfo['type'] ?? ''); + $propertyInfo['x-nullable'] = $propertyInfo['x-nullable'] ?? false; + $propertyInfo['items'] = $propertyInfo['items'] ?? []; + $propertyInfo['format'] = $propertyInfo['format'] ?? ''; + $propertyInfo['enum'] = $propertyInfo['enum'] ?? []; + + echo '==> ' . $className . '::' . $propertyName . "\n"; + + $type = typeMap($propertyInfo['type']); + $isObject = false; + + if (array_key_exists('$ref', $propertyInfo)) { + $type = classWithNamespace(classNameFromRef($propertyInfo['$ref'])); + $propertyInfo['readOnly'] = $swagger['definitions'][classNameFromRef($propertyInfo['$ref'])]['readOnly'] ?? false; + $isObject = true; + } + + if ( + 'date' === $propertyInfo['format'] + || 'date-time' === $propertyInfo['format'] + ) { + $type = DateTimeImmutable::class; + } + + $methodeName = str_replace('_', '', ucwords($propertyName, '_')); + + if (false === $classInfo['readOnly'] && false === $propertyInfo['readOnly']) { + $setter = $class->addMethod('set' . $methodeName); + if ('' !== $propertyInfo['description']) { + $setter->addComment($propertyInfo['description']); + } + $setter->setReturnType('void'); + $setter->setBody('$this->data[\'' . $propertyName . '\'] = $' . $propertyName . ';'); + + $property = $setter->addParameter($propertyName); + $property->setType($type); + if ($propertyInfo['x-nullable']) { + $property->setNullable(); + } + if ('array' === $type && array_key_exists('$ref', $propertyInfo['items'])) { + $setter->addComment('@param ' . classNameFromRef($propertyInfo['items']['$ref']) . '[] $' . $propertyName); + } + if ($propertyInfo['enum']) { + $setter->addComment('@enum ' . json_encode($propertyInfo['enum'], JSON_THROW_ON_ERROR)); + } + } + + $getter = $class->addMethod('get' . $methodeName); + $getter->setReturnType($type); + if ($propertyInfo['x-nullable']) { + $getter->setReturnNullable(); + } + if ('array' === $type && array_key_exists('type', $propertyInfo['items'])) { + $getter->addComment('@return ' . typeMap($propertyInfo['items']['type']) . '[]'); + } + if ('array' === $type && array_key_exists('$ref', $propertyInfo['items'])) { + $getter->addComment('@return ' . classNameFromRef($propertyInfo['items']['$ref']) . '[]'); + } + if ($isObject) { + $getter->setBody('return $this->attrInstance(\'' . $propertyName . '\', \\' . $type . '::class);'); + } elseif ('date' === $propertyInfo['format']) { + $getter->setBody('return $this->attrDate(\'' . $propertyName . '\');'); + } elseif ('date-time' === $propertyInfo['format']) { + $getter->setBody('return $this->attrDateTime(\'' . $propertyName . '\');'); + } elseif ('array' === $type && array_key_exists('$ref', $propertyInfo['items'])) { + $getter->setBody('return $this->attrInstances(\'' . $propertyName . '\', ' . classNameFromRef($propertyInfo['items']['$ref']) . '::class);'); + } else { + $getter->setBody('return $this->attr(\'' . $propertyName . '\');'); + } + if ($propertyInfo['enum']) { + $getter->addComment('@enum ' . json_encode($propertyInfo['enum'], JSON_THROW_ON_ERROR)); + } + } + + $content = (new Nette\PhpGenerator\PsrPrinter())->printFile($file); + file_put_contents(__DIR__ . '/../src/Models/' . $className . '.php', $content); +} diff --git a/src/Client.php b/src/Client.php index 4d277e5..ba319ef 100644 --- a/src/Client.php +++ b/src/Client.php @@ -1,26 +1,28 @@ endpoint = $endpoint; - $this->headers = $headers; - if ($httpClient) { + /** + * @param string[] $headers + */ + public function __construct( + private Endpoint $endpoint, + ?HttpClientInterface $httpClient = null, + private array $headers = [], + ) { + if (null !== $httpClient) { $this->httpClient = $httpClient; } else { $this->httpClient = new BaseHttpClient(new GuzzleHttpClient()); @@ -28,9 +30,9 @@ public function __construct(Endpoint $endpoint, ?HttpClientInterface $httpClient } /** - * @return mixed|string + * @throws \JsonException */ - public function request(string $method, string $uri = '', array $body = null, bool $raw = false) + public function request(string $method, string $uri = '', array $body = null, bool $raw = false): string|array { $request = new Request( $method, @@ -38,7 +40,7 @@ public function request(string $method, string $uri = '', array $body = null, bo array_merge([ 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $this->endpoint->getApiKey(), - 'User-Agent' => 'easybill-php-sdk (rest-master)', + 'User-Agent' => 'easybill-php-sdk v4', ], $this->headers), is_array($body) ? json_encode($body, JSON_THROW_ON_ERROR) : null ); diff --git a/src/Endpoint.php b/src/Endpoint.php index cf7be98..1926819 100644 --- a/src/Endpoint.php +++ b/src/Endpoint.php @@ -1,6 +1,8 @@ httpClient = $httpClient; - $this->maxApiCallsPerMinute = $maxApiCallsPerMinute; + public function __construct( + private HttpClientInterface $httpClient, + private int $maxApiCallsPerMinute = 60, + ) { } public function send(RequestInterface $request, array $options = []): ResponseInterface @@ -35,9 +34,10 @@ public function send(RequestInterface $request, array $options = []): ResponseIn return $res; } catch (ClientException $clientException) { - if ($clientException->getResponse()->getStatusCode() === 429) { + if (429 === $clientException->getResponse()->getStatusCode()) { // Too Many Requests, wait and try again. sleep(30); + return $this->send($request, $options); } diff --git a/src/HttpClient/GuzzleHttpClient.php b/src/HttpClient/GuzzleHttpClient.php index 0042148..513c1b0 100644 --- a/src/HttpClient/GuzzleHttpClient.php +++ b/src/HttpClient/GuzzleHttpClient.php @@ -1,11 +1,13 @@ data = $data; + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDate('created_at'); + } + + public function setCustomerId(?int $customer_id): void + { + $this->data['customer_id'] = $customer_id; + } + + public function getCustomerId(): ?int + { + return $this->attr('customer_id'); + } + + public function setDocumentId(?int $document_id): void + { + $this->data['document_id'] = $document_id; + } + + public function getDocumentId(): ?int + { + return $this->attr('document_id'); + } + + public function getFileName(): string + { + return $this->attr('file_name'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setProjectId(?int $project_id): void + { + $this->data['project_id'] = $project_id; + } + + public function getProjectId(): ?int + { + return $this->attr('project_id'); + } + + public function getSize(): int + { + return $this->attr('size'); + } +} diff --git a/src/Models/Contact.php b/src/Models/Contact.php new file mode 100644 index 0000000..a04e15b --- /dev/null +++ b/src/Models/Contact.php @@ -0,0 +1,250 @@ +data = $data; + } + + public function setCity(string $city): void + { + $this->data['city'] = $city; + } + + public function getCity(): string + { + return $this->attr('city'); + } + + public function setState(string $state): void + { + $this->data['state'] = $state; + } + + public function getState(): string + { + return $this->attr('state'); + } + + public function setCompanyName(?string $company_name): void + { + $this->data['company_name'] = $company_name; + } + + public function getCompanyName(): ?string + { + return $this->attr('company_name'); + } + + /** + * Two-letter country code. + */ + public function setCountry(string $country): void + { + $this->data['country'] = $country; + } + + public function getCountry(): string + { + return $this->attr('country'); + } + + public function setDepartment(?string $department): void + { + $this->data['department'] = $department; + } + + public function getDepartment(): ?string + { + return $this->attr('department'); + } + + public function setEmails(array $emails): void + { + $this->data['emails'] = $emails; + } + + /** + * @return string[] + */ + public function getEmails(): array + { + return $this->attr('emails'); + } + + public function setFax(?string $fax): void + { + $this->data['fax'] = $fax; + } + + public function getFax(): ?string + { + return $this->attr('fax'); + } + + public function setFirstName(?string $first_name): void + { + $this->data['first_name'] = $first_name; + } + + public function getFirstName(): ?string + { + return $this->attr('first_name'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setLastName(?string $last_name): void + { + $this->data['last_name'] = $last_name; + } + + public function getLastName(): ?string + { + return $this->attr('last_name'); + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + public function setMobile(?string $mobile): void + { + $this->data['mobile'] = $mobile; + } + + public function getMobile(): ?string + { + return $this->attr('mobile'); + } + + public function setNote(?string $note): void + { + $this->data['note'] = $note; + } + + public function getNote(): ?string + { + return $this->attr('note'); + } + + public function setPersonal(bool $personal): void + { + $this->data['personal'] = $personal; + } + + public function getPersonal(): bool + { + return $this->attr('personal'); + } + + public function setPhone1(?string $phone_1): void + { + $this->data['phone_1'] = $phone_1; + } + + public function getPhone1(): ?string + { + return $this->attr('phone_1'); + } + + public function setPhone2(?string $phone_2): void + { + $this->data['phone_2'] = $phone_2; + } + + public function getPhone2(): ?string + { + return $this->attr('phone_2'); + } + + /** + * 0: empty
1: Herrn
2: Frau
3: Firma
4: Herrn und Frau
5: Eheleute
6: Familie. + */ + public function setSalutation(int $salutation): void + { + $this->data['salutation'] = $salutation; + } + + public function getSalutation(): int + { + return $this->attr('salutation'); + } + + public function setStreet(string $street): void + { + $this->data['street'] = $street; + } + + public function getStreet(): string + { + return $this->attr('street'); + } + + public function setSuffix1(?string $suffix_1): void + { + $this->data['suffix_1'] = $suffix_1; + } + + public function getSuffix1(): ?string + { + return $this->attr('suffix_1'); + } + + public function setSuffix2(?string $suffix_2): void + { + $this->data['suffix_2'] = $suffix_2; + } + + public function getSuffix2(): ?string + { + return $this->attr('suffix_2'); + } + + public function setTitle(?string $title): void + { + $this->data['title'] = $title; + } + + public function getTitle(): ?string + { + return $this->attr('title'); + } + + public function setZipCode(?string $zip_code): void + { + $this->data['zip_code'] = $zip_code; + } + + public function getZipCode(): ?string + { + return $this->attr('zip_code'); + } + + public function getCreatedAt(): string + { + return $this->attr('created_at'); + } + + public function getUpdatedAt(): string + { + return $this->attr('updated_at'); + } +} diff --git a/src/Models/Customer.php b/src/Models/Customer.php new file mode 100644 index 0000000..7c956e7 --- /dev/null +++ b/src/Models/Customer.php @@ -0,0 +1,845 @@ +data = $data; + } + + /** + * 1 = Empfehlung eines anderen Kunden, 2 = Zeitungsanzeige, 3 = Eigene Akquisition, 4 = Mitarbeiter Akquisition, 5 = Google, 6 = Gelbe Seiten, 7 = Kostenlose Internet Plattform, 8 = Bezahlte Internet Plattform. + * + * @enum [1,2,3,4,5,6,7,8] + */ + public function setAcquireOptions(?int $acquire_options): void + { + $this->data['acquire_options'] = $acquire_options; + } + + /** + * @enum [1,2,3,4,5,6,7,8] + */ + public function getAcquireOptions(): ?int + { + return $this->attr('acquire_options'); + } + + /** + * @return int[] + */ + public function getAdditionalGroupsIds(): array + { + return $this->attr('additional_groups_ids'); + } + + public function setBankAccount(?string $bank_account): void + { + $this->data['bank_account'] = $bank_account; + } + + public function getBankAccount(): ?string + { + return $this->attr('bank_account'); + } + + public function setBankAccountOwner(?string $bank_account_owner): void + { + $this->data['bank_account_owner'] = $bank_account_owner; + } + + public function getBankAccountOwner(): ?string + { + return $this->attr('bank_account_owner'); + } + + public function setBankBic(?string $bank_bic): void + { + $this->data['bank_bic'] = $bank_bic; + } + + public function getBankBic(): ?string + { + return $this->attr('bank_bic'); + } + + public function setBankCode(?string $bank_code): void + { + $this->data['bank_code'] = $bank_code; + } + + public function getBankCode(): ?string + { + return $this->attr('bank_code'); + } + + public function setBankIban(?string $bank_iban): void + { + $this->data['bank_iban'] = $bank_iban; + } + + public function getBankIban(): ?string + { + return $this->attr('bank_iban'); + } + + public function setBankName(?string $bank_name): void + { + $this->data['bank_name'] = $bank_name; + } + + public function getBankName(): ?string + { + return $this->attr('bank_name'); + } + + public function setBirthDate(?\DateTimeImmutable $birth_date): void + { + $this->data['birth_date'] = $birth_date; + } + + public function getBirthDate(): ?\DateTimeImmutable + { + return $this->attrDate('birth_date'); + } + + public function setCashAllowance(?float $cash_allowance): void + { + $this->data['cash_allowance'] = $cash_allowance; + } + + public function getCashAllowance(): ?float + { + return $this->attr('cash_allowance'); + } + + public function setCashAllowanceDays(int $cash_allowance_days): void + { + $this->data['cash_allowance_days'] = $cash_allowance_days; + } + + public function getCashAllowanceDays(): int + { + return $this->attr('cash_allowance_days'); + } + + public function setCashDiscount(?float $cash_discount): void + { + $this->data['cash_discount'] = $cash_discount; + } + + public function getCashDiscount(): ?float + { + return $this->attr('cash_discount'); + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function setCashDiscountType(?string $cash_discount_type): void + { + $this->data['cash_discount_type'] = $cash_discount_type; + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function getCashDiscountType(): ?string + { + return $this->attr('cash_discount_type'); + } + + public function setCity(?string $city): void + { + $this->data['city'] = $city; + } + + public function getCity(): ?string + { + return $this->attr('city'); + } + + public function setState(string $state): void + { + $this->data['state'] = $state; + } + + public function getState(): string + { + return $this->attr('state'); + } + + public function setCompanyName(?string $company_name): void + { + $this->data['company_name'] = $company_name; + } + + public function getCompanyName(): ?string + { + return $this->attr('company_name'); + } + + public function setCountry(string $country): void + { + $this->data['country'] = $country; + } + + public function getCountry(): string + { + return $this->attr('country'); + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDate('created_at'); + } + + public function getUpdatedAt(): string + { + return $this->attr('updated_at'); + } + + public function setDeliveryTitle(string $delivery_title): void + { + $this->data['delivery_title'] = $delivery_title; + } + + public function getDeliveryTitle(): string + { + return $this->attr('delivery_title'); + } + + public function setDeliveryCity(?string $delivery_city): void + { + $this->data['delivery_city'] = $delivery_city; + } + + public function getDeliveryCity(): ?string + { + return $this->attr('delivery_city'); + } + + public function setDeliveryState(string $delivery_state): void + { + $this->data['delivery_state'] = $delivery_state; + } + + public function getDeliveryState(): string + { + return $this->attr('delivery_state'); + } + + public function setDeliveryCompanyName(?string $delivery_company_name): void + { + $this->data['delivery_company_name'] = $delivery_company_name; + } + + public function getDeliveryCompanyName(): ?string + { + return $this->attr('delivery_company_name'); + } + + public function setDeliveryCountry(?string $delivery_country): void + { + $this->data['delivery_country'] = $delivery_country; + } + + public function getDeliveryCountry(): ?string + { + return $this->attr('delivery_country'); + } + + public function setDeliveryFirstName(?string $delivery_first_name): void + { + $this->data['delivery_first_name'] = $delivery_first_name; + } + + public function getDeliveryFirstName(): ?string + { + return $this->attr('delivery_first_name'); + } + + public function setDeliveryLastName(?string $delivery_last_name): void + { + $this->data['delivery_last_name'] = $delivery_last_name; + } + + public function getDeliveryLastName(): ?string + { + return $this->attr('delivery_last_name'); + } + + public function setDeliveryPersonal(bool $delivery_personal): void + { + $this->data['delivery_personal'] = $delivery_personal; + } + + public function getDeliveryPersonal(): bool + { + return $this->attr('delivery_personal'); + } + + /** + * 0 = nothing, 1 = Mr, 2 = Mrs, 3 = Company, 4 = Mr & Mrs, 5 = Married couple, 6 = Family. + * + * @enum [0,1,2,3,4,5,6] + */ + public function setDeliverySalutation(int $delivery_salutation): void + { + $this->data['delivery_salutation'] = $delivery_salutation; + } + + /** + * @enum [0,1,2,3,4,5,6] + */ + public function getDeliverySalutation(): int + { + return $this->attr('delivery_salutation'); + } + + public function setDeliveryStreet(?string $delivery_street): void + { + $this->data['delivery_street'] = $delivery_street; + } + + public function getDeliveryStreet(): ?string + { + return $this->attr('delivery_street'); + } + + public function setDeliverySuffix1(?string $delivery_suffix_1): void + { + $this->data['delivery_suffix_1'] = $delivery_suffix_1; + } + + public function getDeliverySuffix1(): ?string + { + return $this->attr('delivery_suffix_1'); + } + + public function setDeliverySuffix2(?string $delivery_suffix_2): void + { + $this->data['delivery_suffix_2'] = $delivery_suffix_2; + } + + public function getDeliverySuffix2(): ?string + { + return $this->attr('delivery_suffix_2'); + } + + public function setDeliveryZipCode(?string $delivery_zip_code): void + { + $this->data['delivery_zip_code'] = $delivery_zip_code; + } + + public function getDeliveryZipCode(): ?string + { + return $this->attr('delivery_zip_code'); + } + + public function getDisplayName(): string + { + return $this->attr('display_name'); + } + + public function setEmails(array $emails): void + { + $this->data['emails'] = $emails; + } + + /** + * @return string[] + */ + public function getEmails(): array + { + return $this->attr('emails'); + } + + public function setFax(?string $fax): void + { + $this->data['fax'] = $fax; + } + + public function getFax(): ?string + { + return $this->attr('fax'); + } + + public function setFirstName(?string $first_name): void + { + $this->data['first_name'] = $first_name; + } + + public function getFirstName(): ?string + { + return $this->attr('first_name'); + } + + /** + * will be replaced by its alias due_in_days. + */ + public function setGracePeriod(?int $grace_period): void + { + $this->data['grace_period'] = $grace_period; + } + + public function getGracePeriod(): ?int + { + return $this->attr('grace_period'); + } + + /** + * due date in days. + */ + public function setDueInDays(?int $due_in_days): void + { + $this->data['due_in_days'] = $due_in_days; + } + + public function getDueInDays(): ?int + { + return $this->attr('due_in_days'); + } + + public function setGroupId(?int $group_id): void + { + $this->data['group_id'] = $group_id; + } + + public function getGroupId(): ?int + { + return $this->attr('group_id'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setInfo1(?string $info_1): void + { + $this->data['info_1'] = $info_1; + } + + public function getInfo1(): ?string + { + return $this->attr('info_1'); + } + + public function setInfo2(?string $info_2): void + { + $this->data['info_2'] = $info_2; + } + + public function getInfo2(): ?string + { + return $this->attr('info_2'); + } + + public function setInternet(?string $internet): void + { + $this->data['internet'] = $internet; + } + + public function getInternet(): ?string + { + return $this->attr('internet'); + } + + public function setLastName(?string $last_name): void + { + $this->data['last_name'] = $last_name; + } + + public function getLastName(): ?string + { + return $this->attr('last_name'); + } + + public function setLoginId(int $login_id): void + { + $this->data['login_id'] = $login_id; + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + public function setMobile(?string $mobile): void + { + $this->data['mobile'] = $mobile; + } + + public function getMobile(): ?string + { + return $this->attr('mobile'); + } + + public function setNote(?string $note): void + { + $this->data['note'] = $note; + } + + public function getNote(): ?string + { + return $this->attr('note'); + } + + /** + * Automatically generated if empty. + */ + public function setNumber(string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): string + { + return $this->attr('number'); + } + + /** + * 1 = Stets pünktliche Zahlung, 2 = überwiegend pünktliche Zahlung, 3 = überwiegend verspätete Zahlung, 5 = Grundsätzlich verspätete Zahlung. + * + * @enum [1,2,3,5] + */ + public function setPaymentOptions(?int $payment_options): void + { + $this->data['payment_options'] = $payment_options; + } + + /** + * @enum [1,2,3,5] + */ + public function getPaymentOptions(): ?int + { + return $this->attr('payment_options'); + } + + public function setPersonal(bool $personal): void + { + $this->data['personal'] = $personal; + } + + public function getPersonal(): bool + { + return $this->attr('personal'); + } + + public function setPhone1(?string $phone_1): void + { + $this->data['phone_1'] = $phone_1; + } + + public function getPhone1(): ?string + { + return $this->attr('phone_1'); + } + + public function setPhone2(?string $phone_2): void + { + $this->data['phone_2'] = $phone_2; + } + + public function getPhone2(): ?string + { + return $this->attr('phone_2'); + } + + public function setPostbox(?string $postbox): void + { + $this->data['postbox'] = $postbox; + } + + public function getPostbox(): ?string + { + return $this->attr('postbox'); + } + + public function setPostboxCity(?string $postbox_city): void + { + $this->data['postbox_city'] = $postbox_city; + } + + public function getPostboxCity(): ?string + { + return $this->attr('postbox_city'); + } + + public function setPostboxState(string $postbox_state): void + { + $this->data['postbox_state'] = $postbox_state; + } + + public function getPostboxState(): string + { + return $this->attr('postbox_state'); + } + + public function setPostboxCountry(?string $postbox_country): void + { + $this->data['postbox_country'] = $postbox_country; + } + + public function getPostboxCountry(): ?string + { + return $this->attr('postbox_country'); + } + + public function setPostboxZipCode(?string $postbox_zip_code): void + { + $this->data['postbox_zip_code'] = $postbox_zip_code; + } + + public function getPostboxZipCode(): ?string + { + return $this->attr('postbox_zip_code'); + } + + /** + * @enum ["SALEPRICE2","SALEPRICE3","SALEPRICE4","SALEPRICE5","SALEPRICE6","SALEPRICE7","SALEPRICE8","SALEPRICE9","SALEPRICE10"] + */ + public function setSalePriceLevel(?string $sale_price_level): void + { + $this->data['sale_price_level'] = $sale_price_level; + } + + /** + * @enum ["SALEPRICE2","SALEPRICE3","SALEPRICE4","SALEPRICE5","SALEPRICE6","SALEPRICE7","SALEPRICE8","SALEPRICE9","SALEPRICE10"] + */ + public function getSalePriceLevel(): ?string + { + return $this->attr('sale_price_level'); + } + + /** + * 0 = nothing, 1 = Mr, 2 = Mrs, 3 = Company, 4 = Mr & Mrs, 5 = Married couple, 6 = Family. + * + * @enum [0,1,2,3,4,5,6] + */ + public function setSalutation(int $salutation): void + { + $this->data['salutation'] = $salutation; + } + + /** + * @enum [0,1,2,3,4,5,6] + */ + public function getSalutation(): int + { + return $this->attr('salutation'); + } + + /** + * BASIC = SEPA-Basislastschrift, COR1 = SEPA-Basislastschrift COR1, COMPANY = SEPA-Firmenlastschrift, NULL = Noch kein Mandat erteilt. + * + * @enum ["BASIC","COR1","COMPANY","NULL"] + */ + public function setSepaAgreement(?string $sepa_agreement): void + { + $this->data['sepa_agreement'] = $sepa_agreement; + } + + /** + * @enum ["BASIC","COR1","COMPANY","NULL"] + */ + public function getSepaAgreement(): ?string + { + return $this->attr('sepa_agreement'); + } + + public function setSepaAgreementDate(?\DateTimeImmutable $sepa_agreement_date): void + { + $this->data['sepa_agreement_date'] = $sepa_agreement_date; + } + + public function getSepaAgreementDate(): ?\DateTimeImmutable + { + return $this->attrDate('sepa_agreement_date'); + } + + public function setSepaMandateReference(?string $sepa_mandate_reference): void + { + $this->data['sepa_mandate_reference'] = $sepa_mandate_reference; + } + + public function getSepaMandateReference(): ?string + { + return $this->attr('sepa_mandate_reference'); + } + + public function setSinceDate(?\DateTimeImmutable $since_date): void + { + $this->data['since_date'] = $since_date; + } + + public function getSinceDate(): ?\DateTimeImmutable + { + return $this->attrDate('since_date'); + } + + public function setStreet(?string $street): void + { + $this->data['street'] = $street; + } + + public function getStreet(): ?string + { + return $this->attr('street'); + } + + public function setSuffix1(?string $suffix_1): void + { + $this->data['suffix_1'] = $suffix_1; + } + + public function getSuffix1(): ?string + { + return $this->attr('suffix_1'); + } + + public function setSuffix2(?string $suffix_2): void + { + $this->data['suffix_2'] = $suffix_2; + } + + public function getSuffix2(): ?string + { + return $this->attr('suffix_2'); + } + + public function setTaxNumber(?string $tax_number): void + { + $this->data['tax_number'] = $tax_number; + } + + public function getTaxNumber(): ?string + { + return $this->attr('tax_number'); + } + + public function setCourt(?string $court): void + { + $this->data['court'] = $court; + } + + public function getCourt(): ?string + { + return $this->attr('court'); + } + + public function setCourtRegistryNumber(?string $court_registry_number): void + { + $this->data['court_registry_number'] = $court_registry_number; + } + + public function getCourtRegistryNumber(): ?string + { + return $this->attr('court_registry_number'); + } + + /** + * nStb = Nicht steuerbar (Drittland), nStbUstID = Nicht steuerbar (EU mit USt-IdNr.), nStbNoneUstID = Nicht steuerbar (EU ohne USt-IdNr.), revc = Steuerschuldwechsel §13b (Inland), IG = Innergemeinschaftliche Lieferung, AL = Ausfuhrlieferung, sStfr = sonstige Steuerbefreiung, NULL = Umsatzsteuerpflichtig. + * + * @enum ["nStb","nStbUstID","nStbNoneUstID","nStbIm","revc","IG","AL","sStfr","NULL"] + */ + public function setTaxOptions(?string $tax_options): void + { + $this->data['tax_options'] = $tax_options; + } + + /** + * @enum ["nStb","nStbUstID","nStbNoneUstID","nStbIm","revc","IG","AL","sStfr","NULL"] + */ + public function getTaxOptions(): ?string + { + return $this->attr('tax_options'); + } + + public function setTitle(?string $title): void + { + $this->data['title'] = $title; + } + + public function getTitle(): ?string + { + return $this->attr('title'); + } + + public function setVatIdentifier(?string $vat_identifier): void + { + $this->data['vat_identifier'] = $vat_identifier; + } + + public function getVatIdentifier(): ?string + { + return $this->attr('vat_identifier'); + } + + public function setZipCode(?string $zip_code): void + { + $this->data['zip_code'] = $zip_code; + } + + public function getZipCode(): ?string + { + return $this->attr('zip_code'); + } + + /** + * Type of PDF to use when sending a Document to the Customer. + * + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function setDocumentPdfType(string $documentPdfType): void + { + $this->data['documentPdfType'] = $documentPdfType; + } + + /** + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function getDocumentPdfType(): string + { + return $this->attr('documentPdfType'); + } + + /** + * Used as "buyerReference" in ZUGFeRD and as "Leitweg-ID" in the XRechnung format. + */ + public function setBuyerReference(string $buyer_reference): void + { + $this->data['buyer_reference'] = $buyer_reference; + } + + public function getBuyerReference(): string + { + return $this->attr('buyer_reference'); + } + + /** + * The ID given to your company by the customer in his system. + */ + public function setForeignSupplierNumber(string $foreign_supplier_number): void + { + $this->data['foreign_supplier_number'] = $foreign_supplier_number; + } + + public function getForeignSupplierNumber(): string + { + return $this->attr('foreign_supplier_number'); + } +} diff --git a/src/Models/CustomerGroup.php b/src/Models/CustomerGroup.php new file mode 100644 index 0000000..adffb9b --- /dev/null +++ b/src/Models/CustomerGroup.php @@ -0,0 +1,64 @@ +data = $data; + } + + public function setName(string $name): void + { + $this->data['name'] = $name; + } + + public function getName(): string + { + return $this->attr('name'); + } + + public function setDescription(?string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): ?string + { + return $this->attr('description'); + } + + /** + * Can be chosen freely. + */ + public function setNumber(string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): string + { + return $this->attr('number'); + } + + public function getDisplayName(): string + { + return $this->attr('display_name'); + } + + public function getId(): int + { + return $this->attr('id'); + } +} diff --git a/src/Models/CustomerSnapshot.php b/src/Models/CustomerSnapshot.php new file mode 100644 index 0000000..0ab62c2 --- /dev/null +++ b/src/Models/CustomerSnapshot.php @@ -0,0 +1,435 @@ +data = $data; + } + + /** + * @enum [1,2,3,4,5,6,7,8] + */ + public function getAcquireOptions(): ?int + { + return $this->attr('acquire_options'); + } + + /** + * @return int[] + */ + public function getAdditionalGroupsIds(): array + { + return $this->attr('additional_groups_ids'); + } + + public function getBankAccount(): ?string + { + return $this->attr('bank_account'); + } + + public function getBankAccountOwner(): ?string + { + return $this->attr('bank_account_owner'); + } + + public function getBankBic(): ?string + { + return $this->attr('bank_bic'); + } + + public function getBankCode(): ?string + { + return $this->attr('bank_code'); + } + + public function getBankIban(): ?string + { + return $this->attr('bank_iban'); + } + + public function getBankName(): ?string + { + return $this->attr('bank_name'); + } + + public function getBirthDate(): ?\DateTimeImmutable + { + return $this->attrDate('birth_date'); + } + + public function getCashAllowance(): ?float + { + return $this->attr('cash_allowance'); + } + + public function getCashAllowanceDays(): int + { + return $this->attr('cash_allowance_days'); + } + + public function getCashDiscount(): ?float + { + return $this->attr('cash_discount'); + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function getCashDiscountType(): ?string + { + return $this->attr('cash_discount_type'); + } + + public function getCity(): ?string + { + return $this->attr('city'); + } + + public function getState(): string + { + return $this->attr('state'); + } + + public function getCompanyName(): ?string + { + return $this->attr('company_name'); + } + + public function getCountry(): string + { + return $this->attr('country'); + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDate('created_at'); + } + + public function getUpdatedAt(): string + { + return $this->attr('updated_at'); + } + + public function getDeliveryTitle(): string + { + return $this->attr('delivery_title'); + } + + public function getDeliveryCity(): ?string + { + return $this->attr('delivery_city'); + } + + public function getDeliveryState(): string + { + return $this->attr('delivery_state'); + } + + public function getDeliveryCompanyName(): ?string + { + return $this->attr('delivery_company_name'); + } + + public function getDeliveryCountry(): ?string + { + return $this->attr('delivery_country'); + } + + public function getDeliveryFirstName(): ?string + { + return $this->attr('delivery_first_name'); + } + + public function getDeliveryLastName(): ?string + { + return $this->attr('delivery_last_name'); + } + + public function getDeliveryPersonal(): bool + { + return $this->attr('delivery_personal'); + } + + /** + * @enum [0,1,2,3,4,5,6] + */ + public function getDeliverySalutation(): int + { + return $this->attr('delivery_salutation'); + } + + public function getDeliveryStreet(): ?string + { + return $this->attr('delivery_street'); + } + + public function getDeliverySuffix1(): ?string + { + return $this->attr('delivery_suffix_1'); + } + + public function getDeliverySuffix2(): ?string + { + return $this->attr('delivery_suffix_2'); + } + + public function getDeliveryZipCode(): ?string + { + return $this->attr('delivery_zip_code'); + } + + public function getDisplayName(): string + { + return $this->attr('display_name'); + } + + /** + * @return string[] + */ + public function getEmails(): array + { + return $this->attr('emails'); + } + + public function getFax(): ?string + { + return $this->attr('fax'); + } + + public function getFirstName(): ?string + { + return $this->attr('first_name'); + } + + public function getGracePeriod(): ?int + { + return $this->attr('grace_period'); + } + + public function getDueInDays(): ?int + { + return $this->attr('due_in_days'); + } + + public function getGroupId(): ?int + { + return $this->attr('group_id'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function getInfo1(): ?string + { + return $this->attr('info_1'); + } + + public function getInfo2(): ?string + { + return $this->attr('info_2'); + } + + public function getInternet(): ?string + { + return $this->attr('internet'); + } + + public function getLastName(): ?string + { + return $this->attr('last_name'); + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + public function getMobile(): ?string + { + return $this->attr('mobile'); + } + + public function getNote(): ?string + { + return $this->attr('note'); + } + + public function getNumber(): string + { + return $this->attr('number'); + } + + /** + * @enum [1,2,3,5] + */ + public function getPaymentOptions(): ?int + { + return $this->attr('payment_options'); + } + + public function getPersonal(): bool + { + return $this->attr('personal'); + } + + public function getPhone1(): ?string + { + return $this->attr('phone_1'); + } + + public function getPhone2(): ?string + { + return $this->attr('phone_2'); + } + + public function getPostbox(): ?string + { + return $this->attr('postbox'); + } + + public function getPostboxCity(): ?string + { + return $this->attr('postbox_city'); + } + + public function getPostboxState(): string + { + return $this->attr('postbox_state'); + } + + public function getPostboxCountry(): ?string + { + return $this->attr('postbox_country'); + } + + public function getPostboxZipCode(): ?string + { + return $this->attr('postbox_zip_code'); + } + + /** + * @enum ["SALEPRICE2","SALEPRICE3","SALEPRICE4","SALEPRICE5","SALEPRICE6","SALEPRICE7","SALEPRICE8","SALEPRICE9","SALEPRICE10"] + */ + public function getSalePriceLevel(): ?string + { + return $this->attr('sale_price_level'); + } + + /** + * @enum [0,1,2,3,4,5,6] + */ + public function getSalutation(): int + { + return $this->attr('salutation'); + } + + /** + * @enum ["BASIC","COR1","COMPANY","NULL"] + */ + public function getSepaAgreement(): ?string + { + return $this->attr('sepa_agreement'); + } + + public function getSepaAgreementDate(): ?\DateTimeImmutable + { + return $this->attrDate('sepa_agreement_date'); + } + + public function getSepaMandateReference(): ?string + { + return $this->attr('sepa_mandate_reference'); + } + + public function getSinceDate(): ?\DateTimeImmutable + { + return $this->attrDate('since_date'); + } + + public function getStreet(): ?string + { + return $this->attr('street'); + } + + public function getSuffix1(): ?string + { + return $this->attr('suffix_1'); + } + + public function getSuffix2(): ?string + { + return $this->attr('suffix_2'); + } + + public function getTaxNumber(): ?string + { + return $this->attr('tax_number'); + } + + public function getCourt(): ?string + { + return $this->attr('court'); + } + + public function getCourtRegistryNumber(): ?string + { + return $this->attr('court_registry_number'); + } + + /** + * @enum ["nStb","nStbUstID","nStbNoneUstID","nStbIm","revc","IG","AL","sStfr","NULL"] + */ + public function getTaxOptions(): ?string + { + return $this->attr('tax_options'); + } + + public function getTitle(): ?string + { + return $this->attr('title'); + } + + public function getVatIdentifier(): ?string + { + return $this->attr('vat_identifier'); + } + + public function getZipCode(): ?string + { + return $this->attr('zip_code'); + } + + /** + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function getDocumentPdfType(): string + { + return $this->attr('documentPdfType'); + } + + public function getBuyerReference(): string + { + return $this->attr('buyer_reference'); + } + + public function getForeignSupplierNumber(): string + { + return $this->attr('foreign_supplier_number'); + } +} diff --git a/src/Models/DiscountPosition.php b/src/Models/DiscountPosition.php new file mode 100644 index 0000000..8424d00 --- /dev/null +++ b/src/Models/DiscountPosition.php @@ -0,0 +1,77 @@ +data = $data; + } + + public function setPositionId(int $position_id): void + { + $this->data['position_id'] = $position_id; + } + + public function getPositionId(): int + { + return $this->attr('position_id'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setCustomerId(int $customer_id): void + { + $this->data['customer_id'] = $customer_id; + } + + public function getCustomerId(): int + { + return $this->attr('customer_id'); + } + + /** + * The discount value depending on "discount_type". + */ + public function setDiscount(int $discount): void + { + $this->data['discount'] = $discount; + } + + public function getDiscount(): int + { + return $this->attr('discount'); + } + + /** + * AMOUNT subtracts the value in "discount" from the total
QUANTITY subtracts the value in "discount" multiplied by quantity
PERCENT uses the value in "discount" as a percentage
FIX sets the value in "discount" as the new price. + * + * @enum ["AMOUNT","PERCENT","QUANTITY","FIX"] + */ + public function setDiscountType(string $discount_type): void + { + $this->data['discount_type'] = $discount_type; + } + + /** + * @enum ["AMOUNT","PERCENT","QUANTITY","FIX"] + */ + public function getDiscountType(): string + { + return $this->attr('discount_type'); + } +} diff --git a/src/Models/DiscountPositionGroup.php b/src/Models/DiscountPositionGroup.php new file mode 100644 index 0000000..2987489 --- /dev/null +++ b/src/Models/DiscountPositionGroup.php @@ -0,0 +1,77 @@ +data = $data; + } + + public function setPositionGroupId(int $position_group_id): void + { + $this->data['position_group_id'] = $position_group_id; + } + + public function getPositionGroupId(): int + { + return $this->attr('position_group_id'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setCustomerId(int $customer_id): void + { + $this->data['customer_id'] = $customer_id; + } + + public function getCustomerId(): int + { + return $this->attr('customer_id'); + } + + /** + * The discount value depending on "discount_type". + */ + public function setDiscount(int $discount): void + { + $this->data['discount'] = $discount; + } + + public function getDiscount(): int + { + return $this->attr('discount'); + } + + /** + * AMOUNT subtracts the value in "discount" from the total
QUANTITY subtracts the value in "discount" multiplied by quantity
PERCENT uses the value in "discount" as a percentage
FIX sets the value in "discount" as the new price. + * + * @enum ["AMOUNT","PERCENT","QUANTITY","FIX"] + */ + public function setDiscountType(string $discount_type): void + { + $this->data['discount_type'] = $discount_type; + } + + /** + * @enum ["AMOUNT","PERCENT","QUANTITY","FIX"] + */ + public function getDiscountType(): string + { + return $this->attr('discount_type'); + } +} diff --git a/src/Models/Document.php b/src/Models/Document.php new file mode 100644 index 0000000..616ef9b --- /dev/null +++ b/src/Models/Document.php @@ -0,0 +1,621 @@ +data = $data; + } + + public function getAddress(): DocumentAddress + { + return $this->attrInstance('address', \Easybill\SDK\Models\DocumentAddress::class); + } + + /** + * @return int[] + */ + public function getAttachmentIds(): array + { + return $this->attr('attachment_ids'); + } + + public function getLabelAddress(): DocumentAddress + { + return $this->attrInstance('label_address', \Easybill\SDK\Models\DocumentAddress::class); + } + + public function getAmount(): int + { + return $this->attr('amount'); + } + + public function getAmountNet(): int + { + return $this->attr('amount_net'); + } + + public function setBankDebitForm(?string $bank_debit_form): void + { + $this->data['bank_debit_form'] = $bank_debit_form; + } + + public function getBankDebitForm(): ?string + { + return $this->attr('bank_debit_form'); + } + + public function getBillingCountry(): string + { + return $this->attr('billing_country'); + } + + /** + * 0 === Net, 1 === Gross. + * + * @enum [0,1] + */ + public function setCalcVatFrom(int $calc_vat_from): void + { + $this->data['calc_vat_from'] = $calc_vat_from; + } + + /** + * @enum [0,1] + */ + public function getCalcVatFrom(): int + { + return $this->attr('calc_vat_from'); + } + + public function getCancelId(): int + { + return $this->attr('cancel_id'); + } + + public function setCashAllowance(?float $cash_allowance): void + { + $this->data['cash_allowance'] = $cash_allowance; + } + + public function getCashAllowance(): ?float + { + return $this->attr('cash_allowance'); + } + + public function setCashAllowanceDays(?int $cash_allowance_days): void + { + $this->data['cash_allowance_days'] = $cash_allowance_days; + } + + public function getCashAllowanceDays(): ?int + { + return $this->attr('cash_allowance_days'); + } + + public function setCashAllowanceText(?string $cash_allowance_text): void + { + $this->data['cash_allowance_text'] = $cash_allowance_text; + } + + public function getCashAllowanceText(): ?string + { + return $this->attr('cash_allowance_text'); + } + + public function setContactId(?int $contact_id): void + { + $this->data['contact_id'] = $contact_id; + } + + public function getContactId(): ?int + { + return $this->attr('contact_id'); + } + + public function setContactLabel(string $contact_label): void + { + $this->data['contact_label'] = $contact_label; + } + + public function getContactLabel(): string + { + return $this->attr('contact_label'); + } + + public function setContactText(string $contact_text): void + { + $this->data['contact_text'] = $contact_text; + } + + public function getContactText(): string + { + return $this->attr('contact_text'); + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDateTime('created_at'); + } + + public function setCurrency(string $currency): void + { + $this->data['currency'] = $currency; + } + + public function getCurrency(): string + { + return $this->attr('currency'); + } + + public function setCustomerId(?int $customer_id): void + { + $this->data['customer_id'] = $customer_id; + } + + public function getCustomerId(): ?int + { + return $this->attr('customer_id'); + } + + public function getCustomerSnapshot(): CustomerSnapshot + { + return $this->attrInstance('customer_snapshot', \Easybill\SDK\Models\CustomerSnapshot::class); + } + + public function setDiscount(?string $discount): void + { + $this->data['discount'] = $discount; + } + + public function getDiscount(): ?string + { + return $this->attr('discount'); + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function setDiscountType(?string $discount_type): void + { + $this->data['discount_type'] = $discount_type; + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function getDiscountType(): ?string + { + return $this->attr('discount_type'); + } + + public function setDocumentDate(\DateTimeImmutable $document_date): void + { + $this->data['document_date'] = $document_date; + } + + public function getDocumentDate(): \DateTimeImmutable + { + return $this->attrDate('document_date'); + } + + public function getDueDate(): \DateTimeImmutable + { + return $this->attrDate('due_date'); + } + + public function getEditedAt(): \DateTimeImmutable + { + return $this->attrDateTime('edited_at'); + } + + public function setExternalId(?string $external_id): void + { + $this->data['external_id'] = $external_id; + } + + public function getExternalId(): ?string + { + return $this->attr('external_id'); + } + + public function setReplicaUrl(?string $replica_url): void + { + $this->data['replica_url'] = $replica_url; + } + + public function getReplicaUrl(): ?string + { + return $this->attr('replica_url'); + } + + /** + * will be replaced by its alias due_in_days. + */ + public function setGracePeriod(?int $grace_period): void + { + $this->data['grace_period'] = $grace_period; + } + + public function getGracePeriod(): ?int + { + return $this->attr('grace_period'); + } + + /** + * due date in days. + */ + public function setDueInDays(?int $due_in_days): void + { + $this->data['due_in_days'] = $due_in_days; + } + + public function getDueInDays(): ?int + { + return $this->attr('due_in_days'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setIsArchive(bool $is_archive): void + { + $this->data['is_archive'] = $is_archive; + } + + public function getIsArchive(): bool + { + return $this->attr('is_archive'); + } + + public function getIsDraft(): bool + { + return $this->attr('is_draft'); + } + + /** + * Marks a document as a replica from another software. + */ + public function setIsReplica(bool $is_replica): void + { + $this->data['is_replica'] = $is_replica; + } + + public function getIsReplica(): bool + { + return $this->attr('is_replica'); + } + + public function getIsCold(): bool + { + return $this->attr('is_cold'); + } + + /** + * Indicates if a document is a one-stop-shop document. + */ + public function setIsOss(bool $is_oss): void + { + $this->data['is_oss'] = $is_oss; + } + + public function getIsOss(): bool + { + return $this->attr('is_oss'); + } + + /** + * Signals when the document should be moved to the long term archive. + */ + public function setColdstorageDueDate(?\DateTimeImmutable $coldstorage_due_date): void + { + $this->data['coldstorage_due_date'] = $coldstorage_due_date; + } + + public function getColdstorageDueDate(): ?\DateTimeImmutable + { + return $this->attrDate('coldstorage_due_date'); + } + + /** + * @return string[] + */ + public function getItemNotes(): array + { + return $this->attr('item_notes'); + } + + /** + * @param DocumentPosition[] $items + */ + public function setItems(array $items): void + { + $this->data['items'] = $items; + } + + /** + * @return DocumentPosition[] + */ + public function getItems(): array + { + return $this->attrInstances('items', DocumentPosition::class); + } + + public function getLastPostboxId(): int + { + return $this->attr('last_postbox_id'); + } + + /** + * If omitted or null, the currently active login is used. + */ + public function setLoginId(int $login_id): void + { + $this->data['login_id'] = $login_id; + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + public function setNumber(?string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): ?string + { + return $this->attr('number'); + } + + public function setOrderNumber(string $order_number): void + { + $this->data['order_number'] = $order_number; + } + + public function getOrderNumber(): string + { + return $this->attr('order_number'); + } + + public function setBuyerReference(string $buyer_reference): void + { + $this->data['buyer_reference'] = $buyer_reference; + } + + public function getBuyerReference(): string + { + return $this->attr('buyer_reference'); + } + + public function getPaidAmount(): int + { + return $this->attr('paid_amount'); + } + + public function getPaidAt(): \DateTimeImmutable + { + return $this->attrDate('paid_at'); + } + + public function getPdfPages(): int + { + return $this->attr('pdf_pages'); + } + + /** + * Default template is null or 'DE', default english is 'EN' and for all others use the numeric template ID. + */ + public function setPdfTemplate(string $pdf_template): void + { + $this->data['pdf_template'] = $pdf_template; + } + + public function getPdfTemplate(): string + { + return $this->attr('pdf_template'); + } + + public function setProjectId(?int $project_id): void + { + $this->data['project_id'] = $project_id; + } + + public function getProjectId(): ?int + { + return $this->attr('project_id'); + } + + public function setRecurringOptions(DocumentRecurring $recurring_options): void + { + $this->data['recurring_options'] = $recurring_options; + } + + public function getRecurringOptions(): DocumentRecurring + { + return $this->attrInstance('recurring_options', \Easybill\SDK\Models\DocumentRecurring::class); + } + + /** + * Reference document id. + */ + public function setRefId(?int $ref_id): void + { + $this->data['ref_id'] = $ref_id; + } + + public function getRefId(): ?int + { + return $this->attr('ref_id'); + } + + public function setServiceDate(ServiceDate $service_date): void + { + $this->data['service_date'] = $service_date; + } + + public function getServiceDate(): ServiceDate + { + return $this->attrInstance('service_date', \Easybill\SDK\Models\ServiceDate::class); + } + + public function setShippingCountry(?string $shipping_country): void + { + $this->data['shipping_country'] = $shipping_country; + } + + public function getShippingCountry(): ?string + { + return $this->attr('shipping_country'); + } + + /** + * This value can only be used in document type DELIVERY, ORDER, CHARGE or OFFER. NULL is default = not set. + * + * @enum ["ACCEPT","DONE","DROPSHIPPING","CANCEL"] + */ + public function setStatus(?string $status): void + { + $this->data['status'] = $status; + } + + /** + * @enum ["ACCEPT","DONE","DROPSHIPPING","CANCEL"] + */ + public function getStatus(): ?string + { + return $this->attr('status'); + } + + public function setText(string $text): void + { + $this->data['text'] = $text; + } + + public function getText(): string + { + return $this->attr('text'); + } + + public function setTextPrefix(string $text_prefix): void + { + $this->data['text_prefix'] = $text_prefix; + } + + public function getTextPrefix(): string + { + return $this->attr('text_prefix'); + } + + /** + * Overwrites the default vat-option text from the document layout. It is only displayed in documents with the type other than: Delivery, Dunning, Reminder or Letter and a different vat-option than null. + */ + public function setTextTax(?string $text_tax): void + { + $this->data['text_tax'] = $text_tax; + } + + public function getTextTax(): ?string + { + return $this->attr('text_tax'); + } + + public function setTitle(?string $title): void + { + $this->data['title'] = $title; + } + + public function getTitle(): ?string + { + return $this->attr('title'); + } + + /** + * Can only set on create. + * + * @enum ["INVOICE","RECURRING","CREDIT","OFFER","REMINDER","DUNNING","STORNO","STORNO_CREDIT","DELIVERY","PDF","CHARGE","CHARGE_CONFIRM","LETTER","ORDER","PROFORMA_INVOICE","STORNO_PROFORMA_INVOICE"] + */ + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + /** + * @enum ["INVOICE","RECURRING","CREDIT","OFFER","REMINDER","DUNNING","STORNO","STORNO_CREDIT","DELIVERY","PDF","CHARGE","CHARGE_CONFIRM","LETTER","ORDER","PROFORMA_INVOICE","STORNO_PROFORMA_INVOICE"] + */ + public function getType(): string + { + return $this->attr('type'); + } + + /** + * If true and customer has shipping address then it will be used. + */ + public function setUseShippingAddress(bool $use_shipping_address): void + { + $this->data['use_shipping_address'] = $use_shipping_address; + } + + public function getUseShippingAddress(): bool + { + return $this->attr('use_shipping_address'); + } + + public function setVatCountry(?string $vat_country): void + { + $this->data['vat_country'] = $vat_country; + } + + public function getVatCountry(): ?string + { + return $this->attr('vat_country'); + } + + public function getVatId(): string + { + return $this->attr('vat_id'); + } + + public function setFulfillmentCountry(?string $fulfillment_country): void + { + $this->data['fulfillment_country'] = $fulfillment_country; + } + + public function getFulfillmentCountry(): ?string + { + return $this->attr('fulfillment_country'); + } + + /** + * NULL: Normal steuerbar
nStb: Nicht steuerbar (Drittland)
nStbUstID: Nicht steuerbar (EU mit USt-IdNr.)
nStbNoneUstID: Nicht steuerbar (EU ohne USt-IdNr.)
nStbIm: Nicht steuerbarer Innenumsatz
revc: Steuerschuldwechsel §13b (Inland)
IG: Innergemeinschaftliche Lieferung
AL: Ausfuhrlieferung
sStfr: sonstige Steuerbefreiung
smallBusiness: Kleinunternehmen (Keine MwSt.). + * + * @enum ["NULL","nStb","nStbUstID","nStbNoneUstID","nStbIm","revc","IG","AL","sStfr","smallBusiness"] + */ + public function setVatOption(?string $vat_option): void + { + $this->data['vat_option'] = $vat_option; + } + + /** + * @enum ["NULL","nStb","nStbUstID","nStbNoneUstID","nStbIm","revc","IG","AL","sStfr","smallBusiness"] + */ + public function getVatOption(): ?string + { + return $this->attr('vat_option'); + } +} diff --git a/src/Models/DocumentAddress.php b/src/Models/DocumentAddress.php new file mode 100644 index 0000000..185ef4a --- /dev/null +++ b/src/Models/DocumentAddress.php @@ -0,0 +1,87 @@ +data = $data; + } + + public function getSalutation(): int + { + return $this->attr('salutation'); + } + + public function getPersonal(): bool + { + return $this->attr('personal'); + } + + public function getTitle(): string + { + return $this->attr('title'); + } + + public function getFirstName(): string + { + return $this->attr('first_name'); + } + + public function getLastName(): string + { + return $this->attr('last_name'); + } + + public function getSuffix1(): string + { + return $this->attr('suffix_1'); + } + + public function getSuffix2(): string + { + return $this->attr('suffix_2'); + } + + public function getCompanyName(): string + { + return $this->attr('company_name'); + } + + public function getStreet(): string + { + return $this->attr('street'); + } + + public function getZipCode(): string + { + return $this->attr('zip_code'); + } + + public function getCity(): string + { + return $this->attr('city'); + } + + public function getState(): string + { + return $this->attr('state'); + } + + public function getCountry(): string + { + return $this->attr('country'); + } +} diff --git a/src/Models/DocumentPayment.php b/src/Models/DocumentPayment.php new file mode 100644 index 0000000..a5c28dd --- /dev/null +++ b/src/Models/DocumentPayment.php @@ -0,0 +1,111 @@ +data = $data; + } + + public function setAmount(int $amount): void + { + $this->data['amount'] = $amount; + } + + public function getAmount(): int + { + return $this->attr('amount'); + } + + public function setDocumentId(int $document_id): void + { + $this->data['document_id'] = $document_id; + } + + public function getDocumentId(): int + { + return $this->attr('document_id'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setIsOverdueFee(bool $is_overdue_fee): void + { + $this->data['is_overdue_fee'] = $is_overdue_fee; + } + + public function getIsOverdueFee(): bool + { + return $this->attr('is_overdue_fee'); + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + public function setNotice(string $notice): void + { + $this->data['notice'] = $notice; + } + + public function getNotice(): string + { + return $this->attr('notice'); + } + + public function setPaymentAt(\DateTimeImmutable $payment_at): void + { + $this->data['payment_at'] = $payment_at; + } + + public function getPaymentAt(): \DateTimeImmutable + { + return $this->attrDate('payment_at'); + } + + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + public function getType(): string + { + return $this->attr('type'); + } + + public function setProvider(string $provider): void + { + $this->data['provider'] = $provider; + } + + public function getProvider(): string + { + return $this->attr('provider'); + } + + public function setReference(string $reference): void + { + $this->data['reference'] = $reference; + } + + public function getReference(): string + { + return $this->attr('reference'); + } +} diff --git a/src/Models/DocumentPosition.php b/src/Models/DocumentPosition.php new file mode 100644 index 0000000..f3784f9 --- /dev/null +++ b/src/Models/DocumentPosition.php @@ -0,0 +1,289 @@ +data = $data; + } + + public function setNumber(?string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): ?string + { + return $this->attr('number'); + } + + public function setDescription(?string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): ?string + { + return $this->attr('description'); + } + + /** + * This field can be used in the document text areas with the liquid placeholder {{document.item_notes}}. Every note is only displayed once for every kind of product. This is useful if you want to add something like an instruction. + */ + public function setDocumentNote(string $document_note): void + { + $this->data['document_note'] = $document_note; + } + + public function getDocumentNote(): string + { + return $this->attr('document_note'); + } + + public function setQuantity(float $quantity): void + { + $this->data['quantity'] = $quantity; + } + + public function getQuantity(): float + { + return $this->attr('quantity'); + } + + /** + * Use quantity_str if you want to set a quantity like: 1:30 h or 3x5 m. quantity_str overwrites quantity. + */ + public function setQuantityStr(string $quantity_str): void + { + $this->data['quantity_str'] = $quantity_str; + } + + public function getQuantityStr(): string + { + return $this->attr('quantity_str'); + } + + public function setUnit(?string $unit): void + { + $this->data['unit'] = $unit; + } + + public function getUnit(): ?string + { + return $this->attr('unit'); + } + + /** + * @enum ["POSITION","POSITION_NOCALC","TEXT"] + */ + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + /** + * @enum ["POSITION","POSITION_NOCALC","TEXT"] + */ + public function getType(): string + { + return $this->attr('type'); + } + + /** + * Automatic by default (first item: 1, second item: 2, ...). + */ + public function setPosition(int $position): void + { + $this->data['position'] = $position; + } + + public function getPosition(): int + { + return $this->attr('position'); + } + + public function setSinglePriceNet(?float $single_price_net): void + { + $this->data['single_price_net'] = $single_price_net; + } + + public function getSinglePriceNet(): ?float + { + return $this->attr('single_price_net'); + } + + public function setSinglePriceGross(float $single_price_gross): void + { + $this->data['single_price_gross'] = $single_price_gross; + } + + public function getSinglePriceGross(): float + { + return $this->attr('single_price_gross'); + } + + public function setVatPercent(float $vat_percent): void + { + $this->data['vat_percent'] = $vat_percent; + } + + public function getVatPercent(): float + { + return $this->attr('vat_percent'); + } + + public function setDiscount(?float $discount): void + { + $this->data['discount'] = $discount; + } + + public function getDiscount(): ?float + { + return $this->attr('discount'); + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function setDiscountType(?string $discount_type): void + { + $this->data['discount_type'] = $discount_type; + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function getDiscountType(): ?string + { + return $this->attr('discount_type'); + } + + /** + * If set, values are copied from the referenced position. + */ + public function setPositionId(?int $position_id): void + { + $this->data['position_id'] = $position_id; + } + + public function getPositionId(): ?int + { + return $this->attr('position_id'); + } + + public function getTotalPriceNet(): float + { + return $this->attr('total_price_net'); + } + + public function getTotalPriceGross(): float + { + return $this->attr('total_price_gross'); + } + + public function getTotalVat(): float + { + return $this->attr('total_vat'); + } + + public function getSerialNumberId(): string + { + return $this->attr('serial_number_id'); + } + + public function getSerialNumber(): string + { + return $this->attr('serial_number'); + } + + public function setBookingAccount(?string $booking_account): void + { + $this->data['booking_account'] = $booking_account; + } + + public function getBookingAccount(): ?string + { + return $this->attr('booking_account'); + } + + public function setExportCost1(?string $export_cost_1): void + { + $this->data['export_cost_1'] = $export_cost_1; + } + + public function getExportCost1(): ?string + { + return $this->attr('export_cost_1'); + } + + public function setExportCost2(?string $export_cost_2): void + { + $this->data['export_cost_2'] = $export_cost_2; + } + + public function getExportCost2(): ?string + { + return $this->attr('export_cost_2'); + } + + public function setCostPriceNet(?float $cost_price_net): void + { + $this->data['cost_price_net'] = $cost_price_net; + } + + public function getCostPriceNet(): ?float + { + return $this->attr('cost_price_net'); + } + + public function getCostPriceTotal(): float + { + return $this->attr('cost_price_total'); + } + + public function getCostPriceCharge(): float + { + return $this->attr('cost_price_charge'); + } + + /** + * @enum ["PERCENT","AMOUNT"] + */ + public function getCostPriceChargeType(): string + { + return $this->attr('cost_price_charge_type'); + } + + /** + * @enum ["PRODUCT","SERVICE","UNDEFINED"] + */ + public function setItemType(string $itemType): void + { + $this->data['itemType'] = $itemType; + } + + /** + * @enum ["PRODUCT","SERVICE","UNDEFINED"] + */ + public function getItemType(): string + { + return $this->attr('itemType'); + } + + public function getId(): int + { + return $this->attr('id'); + } +} diff --git a/src/Models/DocumentRecurring.php b/src/Models/DocumentRecurring.php new file mode 100644 index 0000000..d2a662f --- /dev/null +++ b/src/Models/DocumentRecurring.php @@ -0,0 +1,260 @@ +data = $data; + } + + /** + * Must be in the future. + */ + public function setNextDate(\DateTimeImmutable $next_date): void + { + $this->data['next_date'] = $next_date; + } + + public function getNextDate(): \DateTimeImmutable + { + return $this->attrDate('next_date'); + } + + /** + * @enum ["DAILY","WEEKLY","MONTHLY","YEARLY"] + */ + public function setFrequency(string $frequency): void + { + $this->data['frequency'] = $frequency; + } + + /** + * @enum ["DAILY","WEEKLY","MONTHLY","YEARLY"] + */ + public function getFrequency(): string + { + return $this->attr('frequency'); + } + + /** + * @enum ["LASTDAYOFMONTH"] + */ + public function setFrequencySpecial(?string $frequency_special): void + { + $this->data['frequency_special'] = $frequency_special; + } + + /** + * @enum ["LASTDAYOFMONTH"] + */ + public function getFrequencySpecial(): ?string + { + return $this->attr('frequency_special'); + } + + public function setInterval(int $interval): void + { + $this->data['interval'] = $interval; + } + + public function getInterval(): int + { + return $this->attr('interval'); + } + + /** + * Date of last exectution day or number of times to exectute. + */ + public function setEndDateOrCount(?string $end_date_or_count): void + { + $this->data['end_date_or_count'] = $end_date_or_count; + } + + public function getEndDateOrCount(): ?string + { + return $this->attr('end_date_or_count'); + } + + /** + * @enum ["RUNNING","PAUSE","STOP","WAITING"] + */ + public function setStatus(string $status): void + { + $this->data['status'] = $status; + } + + /** + * @enum ["RUNNING","PAUSE","STOP","WAITING"] + */ + public function getStatus(): string + { + return $this->attr('status'); + } + + public function setAsDraft(bool $as_draft): void + { + $this->data['as_draft'] = $as_draft; + } + + public function getAsDraft(): bool + { + return $this->attr('as_draft'); + } + + public function setIsNotify(bool $is_notify): void + { + $this->data['is_notify'] = $is_notify; + } + + public function getIsNotify(): bool + { + return $this->attr('is_notify'); + } + + /** + * @enum ["EMAIL","FAX","POST"] + */ + public function setSendAs(?string $send_as): void + { + $this->data['send_as'] = $send_as; + } + + /** + * @enum ["EMAIL","FAX","POST"] + */ + public function getSendAs(): ?string + { + return $this->attr('send_as'); + } + + public function setIsSign(bool $is_sign): void + { + $this->data['is_sign'] = $is_sign; + } + + public function getIsSign(): bool + { + return $this->attr('is_sign'); + } + + public function setIsPaid(bool $is_paid): void + { + $this->data['is_paid'] = $is_paid; + } + + public function getIsPaid(): bool + { + return $this->attr('is_paid'); + } + + /** + * Option is used to determine what date is used for the payment if is_paid is true. "next_valid_date" selects the next workday in regards to the created date of the document if the date falls on a saturday or sunday. + * + * @enum ["created_date","due_date","next_valid_date"] + */ + public function setPaidDateOption(string $paid_date_option): void + { + $this->data['paid_date_option'] = $paid_date_option; + } + + /** + * @enum ["created_date","due_date","next_valid_date"] + */ + public function getPaidDateOption(): string + { + return $this->attr('paid_date_option'); + } + + public function setIsSepa(bool $is_sepa): void + { + $this->data['is_sepa'] = $is_sepa; + } + + public function getIsSepa(): bool + { + return $this->attr('is_sepa'); + } + + /** + * @enum ["CORE","COR1","B2B"] + */ + public function setSepaLocalInstrument(?string $sepa_local_instrument): void + { + $this->data['sepa_local_instrument'] = $sepa_local_instrument; + } + + /** + * @enum ["CORE","COR1","B2B"] + */ + public function getSepaLocalInstrument(): ?string + { + return $this->attr('sepa_local_instrument'); + } + + /** + * @enum ["FRST","OOFF","FNAL","RCUR"] + */ + public function setSepaSequenceType(?string $sepa_sequence_type): void + { + $this->data['sepa_sequence_type'] = $sepa_sequence_type; + } + + /** + * @enum ["FRST","OOFF","FNAL","RCUR"] + */ + public function getSepaSequenceType(): ?string + { + return $this->attr('sepa_sequence_type'); + } + + public function setSepaReference(?string $sepa_reference): void + { + $this->data['sepa_reference'] = $sepa_reference; + } + + public function getSepaReference(): ?string + { + return $this->attr('sepa_reference'); + } + + public function setSepaRemittanceInformation(?string $sepa_remittance_information): void + { + $this->data['sepa_remittance_information'] = $sepa_remittance_information; + } + + public function getSepaRemittanceInformation(): ?string + { + return $this->attr('sepa_remittance_information'); + } + + /** + * The document type that will be generated. Can not be changed on existing documents. + * + * @enum ["INVOICE","CREDIT","ORDER","OFFER"] + */ + public function setTargetType(string $target_type): void + { + $this->data['target_type'] = $target_type; + } + + /** + * @enum ["INVOICE","CREDIT","ORDER","OFFER"] + */ + public function getTargetType(): string + { + return $this->attr('target_type'); + } +} diff --git a/src/Models/Login.php b/src/Models/Login.php new file mode 100644 index 0000000..dbd62ef --- /dev/null +++ b/src/Models/Login.php @@ -0,0 +1,127 @@ +data = $data; + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setFirstName(string $first_name): void + { + $this->data['first_name'] = $first_name; + } + + public function getFirstName(): string + { + return $this->attr('first_name'); + } + + public function setLastName(string $last_name): void + { + $this->data['last_name'] = $last_name; + } + + public function getLastName(): string + { + return $this->attr('last_name'); + } + + public function getDisplayName(): string + { + return $this->attr('display_name'); + } + + public function setPhone(string $phone): void + { + $this->data['phone'] = $phone; + } + + public function getPhone(): string + { + return $this->attr('phone'); + } + + public function setEmail(string $email): void + { + $this->data['email'] = $email; + } + + public function getEmail(): string + { + return $this->attr('email'); + } + + public function setEmailSignature(string $email_signature): void + { + $this->data['email_signature'] = $email_signature; + } + + public function getEmailSignature(): string + { + return $this->attr('email_signature'); + } + + /** + * @enum ["ADMIN","ASSISTANT"] + */ + public function setLoginType(string $login_type): void + { + $this->data['login_type'] = $login_type; + } + + /** + * @enum ["ADMIN","ASSISTANT"] + */ + public function getLoginType(): string + { + return $this->attr('login_type'); + } + + public function setLocale(string $locale): void + { + $this->data['locale'] = $locale; + } + + public function getLocale(): string + { + return $this->attr('locale'); + } + + public function setTimeZone(string $time_zone): void + { + $this->data['time_zone'] = $time_zone; + } + + public function getTimeZone(): string + { + return $this->attr('time_zone'); + } + + public function setSecurity(LoginSecurity $security): void + { + $this->data['security'] = $security; + } + + public function getSecurity(): LoginSecurity + { + return $this->attrInstance('security', \Easybill\SDK\Models\LoginSecurity::class); + } +} diff --git a/src/Models/LoginSecurity.php b/src/Models/LoginSecurity.php new file mode 100644 index 0000000..b8f9990 --- /dev/null +++ b/src/Models/LoginSecurity.php @@ -0,0 +1,37 @@ +data = $data; + } + + public function getTwoFactorEnabled(): bool + { + return $this->attr('two_factor_enabled'); + } + + public function getRecoveryCodesEnabled(): bool + { + return $this->attr('recovery_codes_enabled'); + } + + public function getNotifyOnNewLoginEnabled(): bool + { + return $this->attr('notify_on_new_login_enabled'); + } +} diff --git a/src/Models/PDFTemplate.php b/src/Models/PDFTemplate.php new file mode 100644 index 0000000..314ceec --- /dev/null +++ b/src/Models/PDFTemplate.php @@ -0,0 +1,61 @@ +data = $data; + } + + public function setId(string $id): void + { + $this->data['id'] = $id; + } + + public function getId(): string + { + return $this->attr('id'); + } + + public function setName(string $name): void + { + $this->data['name'] = $name; + } + + public function getName(): string + { + return $this->attr('name'); + } + + public function setPdfTemplate(string $pdf_template): void + { + $this->data['pdf_template'] = $pdf_template; + } + + public function getPdfTemplate(): string + { + return $this->attr('pdf_template'); + } + + public function setDocumentType(string $document_type): void + { + $this->data['document_type'] = $document_type; + } + + public function getDocumentType(): string + { + return $this->attr('document_type'); + } +} diff --git a/src/Models/Position.php b/src/Models/Position.php new file mode 100644 index 0000000..c87e2ca --- /dev/null +++ b/src/Models/Position.php @@ -0,0 +1,405 @@ +data = $data; + } + + public function getId(): int + { + return $this->attr('id'); + } + + /** + * @enum ["PRODUCT","SERVICE","TEXT"] + */ + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + /** + * @enum ["PRODUCT","SERVICE","TEXT"] + */ + public function getType(): string + { + return $this->attr('type'); + } + + public function setNumber(string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): string + { + return $this->attr('number'); + } + + /** + * The positions name or description. + */ + public function setDescription(string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): string + { + return $this->attr('description'); + } + + /** + * This field can be used in the document text areas with the liquid placeholder {{document.item_notes}}. Every note is only displayed once for every kind of product. This is useful if you want to add something like an instruction. + */ + public function setDocumentNote(string $document_note): void + { + $this->data['document_note'] = $document_note; + } + + public function getDocumentNote(): string + { + return $this->attr('document_note'); + } + + /** + * Note for internal use. + */ + public function setNote(?string $note): void + { + $this->data['note'] = $note; + } + + public function getNote(): ?string + { + return $this->attr('note'); + } + + public function setUnit(?string $unit): void + { + $this->data['unit'] = $unit; + } + + public function getUnit(): ?string + { + return $this->attr('unit'); + } + + /** + * The FAS-Account is the four-digit revenue account, in which the revenue will be entered when doing the export to your tax consultant. In case you want to split your revenue to several revenue accounts, please talk to your tax consultant before, to guarantee an unobstructed use of the interface. For every revenue element, there are number ranges, which can be used. Please avoid using combinations of numbers, which can not be used by your tax consultant. + */ + public function setExportIdentifier(?string $export_identifier): void + { + $this->data['export_identifier'] = $export_identifier; + } + + public function getExportIdentifier(): ?string + { + return $this->attr('export_identifier'); + } + + public function setExportIdentifierExtended(PositionExportIdentifierExtended $export_identifier_extended): void + { + $this->data['export_identifier_extended'] = $export_identifier_extended; + } + + public function getExportIdentifierExtended(): PositionExportIdentifierExtended + { + return $this->attrInstance('export_identifier_extended', \Easybill\SDK\Models\PositionExportIdentifierExtended::class); + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + /** + * @enum ["BRUTTO","NETTO"] + */ + public function setPriceType(string $price_type): void + { + $this->data['price_type'] = $price_type; + } + + /** + * @enum ["BRUTTO","NETTO"] + */ + public function getPriceType(): string + { + return $this->attr('price_type'); + } + + public function setVatPercent(float $vat_percent): void + { + $this->data['vat_percent'] = $vat_percent; + } + + public function getVatPercent(): float + { + return $this->attr('vat_percent'); + } + + /** + * Price in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice(float $sale_price): void + { + $this->data['sale_price'] = $sale_price; + } + + public function getSalePrice(): float + { + return $this->attr('sale_price'); + } + + /** + * Price for customers of group 2 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice2(?float $sale_price2): void + { + $this->data['sale_price2'] = $sale_price2; + } + + public function getSalePrice2(): ?float + { + return $this->attr('sale_price2'); + } + + /** + * Price for customers of group 3 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice3(?float $sale_price3): void + { + $this->data['sale_price3'] = $sale_price3; + } + + public function getSalePrice3(): ?float + { + return $this->attr('sale_price3'); + } + + /** + * Price for customers of group 4 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice4(?float $sale_price4): void + { + $this->data['sale_price4'] = $sale_price4; + } + + public function getSalePrice4(): ?float + { + return $this->attr('sale_price4'); + } + + /** + * Price for customers of group 5 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice5(?float $sale_price5): void + { + $this->data['sale_price5'] = $sale_price5; + } + + public function getSalePrice5(): ?float + { + return $this->attr('sale_price5'); + } + + /** + * Price for customers of group 6 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice6(?float $sale_price6): void + { + $this->data['sale_price6'] = $sale_price6; + } + + public function getSalePrice6(): ?float + { + return $this->attr('sale_price6'); + } + + /** + * Price for customers of group 7 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice7(?float $sale_price7): void + { + $this->data['sale_price7'] = $sale_price7; + } + + public function getSalePrice7(): ?float + { + return $this->attr('sale_price7'); + } + + /** + * Price for customers of group 8 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice8(?float $sale_price8): void + { + $this->data['sale_price8'] = $sale_price8; + } + + public function getSalePrice8(): ?float + { + return $this->attr('sale_price8'); + } + + /** + * Price for customers of group 9 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice9(?float $sale_price9): void + { + $this->data['sale_price9'] = $sale_price9; + } + + public function getSalePrice9(): ?float + { + return $this->attr('sale_price9'); + } + + /** + * Price for customers of group 10 in cents (e.g. "150" = 1.50€). + */ + public function setSalePrice10(?float $sale_price10): void + { + $this->data['sale_price10'] = $sale_price10; + } + + public function getSalePrice10(): ?float + { + return $this->attr('sale_price10'); + } + + /** + * Price in cents (e.g. "150" = 1.50€). + */ + public function setCostPrice(?float $cost_price): void + { + $this->data['cost_price'] = $cost_price; + } + + public function getCostPrice(): ?float + { + return $this->attr('cost_price'); + } + + public function setExportCost1(?string $export_cost1): void + { + $this->data['export_cost1'] = $export_cost1; + } + + public function getExportCost1(): ?string + { + return $this->attr('export_cost1'); + } + + public function setExportCost2(?string $export_cost2): void + { + $this->data['export_cost2'] = $export_cost2; + } + + public function getExportCost2(): ?string + { + return $this->attr('export_cost2'); + } + + public function setGroupId(?int $group_id): void + { + $this->data['group_id'] = $group_id; + } + + public function getGroupId(): ?int + { + return $this->attr('group_id'); + } + + /** + * Activates stock management for this position. + * + * @enum ["YES","NO"] + */ + public function setStock(string $stock): void + { + $this->data['stock'] = $stock; + } + + /** + * @enum ["YES","NO"] + */ + public function getStock(): string + { + return $this->attr('stock'); + } + + public function getStockCount(): int + { + return $this->attr('stock_count'); + } + + /** + * Notify when stock_count is lower than stock_limit. + */ + public function setStockLimitNotify(bool $stock_limit_notify): void + { + $this->data['stock_limit_notify'] = $stock_limit_notify; + } + + public function getStockLimitNotify(): bool + { + return $this->attr('stock_limit_notify'); + } + + /** + * Notify frequency when stock_count is lower than stock_limit (ALWAYS, ONCE). + * + * @enum ["ALWAYS","ONCE"] + */ + public function setStockLimitNotifyFrequency(string $stock_limit_notify_frequency): void + { + $this->data['stock_limit_notify_frequency'] = $stock_limit_notify_frequency; + } + + /** + * @enum ["ALWAYS","ONCE"] + */ + public function getStockLimitNotifyFrequency(): string + { + return $this->attr('stock_limit_notify_frequency'); + } + + public function setStockLimit(int $stock_limit): void + { + $this->data['stock_limit'] = $stock_limit; + } + + public function getStockLimit(): int + { + return $this->attr('stock_limit'); + } + + /** + * Used as the default quantity when adding this position to a document. + */ + public function setQuantity(?float $quantity): void + { + $this->data['quantity'] = $quantity; + } + + public function getQuantity(): ?float + { + return $this->attr('quantity'); + } +} diff --git a/src/Models/PositionExportIdentifierExtended.php b/src/Models/PositionExportIdentifierExtended.php new file mode 100644 index 0000000..acaa8b9 --- /dev/null +++ b/src/Models/PositionExportIdentifierExtended.php @@ -0,0 +1,151 @@ +data = $data; + } + + /** + * Umsatzsteuerpflichtig. + */ + public function setNULL(?string $NULL): void + { + $this->data['NULL'] = $NULL; + } + + public function getNULL(): ?string + { + return $this->attr('NULL'); + } + + /** + * Nicht steuerbar (Drittland). + */ + public function setNStb(?string $nStb): void + { + $this->data['nStb'] = $nStb; + } + + public function getNStb(): ?string + { + return $this->attr('nStb'); + } + + /** + * Nicht steuerbar (EU mit USt-IdNr.). + */ + public function setNStbUstID(?string $nStbUstID): void + { + $this->data['nStbUstID'] = $nStbUstID; + } + + public function getNStbUstID(): ?string + { + return $this->attr('nStbUstID'); + } + + /** + * Nicht steuerbar (EU ohne USt-IdNr.). + */ + public function setNStbNoneUstID(?string $nStbNoneUstID): void + { + $this->data['nStbNoneUstID'] = $nStbNoneUstID; + } + + public function getNStbNoneUstID(): ?string + { + return $this->attr('nStbNoneUstID'); + } + + /** + * Nicht steuerbarer Innenumsatz. + */ + public function setNStbIm(?string $nStbIm): void + { + $this->data['nStbIm'] = $nStbIm; + } + + public function getNStbIm(): ?string + { + return $this->attr('nStbIm'); + } + + /** + * Steuerschuldwechsel §13b (Inland). + */ + public function setRevc(?string $revc): void + { + $this->data['revc'] = $revc; + } + + public function getRevc(): ?string + { + return $this->attr('revc'); + } + + /** + * Innergemeinschaftliche Lieferung. + */ + public function setIG(?string $IG): void + { + $this->data['IG'] = $IG; + } + + public function getIG(): ?string + { + return $this->attr('IG'); + } + + /** + * Ausfuhrlieferung. + */ + public function setAL(?string $AL): void + { + $this->data['AL'] = $AL; + } + + public function getAL(): ?string + { + return $this->attr('AL'); + } + + /** + * sonstige Steuerbefreiung. + */ + public function setSStfr(?string $sStfr): void + { + $this->data['sStfr'] = $sStfr; + } + + public function getSStfr(): ?string + { + return $this->attr('sStfr'); + } + + /** + * Kleinunternehmen (Keine MwSt.). + */ + public function setSmallBusiness(?string $smallBusiness): void + { + $this->data['smallBusiness'] = $smallBusiness; + } + + public function getSmallBusiness(): ?string + { + return $this->attr('smallBusiness'); + } +} diff --git a/src/Models/PositionGroup.php b/src/Models/PositionGroup.php new file mode 100644 index 0000000..e225356 --- /dev/null +++ b/src/Models/PositionGroup.php @@ -0,0 +1,66 @@ +data = $data; + } + + public function setDescription(?string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): ?string + { + return $this->attr('description'); + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + public function setName(string $name): void + { + $this->data['name'] = $name; + } + + public function getName(): string + { + return $this->attr('name'); + } + + public function setNumber(string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): string + { + return $this->attr('number'); + } + + public function getDisplayName(): string + { + return $this->attr('display_name'); + } + + public function getId(): int + { + return $this->attr('id'); + } +} diff --git a/src/Models/PostBox.php b/src/Models/PostBox.php new file mode 100644 index 0000000..dc9d2d7 --- /dev/null +++ b/src/Models/PostBox.php @@ -0,0 +1,230 @@ +data = $data; + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setDocumentId(int $document_id): void + { + $this->data['document_id'] = $document_id; + } + + public function getDocumentId(): int + { + return $this->attr('document_id'); + } + + public function setTo(string $to): void + { + $this->data['to'] = $to; + } + + public function getTo(): string + { + return $this->attr('to'); + } + + public function setCc(string $cc): void + { + $this->data['cc'] = $cc; + } + + public function getCc(): string + { + return $this->attr('cc'); + } + + public function setFrom(string $from): void + { + $this->data['from'] = $from; + } + + public function getFrom(): string + { + return $this->attr('from'); + } + + public function setSubject(string $subject): void + { + $this->data['subject'] = $subject; + } + + public function getSubject(): string + { + return $this->attr('subject'); + } + + public function setMessage(string $message): void + { + $this->data['message'] = $message; + } + + public function getMessage(): string + { + return $this->attr('message'); + } + + public function setDate(\DateTimeImmutable $date): void + { + $this->data['date'] = $date; + } + + public function getDate(): \DateTimeImmutable + { + return $this->attrDate('date'); + } + + public function setCreatedAt(\DateTimeImmutable $created_at): void + { + $this->data['created_at'] = $created_at; + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDateTime('created_at'); + } + + public function setProcessedAt(\DateTimeImmutable $processed_at): void + { + $this->data['processed_at'] = $processed_at; + } + + public function getProcessedAt(): \DateTimeImmutable + { + return $this->attrDateTime('processed_at'); + } + + public function setSendBySelf(bool $send_by_self): void + { + $this->data['send_by_self'] = $send_by_self; + } + + public function getSendBySelf(): bool + { + return $this->attr('send_by_self'); + } + + public function setSendWithAttachment(bool $send_with_attachment): void + { + $this->data['send_with_attachment'] = $send_with_attachment; + } + + public function getSendWithAttachment(): bool + { + return $this->attr('send_with_attachment'); + } + + /** + * @enum ["FAX","EMAIL","POST"] + */ + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + /** + * @enum ["FAX","EMAIL","POST"] + */ + public function getType(): string + { + return $this->attr('type'); + } + + /** + * @enum ["WAITING","PREPARE","ERROR","OK","PROCESSING"] + */ + public function setStatus(string $status): void + { + $this->data['status'] = $status; + } + + /** + * @enum ["WAITING","PREPARE","ERROR","OK","PROCESSING"] + */ + public function getStatus(): string + { + return $this->attr('status'); + } + + public function setStatusMsg(string $status_msg): void + { + $this->data['status_msg'] = $status_msg; + } + + public function getStatusMsg(): string + { + return $this->attr('status_msg'); + } + + public function getLoginId(): int + { + return $this->attr('login_id'); + } + + /** + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function setDocumentFileType(?string $document_file_type): void + { + $this->data['document_file_type'] = $document_file_type; + } + + /** + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function getDocumentFileType(): ?string + { + return $this->attr('document_file_type'); + } + + /** + * This value indicates what method is used when the document is send via mail. + * The different types are offered by the german post as additional services. + * The registered mail options will include a tracking number which will be + * added to the postbox when known. + * + * If the value is omitted or empty when a postbox is created with the type "POST" + * post_send_type_standard will be used. + * + * For postbox with a different type than "POST" this field will hold a empty string. + * + * @enum ["post_send_type_standard","post_send_type_registered","post_send_type_registered_and_personal","post_send_type_registered_and_receipt","post_send_type_registered_throwin","post_send_type_prio"] + */ + public function setPostSendType(string $post_send_type): void + { + $this->data['post_send_type'] = $post_send_type; + } + + /** + * @enum ["post_send_type_standard","post_send_type_registered","post_send_type_registered_and_personal","post_send_type_registered_and_receipt","post_send_type_registered_throwin","post_send_type_prio"] + */ + public function getPostSendType(): string + { + return $this->attr('post_send_type'); + } + + public function getTrackingIdentifier(): string + { + return $this->attr('tracking_identifier'); + } +} diff --git a/src/Models/PostBoxRequest.php b/src/Models/PostBoxRequest.php new file mode 100644 index 0000000..e4da1b2 --- /dev/null +++ b/src/Models/PostBoxRequest.php @@ -0,0 +1,125 @@ +data = $data; + } + + public function setTo(string $to): void + { + $this->data['to'] = $to; + } + + public function getTo(): string + { + return $this->attr('to'); + } + + public function setCc(string $cc): void + { + $this->data['cc'] = $cc; + } + + public function getCc(): string + { + return $this->attr('cc'); + } + + public function setFrom(string $from): void + { + $this->data['from'] = $from; + } + + public function getFrom(): string + { + return $this->attr('from'); + } + + public function setSubject(string $subject): void + { + $this->data['subject'] = $subject; + } + + public function getSubject(): string + { + return $this->attr('subject'); + } + + public function setMessage(string $message): void + { + $this->data['message'] = $message; + } + + public function getMessage(): string + { + return $this->attr('message'); + } + + public function setDate(\DateTimeImmutable $date): void + { + $this->data['date'] = $date; + } + + public function getDate(): \DateTimeImmutable + { + return $this->attrDate('date'); + } + + /** + * When set to null, the setting on the customer is used. + * + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function setDocumentFileType(?string $document_file_type): void + { + $this->data['document_file_type'] = $document_file_type; + } + + /** + * @enum ["default","zugferd1","zugferd2","xrechnung","xrechnung_xml"] + */ + public function getDocumentFileType(): ?string + { + return $this->attr('document_file_type'); + } + + /** + * This value indicates what method is used when the document is send via mail. + * The different types are offered by the german post as additional services. + * The registered mail options will include a tracking number which will be + * added to the postbox when known. + * + * If the value is omitted or empty when a postbox is created with the type "POST" + * post_send_type_standard will be used. + * + * For postbox with a different type than "POST" this field will hold a empty string. + * + * @enum ["post_send_type_standard","post_send_type_registered","post_send_type_registered_and_personal","post_send_type_registered_and_receipt","post_send_type_registered_throwin","post_send_type_prio"] + */ + public function setPostSendType(string $post_send_type): void + { + $this->data['post_send_type'] = $post_send_type; + } + + /** + * @enum ["post_send_type_standard","post_send_type_registered","post_send_type_registered_and_personal","post_send_type_registered_and_receipt","post_send_type_registered_throwin","post_send_type_prio"] + */ + public function getPostSendType(): string + { + return $this->attr('post_send_type'); + } +} diff --git a/src/Models/Project.php b/src/Models/Project.php new file mode 100644 index 0000000..3d502fe --- /dev/null +++ b/src/Models/Project.php @@ -0,0 +1,160 @@ +data = $data; + } + + /** + * Project budget in cents (e.g. "150" = 1.50€). + */ + public function setBudgetAmount(int $budget_amount): void + { + $this->data['budget_amount'] = $budget_amount; + } + + public function getBudgetAmount(): int + { + return $this->attr('budget_amount'); + } + + /** + * Time budget in minutes (e.g. "90" = 1 hour and 30 minutes). + */ + public function setBudgetTime(int $budget_time): void + { + $this->data['budget_time'] = $budget_time; + } + + public function getBudgetTime(): int + { + return $this->attr('budget_time'); + } + + public function setCustomerId(?int $customer_id): void + { + $this->data['customer_id'] = $customer_id; + } + + public function getCustomerId(): ?int + { + return $this->attr('customer_id'); + } + + /** + * Hourly rate in cents (e.g. "150" = 1.50€). + */ + public function setHourlyRate(float $hourly_rate): void + { + $this->data['hourly_rate'] = $hourly_rate; + } + + public function getHourlyRate(): float + { + return $this->attr('hourly_rate'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + /** + * If omitted or null, the currently active login is used. + */ + public function setLoginId(?int $login_id): void + { + $this->data['login_id'] = $login_id; + } + + public function getLoginId(): ?int + { + return $this->attr('login_id'); + } + + public function setName(string $name): void + { + $this->data['name'] = $name; + } + + public function getName(): string + { + return $this->attr('name'); + } + + public function setNote(?string $note): void + { + $this->data['note'] = $note; + } + + public function getNote(): ?string + { + return $this->attr('note'); + } + + /** + * @enum ["OPEN","DONE","CANCEL"] + */ + public function setStatus(string $status): void + { + $this->data['status'] = $status; + } + + /** + * @enum ["OPEN","DONE","CANCEL"] + */ + public function getStatus(): string + { + return $this->attr('status'); + } + + public function setDueAt(?\DateTimeImmutable $due_at): void + { + $this->data['due_at'] = $due_at; + } + + public function getDueAt(): ?\DateTimeImmutable + { + return $this->attrDate('due_at'); + } + + /** + * @enum ["ALWAYS","ONCE","NEVER"] + */ + public function setBudgetNotifyFrequency(string $budget_notify_frequency): void + { + $this->data['budget_notify_frequency'] = $budget_notify_frequency; + } + + /** + * @enum ["ALWAYS","ONCE","NEVER"] + */ + public function getBudgetNotifyFrequency(): string + { + return $this->attr('budget_notify_frequency'); + } + + public function getConsumedTime(): int + { + return $this->attr('consumed_time'); + } + + public function getConsumedAmount(): int + { + return $this->attr('consumed_amount'); + } +} diff --git a/src/Models/SEPAPayment.php b/src/Models/SEPAPayment.php new file mode 100644 index 0000000..780cbc9 --- /dev/null +++ b/src/Models/SEPAPayment.php @@ -0,0 +1,299 @@ +data = $data; + } + + /** + * Amount in cents (e.g. "150" = 1.50€). + */ + public function setAmount(int $amount): void + { + $this->data['amount'] = $amount; + } + + public function getAmount(): int + { + return $this->attr('amount'); + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDateTime('created_at'); + } + + /** + * If type is DEBIT, this field is overwritten with the selected bank account data on export. + */ + public function setCreditorBic(?string $creditor_bic): void + { + $this->data['creditor_bic'] = $creditor_bic; + } + + public function getCreditorBic(): ?string + { + return $this->attr('creditor_bic'); + } + + /** + * Mandatory if type is CREDIT. If type is DEBIT, this field is overwritten with the selected bank account data on export. + */ + public function setCreditorIban(?string $creditor_iban): void + { + $this->data['creditor_iban'] = $creditor_iban; + } + + public function getCreditorIban(): ?string + { + return $this->attr('creditor_iban'); + } + + /** + * Mandatory if type is CREDIT. If type is DEBIT, this field is overwritten with the selected bank account data on export. + */ + public function setCreditorName(?string $creditor_name): void + { + $this->data['creditor_name'] = $creditor_name; + } + + public function getCreditorName(): ?string + { + return $this->attr('creditor_name'); + } + + /** + * If type is CREDIT, this field is overwritten with the selected bank account data on export. + */ + public function setDebitorBic(?string $debitor_bic): void + { + $this->data['debitor_bic'] = $debitor_bic; + } + + public function getDebitorBic(): ?string + { + return $this->attr('debitor_bic'); + } + + /** + * Mandatory if type is DEBIT. If type is CREDIT, this field is overwritten with the selected bank account data on export. + */ + public function setDebitorIban(?string $debitor_iban): void + { + $this->data['debitor_iban'] = $debitor_iban; + } + + public function getDebitorIban(): ?string + { + return $this->attr('debitor_iban'); + } + + /** + * Mandatory if type is DEBIT. If type is CREDIT, this field is overwritten with the selected bank account data on export. + */ + public function setDebitorName(?string $debitor_name): void + { + $this->data['debitor_name'] = $debitor_name; + } + + public function getDebitorName(): ?string + { + return $this->attr('debitor_name'); + } + + /** + * Mandatory if type is DEBIT and the debitor's IBAN belongs to a country outside the EEA. + */ + public function setDebitorAddressLine1(string $debitor_address_line_1): void + { + $this->data['debitor_address_line_1'] = $debitor_address_line_1; + } + + public function getDebitorAddressLine1(): string + { + return $this->attr('debitor_address_line_1'); + } + + /** + * string. + */ + public function setDebitorAddressLine2(string $debitor_address_line2): void + { + $this->data['debitor_address_line2'] = $debitor_address_line2; + } + + public function getDebitorAddressLine2(): string + { + return $this->attr('debitor_address_line2'); + } + + /** + * Mandatory if type is DEBIT and the debitor's IBAN belongs to a country outside the EEA. + */ + public function setDebitorCountry(string $debitor_country): void + { + $this->data['debitor_country'] = $debitor_country; + } + + public function getDebitorCountry(): string + { + return $this->attr('debitor_country'); + } + + public function setDocumentId(int $document_id): void + { + $this->data['document_id'] = $document_id; + } + + public function getDocumentId(): int + { + return $this->attr('document_id'); + } + + /** + * If a date is set, this record is marked as exported. + */ + public function setExportAt(?\DateTimeImmutable $export_at): void + { + $this->data['export_at'] = $export_at; + } + + public function getExportAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('export_at'); + } + + public function getExportError(): string + { + return $this->attr('export_error'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + /** + * CORE: SEPA Core Direct Debit
COR1: SEPA-Basislastschrift COR1
B2B: SEPA Business to Business Direct Debit. + * + * @enum ["CORE","COR1","B2B"] + */ + public function setLocalInstrument(string $local_instrument): void + { + $this->data['local_instrument'] = $local_instrument; + } + + /** + * @enum ["CORE","COR1","B2B"] + */ + public function getLocalInstrument(): string + { + return $this->attr('local_instrument'); + } + + public function setMandateDateOfSignature(\DateTimeImmutable $mandate_date_of_signature): void + { + $this->data['mandate_date_of_signature'] = $mandate_date_of_signature; + } + + public function getMandateDateOfSignature(): \DateTimeImmutable + { + return $this->attrDate('mandate_date_of_signature'); + } + + public function setMandateId(string $mandate_id): void + { + $this->data['mandate_id'] = $mandate_id; + } + + public function getMandateId(): string + { + return $this->attr('mandate_id'); + } + + public function setReference(string $reference): void + { + $this->data['reference'] = $reference; + } + + public function getReference(): string + { + return $this->attr('reference'); + } + + public function setRemittanceInformation(?string $remittance_information): void + { + $this->data['remittance_information'] = $remittance_information; + } + + public function getRemittanceInformation(): ?string + { + return $this->attr('remittance_information'); + } + + /** + * Booking date. + */ + public function setRequestedAt(\DateTimeImmutable $requested_at): void + { + $this->data['requested_at'] = $requested_at; + } + + public function getRequestedAt(): \DateTimeImmutable + { + return $this->attrDate('requested_at'); + } + + /** + * FRST: Erstlastschrift
RCUR: Folgelastschrift
OOFF: Einmallastschrift
FNAL: Letztmalige Lastschrift. + * + * @enum ["FRST","OOFF","FNAL","RCUR"] + */ + public function setSequenceType(string $sequence_type): void + { + $this->data['sequence_type'] = $sequence_type; + } + + /** + * @enum ["FRST","OOFF","FNAL","RCUR"] + */ + public function getSequenceType(): string + { + return $this->attr('sequence_type'); + } + + public function getUpdatedAt(): string + { + return $this->attr('updated_at'); + } + + /** + * @enum ["DEBIT","CREDIT"] + */ + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + /** + * @enum ["DEBIT","CREDIT"] + */ + public function getType(): string + { + return $this->attr('type'); + } +} diff --git a/src/Models/SerialNumber.php b/src/Models/SerialNumber.php new file mode 100644 index 0000000..33f6441 --- /dev/null +++ b/src/Models/SerialNumber.php @@ -0,0 +1,66 @@ +data = $data; + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setSerialNumber(string $serial_number): void + { + $this->data['serial_number'] = $serial_number; + } + + public function getSerialNumber(): string + { + return $this->attr('serial_number'); + } + + public function setPositionId(int $position_id): void + { + $this->data['position_id'] = $position_id; + } + + public function getPositionId(): int + { + return $this->attr('position_id'); + } + + public function getDocumentId(): ?int + { + return $this->attr('document_id'); + } + + public function getDocumentPositionId(): ?int + { + return $this->attr('document_position_id'); + } + + public function getUsedAt(): ?string + { + return $this->attr('used_at'); + } + + public function getCreatedAt(): string + { + return $this->attr('created_at'); + } +} diff --git a/src/Models/ServiceDate.php b/src/Models/ServiceDate.php new file mode 100644 index 0000000..daea422 --- /dev/null +++ b/src/Models/ServiceDate.php @@ -0,0 +1,80 @@ +data = $data; + } + + /** + * With DEFAULT no other fields are required and this message will be printed: 'Invoice date coincides with the time of supply'.
For SERVICE or DELIVERY exactly one of the following fields must be set: date, date_from and date_to or text. + * + * @enum ["DEFAULT","SERVICE","DELIVERY"] + */ + public function setType(string $type): void + { + $this->data['type'] = $type; + } + + /** + * @enum ["DEFAULT","SERVICE","DELIVERY"] + */ + public function getType(): string + { + return $this->attr('type'); + } + + public function setDate(?\DateTimeImmutable $date): void + { + $this->data['date'] = $date; + } + + public function getDate(): ?\DateTimeImmutable + { + return $this->attrDate('date'); + } + + public function setDateFrom(?\DateTimeImmutable $date_from): void + { + $this->data['date_from'] = $date_from; + } + + public function getDateFrom(): ?\DateTimeImmutable + { + return $this->attrDate('date_from'); + } + + public function setDateTo(?\DateTimeImmutable $date_to): void + { + $this->data['date_to'] = $date_to; + } + + public function getDateTo(): ?\DateTimeImmutable + { + return $this->attrDate('date_to'); + } + + public function setText(?string $text): void + { + $this->data['text'] = $text; + } + + public function getText(): ?string + { + return $this->attr('text'); + } +} diff --git a/src/Models/Stock.php b/src/Models/Stock.php new file mode 100644 index 0000000..bd86d52 --- /dev/null +++ b/src/Models/Stock.php @@ -0,0 +1,86 @@ +data = $data; + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setNote(string $note): void + { + $this->data['note'] = $note; + } + + public function getNote(): string + { + return $this->attr('note'); + } + + public function setStockCount(int $stock_count): void + { + $this->data['stock_count'] = $stock_count; + } + + public function getStockCount(): int + { + return $this->attr('stock_count'); + } + + public function setPositionId(int $position_id): void + { + $this->data['position_id'] = $position_id; + } + + public function getPositionId(): int + { + return $this->attr('position_id'); + } + + public function getDocumentId(): ?int + { + return $this->attr('document_id'); + } + + public function getDocumentPositionId(): ?int + { + return $this->attr('document_position_id'); + } + + public function setStoredAt(?string $stored_at): void + { + $this->data['stored_at'] = $stored_at; + } + + public function getStoredAt(): ?string + { + return $this->attr('stored_at'); + } + + public function getCreatedAt(): string + { + return $this->attr('created_at'); + } + + public function getUpdatedAt(): string + { + return $this->attr('updated_at'); + } +} diff --git a/src/Models/Task.php b/src/Models/Task.php new file mode 100644 index 0000000..5e895e3 --- /dev/null +++ b/src/Models/Task.php @@ -0,0 +1,203 @@ +data = $data; + } + + /** + * @enum ["CALL","EMAIL","FAX","LUNCH","MEETING","TRAVEL","CUSTOM"] + */ + public function setCategory(?string $category): void + { + $this->data['category'] = $category; + } + + /** + * @enum ["CALL","EMAIL","FAX","LUNCH","MEETING","TRAVEL","CUSTOM"] + */ + public function getCategory(): ?string + { + return $this->attr('category'); + } + + /** + * The name of your custom category. Can only have a value if "category" is "CUSTOM". + */ + public function setCategoryCustom(?string $category_custom): void + { + $this->data['category_custom'] = $category_custom; + } + + public function getCategoryCustom(): ?string + { + return $this->attr('category_custom'); + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDateTime('created_at'); + } + + public function setCustomerId(?int $customer_id): void + { + $this->data['customer_id'] = $customer_id; + } + + public function getCustomerId(): ?int + { + return $this->attr('customer_id'); + } + + public function setDescription(?string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): ?string + { + return $this->attr('description'); + } + + public function setDocumentId(?int $document_id): void + { + $this->data['document_id'] = $document_id; + } + + public function getDocumentId(): ?int + { + return $this->attr('document_id'); + } + + /** + * The deadline. + */ + public function setEndAt(?\DateTimeImmutable $end_at): void + { + $this->data['end_at'] = $end_at; + } + + public function getEndAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('end_at'); + } + + public function getFinishAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('finish_at'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + /** + * When omitted or null, the currently active login is used. + */ + public function setLoginId(?int $login_id): void + { + $this->data['login_id'] = $login_id; + } + + public function getLoginId(): ?int + { + return $this->attr('login_id'); + } + + public function setName(string $name): void + { + $this->data['name'] = $name; + } + + public function getName(): string + { + return $this->attr('name'); + } + + public function setPositionId(?int $position_id): void + { + $this->data['position_id'] = $position_id; + } + + public function getPositionId(): ?int + { + return $this->attr('position_id'); + } + + /** + * @enum ["LOW","NORMAL","HIGH"] + */ + public function setPriority(string $priority): void + { + $this->data['priority'] = $priority; + } + + /** + * @enum ["LOW","NORMAL","HIGH"] + */ + public function getPriority(): string + { + return $this->attr('priority'); + } + + public function setProjectId(?int $project_id): void + { + $this->data['project_id'] = $project_id; + } + + public function getProjectId(): ?int + { + return $this->attr('project_id'); + } + + public function setStartAt(?\DateTimeImmutable $start_at): void + { + $this->data['start_at'] = $start_at; + } + + public function getStartAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('start_at'); + } + + /** + * @enum ["WAITING","PROCESSING","DONE","CANCEL"] + */ + public function setStatus(string $status): void + { + $this->data['status'] = $status; + } + + /** + * @enum ["WAITING","PROCESSING","DONE","CANCEL"] + */ + public function getStatus(): string + { + return $this->attr('status'); + } + + public function setStatusPercent(?int $status_percent): void + { + $this->data['status_percent'] = $status_percent; + } + + public function getStatusPercent(): ?int + { + return $this->attr('status_percent'); + } +} diff --git a/src/Models/TextTemplate.php b/src/Models/TextTemplate.php new file mode 100644 index 0000000..1b9cf09 --- /dev/null +++ b/src/Models/TextTemplate.php @@ -0,0 +1,51 @@ +data = $data; + } + + public function getCanModify(): bool + { + return $this->attr('can_modify'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setText(string $text): void + { + $this->data['text'] = $text; + } + + public function getText(): string + { + return $this->attr('text'); + } + + public function setTitle(string $title): void + { + $this->data['title'] = $title; + } + + public function getTitle(): string + { + return $this->attr('title'); + } +} diff --git a/src/Models/TimeTracking.php b/src/Models/TimeTracking.php new file mode 100644 index 0000000..cd21af2 --- /dev/null +++ b/src/Models/TimeTracking.php @@ -0,0 +1,153 @@ +data = $data; + } + + public function setClearedAt(?\DateTimeImmutable $cleared_at): void + { + $this->data['cleared_at'] = $cleared_at; + } + + public function getClearedAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('cleared_at'); + } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->attrDateTime('created_at'); + } + + public function setDateFromAt(?\DateTimeImmutable $date_from_at): void + { + $this->data['date_from_at'] = $date_from_at; + } + + public function getDateFromAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('date_from_at'); + } + + public function setDateThruAt(?\DateTimeImmutable $date_thru_at): void + { + $this->data['date_thru_at'] = $date_thru_at; + } + + public function getDateThruAt(): ?\DateTimeImmutable + { + return $this->attrDateTime('date_thru_at'); + } + + public function setDescription(string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): string + { + return $this->attr('description'); + } + + /** + * Hourly rate in cents (e.g. "150" = 1.50€). + */ + public function setHourlyRate(float $hourly_rate): void + { + $this->data['hourly_rate'] = $hourly_rate; + } + + public function getHourlyRate(): float + { + return $this->attr('hourly_rate'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setNote(?string $note): void + { + $this->data['note'] = $note; + } + + public function getNote(): ?string + { + return $this->attr('note'); + } + + /** + * Can be chosen freely. + */ + public function setNumber(?string $number): void + { + $this->data['number'] = $number; + } + + public function getNumber(): ?string + { + return $this->attr('number'); + } + + public function setPositionId(?int $position_id): void + { + $this->data['position_id'] = $position_id; + } + + public function getPositionId(): ?int + { + return $this->attr('position_id'); + } + + public function setProjectId(?int $project_id): void + { + $this->data['project_id'] = $project_id; + } + + public function getProjectId(): ?int + { + return $this->attr('project_id'); + } + + /** + * If omitted or null, the currently active login is used. + */ + public function setLoginId(?int $login_id): void + { + $this->data['login_id'] = $login_id; + } + + public function getLoginId(): ?int + { + return $this->attr('login_id'); + } + + /** + * Tracked time in minutes. + */ + public function setTimerValue(?int $timer_value): void + { + $this->data['timer_value'] = $timer_value; + } + + public function getTimerValue(): ?int + { + return $this->attr('timer_value'); + } +} diff --git a/src/Models/ToArrayInterface.php b/src/Models/ToArrayInterface.php new file mode 100644 index 0000000..92538b3 --- /dev/null +++ b/src/Models/ToArrayInterface.php @@ -0,0 +1,8 @@ + $this->toArrayMap($val), $this->data); + } + + protected function toArrayMap(mixed $val): mixed + { + if ($val instanceof ToArrayInterface) { + return $val->toArray(); + } + + if ($val instanceof \DateTimeInterface) { + return $val->format('Y-m-d H:i:s'); + } + + if (is_array($val)) { + return array_map(fn ($val1) => $this->toArrayMap($val1), $val); + } + + return $val; + } + + protected function attr(string $key): mixed + { + if (!array_key_exists($key, $this->data)) { + throw new \RuntimeException(sprintf('Attr "%s" not found in $data', $key)); + } + + return $this->data[$key]; + } + + protected function attrInstance(string $key, string $className): mixed + { + $data = $this->attr($key); + if ($data instanceof $className) { + return $data; + } + + return $this->data[$key] = new $className($data); + } + + protected function attrInstances(string $key, string $className): array + { + $data = $this->attr($key); + if (!is_array($data)) { + throw new \RuntimeException(sprintf('Attr "%s" not found an array.', $key)); + } + if ([] === $data) { + return $data; + } + + return $this->data[$key] = array_map(static fn (object|array $item): object => is_array($item) ? new $className($item) : $item, $data); + } + + protected function attrDate(string $key): ?\DateTimeImmutable + { + $data = $this->attr($key); + if ($data instanceof \DateTimeImmutable) { + return $data; + } + if (null === $data) { + return null; + } + + return $this->data[$key] = \DateTimeImmutable::createFromFormat('!Y-m-d', $data, new \DateTimeZone('Europe/Berlin')); + } + + protected function attrDateTime(string $key): ?\DateTimeImmutable + { + $data = $this->attr($key); + if ($data instanceof \DateTimeImmutable) { + return $data; + } + + if (null === $data) { + return null; + } + + return $this->data[$key] = \DateTimeImmutable::createFromFormat('!Y-m-d H:i:s', $data, new \DateTimeZone('Europe/Berlin')); + } +} diff --git a/src/Models/WebHook.php b/src/Models/WebHook.php new file mode 100644 index 0000000..c6678ef --- /dev/null +++ b/src/Models/WebHook.php @@ -0,0 +1,100 @@ +data = $data; + } + + /** + * @enum ["form","json"] + */ + public function setContentType(string $content_type): void + { + $this->data['content_type'] = $content_type; + } + + /** + * @enum ["form","json"] + */ + public function getContentType(): string + { + return $this->attr('content_type'); + } + + public function setDescription(string $description): void + { + $this->data['description'] = $description; + } + + public function getDescription(): string + { + return $this->attr('description'); + } + + public function setEvents(array $events): void + { + $this->data['events'] = $events; + } + + /** + * @return string[] + */ + public function getEvents(): array + { + return $this->attr('events'); + } + + public function getId(): int + { + return $this->attr('id'); + } + + public function setIsActive(bool $is_active): void + { + $this->data['is_active'] = $is_active; + } + + public function getIsActive(): bool + { + return $this->attr('is_active'); + } + + public function getLastResponse(): WebHookLastResponse + { + return $this->attrInstance('last_response', \Easybill\SDK\Models\WebHookLastResponse::class); + } + + public function setSecret(string $secret): void + { + $this->data['secret'] = $secret; + } + + public function getSecret(): string + { + return $this->attr('secret'); + } + + public function setUrl(string $url): void + { + $this->data['url'] = $url; + } + + public function getUrl(): string + { + return $this->attr('url'); + } +} diff --git a/src/Models/WebHookLastResponse.php b/src/Models/WebHookLastResponse.php new file mode 100644 index 0000000..f613a53 --- /dev/null +++ b/src/Models/WebHookLastResponse.php @@ -0,0 +1,36 @@ +data = $data; + } + + public function getDate(): \DateTimeImmutable + { + return $this->attrDateTime('date'); + } + + public function getCode(): int + { + return $this->attr('code'); + } + + public function getResponse(): string + { + return $this->attr('response'); + } +} diff --git a/tests/Models/CustomerTest.php b/tests/Models/CustomerTest.php new file mode 100644 index 0000000..e9f682c --- /dev/null +++ b/tests/Models/CustomerTest.php @@ -0,0 +1,37 @@ +setNumber('31337'); + $customer->setBirthDate(\DateTimeImmutable::createFromFormat('!Y-m-d', '1984-12-18')); + static::assertSame(['number' => '31337', 'birth_date' => '1984-12-18 00:00:00'], $customer->toArray()); + } + + public function testBirthDay(): void + { + static::assertNull((new Customer(['birth_date' => null]))->getBirthDate()); + static::assertInstanceOf(\DateTimeImmutable::class, (new Customer(['birth_date' => '1984-12-18']))->getBirthDate()); + static::assertSame('1984-12-18', (new Customer(['birth_date' => '1984-12-18']))->getBirthDate()->format('Y-m-d')); + static::assertSame('1984-12-18 00:00:00', (new Customer(['birth_date' => '1984-12-18']))->getBirthDate()->format('Y-m-d H:i:s')); + } + + public function testAttrNotFoundException(): void + { + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage('Attr "birth_date" not found in $data'); + (new Customer())->getBirthDate(); + } +} diff --git a/tests/Models/DocumentTest.php b/tests/Models/DocumentTest.php new file mode 100644 index 0000000..d83e52a --- /dev/null +++ b/tests/Models/DocumentTest.php @@ -0,0 +1,39 @@ +setItems([ + $position = new DocumentPosition(), + ]); + + $position->setType('POSITION'); + $position->setNumber('31337'); + $position->setDescription('Foobar is not Barfoo!'); + + static::assertSame(['items' => [['type' => 'POSITION', 'number' => '31337', 'description' => 'Foobar is not Barfoo!']]], $document->toArray()); + } + + public function testPositionsArrayToInstaces(): void + { + $document = new Document([ + 'items' => [ + ['number' => '31337'], + ], + ]); + + static::assertSame('31337', $document->getItems()[0]->getNumber()); + } +} diff --git a/tests/Models/PositionTest.php b/tests/Models/PositionTest.php new file mode 100644 index 0000000..66a0e5c --- /dev/null +++ b/tests/Models/PositionTest.php @@ -0,0 +1,23 @@ +setNumber('31337'); + $position->setExportIdentifierExtended(new PositionExportIdentifierExtended()); + $position->getExportIdentifierExtended()->setSmallBusiness('010203040506070809'); + static::assertSame(['number' => '31337', 'export_identifier_extended' => ['smallBusiness' => '010203040506070809']], $position->toArray()); + } +}