idplein / twinfield-booking
There is no license information available for the latest version (dev-master) of this package.
Package to book invoices to twinfield
dev-master
2025-02-26 06:33 UTC
Requires
- league/oauth2-client: ^2.6
- moneyphp/money: ^3.1
- myclabs/php-enum: ^1.6
- php-twinfield/twinfield: ^3.5
This package is not auto-updated.
Last update: 2025-03-13 14:19:05 UTC
README
Installation
First add the repository to your composer.json, so composer can find this package.
"repositories": [ { "type": "vcs", "url": "ssh://git@gitlab.qlic.nl/packages/twinfield-booking.git" } ],
Then add the package as a dependency.
composer require qlic/twinfield-booking
In case you are running Laravel < 5.5
Add the following provider to your service providers (in config/app.php
)
Qlic\Twinfield\Booking\Providers\TwinfieldBookingServiceProvider::class,
In case you need to tweak things, you can publish the config file.
php artisan vendor:publish --provider="Qlic\Twinfield\Booking\Providers\TwinfieldBookingServiceProvider"
Usage
Typehint InvoiceBookerContract
and use it's methods.
Example:
<?php use Qlic\Twinfield\Booking\Contracts\InvoiceBookerContract; use Qlic\Twinfield\Booking\Contracts\InvoiceContract; // use your Invoice class here class ABC { private $invoiceBooker; public function __construct(InvoiceBookerContract $invoiceBooker) { $this->invoiceBooker = $invoiceBooker; } public function random(Invoice $invoice) { $this->invoiceBooker->createTransaction(new InvoiceWrapper($invoice)); } } // Write a wrapper implementing the invoice contract class InvoiceWrapper implements InvoiceContract { private $invoice; public function __construct(Invoice $invoice) { $this->invoice = $invoice; } // Implement all methods here }