biila-io/laravel-procountor-api

Provides Procountor wrapper for Laravel

v0.2.0 2022-07-06 07:09 UTC

This package is auto-updated.

Last update: 2024-05-06 10:57:55 UTC


README

68747470733a2f2f6269696c612e696f2f73746f726167652f6c6f676f732f6269696c612d6465762d626c75652e737667

Laravel Wrapper for Procountor API

Total Downloads Latest Stable Version License

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.