biila-io / laravel-procountor-api
Provides Procountor wrapper for Laravel
v0.2.0
2022-07-06 07:09 UTC
Requires
- php: >=7.4
- illuminate/http: ^8.0 || ^9.0
- illuminate/redis: ^8.0 || ^9.0
- illuminate/support: ^8.0 || ^9.0
- predis/predis: ^1.1
Requires (Dev)
- mockery/mockery: ^1.3
- phpunit/phpunit: ^8.5
README
Laravel Wrapper for Procountor API
Installation
Install the package with Composer:
composer require biila-io/laravel-procountor-api
The package will automatically register itself.
Configuration
You should add to services.php
config file the following configuration:
return [ // ... 'procountor' => [ 'client_id' => env('PROCOUNTOR_CLIENT_ID'), 'client_secret' => env('PROCOUNTOR_CLIENT_SECRET'), 'redirect_uri' => env('PROCOUNTOR_REDIRECT_URI'), 'api_key' => env('PROCOUNTOR_API_KEY'), ], ]
Methods
Procountor::getConfig()
- Get the Procountor config instance.
Procountor::accessToken()
- Get the access token.
Procountor::accessTokenExpiresAt()
- Get the access token expiration time.
Procountor::refreshAccessToken()
- Refresh the access token.
Procountor::getAccountingCode()
- Get the accounting code defined in the config.
Procountor::getInvoices($query)
- Get a list of invoices.
Procountor::getInvoice($invoiceId)
- Get the details for given invoice id.
Procountor::storeInvoice($data)
- Store invoice to Procountor with given data.
Procountor::verifyInvoice($invoiceId)
- Verify a stored invoice in Procountor.
Procountor::approveInvoice($invoiceId)
- Approve a stored invoice in Procountor.
Procountor::invalidateInvoice($invoiceId)
- Invalidate a stored invoice in Procountor.
Procountor::getAttachments($query)
- Get a list of attachments.
Procountor::getAttachment($attachmentId)
- Get details of given attachment id.
Procountor::uploadAttachment($filePath, $referenceId, $disk, $filename)
- Upload an attachment to Procountor.
License
Convenient Laravel Commands is open-sourced software licensed under the MIT license.