diff --git a/composer.json b/composer.json index 8df8bd9..5e7d229 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,36 @@ "Src\\": "src/" } }, + "scripts":{ + "run-create-tables": "php ./commands/00-create-tables.php", + "run-seeder": "php ./commands/01-seeder.php", + "run-connect": "php ./commands/02-connect.php", + "run-ksef": "php ./commands/03-ksef.php", + "run-legal-entity": "php ./commands/04-legal-entity.php", + "run-webhook": "php ./commands/05-webhook.php", + "run-launch": "php ./commands/06-launch.php", + "run-send-invoice": "php ./commands/07-send-invoice.php", + "run-get-invoices": "php ./commands/08-get-invoices.php", + "run-get-invoice-content": "php ./commands/09-get-invoice-content.php", + "run-get-invoice-attachments": "php ./commands/10-get-invoice-attachments.php", + "run-get-invoice-upo": "php ./commands/11-get-invoice-upo.php", + + "run-set-project": [ + "@run-create-tables", + "@run-seeder", + "@run-connect", + "@run-ksef", + "@run-legal-entity", + "@run-webhook" + ], + "run-invoices": [ + "@run-send-invoice", + "@run-get-invoices", + "@run-get-invoice-content", + "@run-get-invoice-attachments", + "@run-get-invoice-upo" + ] + }, "require-dev": { "phpunit/phpunit": "^9.5" }, diff --git a/readme.md b/readme.md index 0298c02..8a62de6 100644 --- a/readme.md +++ b/readme.md @@ -198,4 +198,14 @@ A-Cube to access proper account in KSeF. #### Launch Runners -#### Invoice Synchronization \ No newline at end of file +#### Invoice Synchronization + +#### Run example commands + +```sh +docker-compose up -d +docker-compose exec php composer run-set-project +#you should copy uuid from command (php ./commands/03-ksef.php) and put value to file .env: ACUBE_ACCESS_TOKEN_UUID=your new uuid +docker-compose exec php composer run-launch +docker-compose exec php composer run-invoices +``` \ No newline at end of file