PHPackages                             codefit/vl-conversion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codefit/vl-conversion

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codefit/vl-conversion
=====================

VaseLekarny Conversion Package

1.0.0(1y ago)00MITPHPPHP &gt;=7.4

Since May 7Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/codefit/vase-lekarny-conversion)[ Packagist](https://packagist.org/packages/codefit/vl-conversion)[ RSS](/packages/codefit-vl-conversion/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

VaseLekarny Conversion Package
==============================

[](#vaselekarny-conversion-package)

This package provides conversion functionality for VaseLekarny.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require codefit/vl-conversion
```

Usage
-----

[](#usage)

```
use VaseLekarny\Conversion;

$conversion = new Conversion();
$conversion->setApiKey('your-api-key');

try {
    $result = $conversion->sendConversion([
        // Your conversion data here
    ]);

    // Process the result
} catch (\VaseLekarny\Exceptions\ApiException $e) {
    // Handle API errors
    $errorResponse = $e->getResponse();
}
```

Conversion Data Structure
-------------------------

[](#conversion-data-structure)

When sending a conversion, you need to provide the following data structure:

```
$conversionData = [
    'order_id' => '12345',           // Required: Unique identifier of the order
    'customer' => [                   // Required: Customer information
        'email' => 'test@example.com', // Required: Customer's email address
        'name' => 'John Doe'          // Required: Customer's full name
    ],
    'products' => [                   // Required: Array of ordered products
        [
            'id' => 'PROD001',        // Required: Product identifier
            'name' => 'Test Product',  // Required: Product name
            'price' => 199.99,        // Required: Product price (including VAT)
            'quantity' => 1           // Required: Quantity of the product
        ]
    ],
    'total_value' => 199.99          // Required: Total order value (including VAT)
];
```

### Required Fields

[](#required-fields)

- `order_id`: Unique identifier of the order (string)
- `customer`: Object containing customer information
    - `email`: Customer's email address (string)
    - `name`: Customer's full name (string)
- `products`: Array of ordered products
    - `id`: Product identifier (string)
    - `name`: Product name (string)
    - `price`: Product price including VAT (float)
    - `quantity`: Quantity of the product (integer)
- `total_value`: Total order value including VAT (float)

Error Handling
--------------

[](#error-handling)

The package throws `VaseLekarny\Exceptions\ApiException` when API requests fail. You can catch these exceptions to handle errors:

```
try {
    $result = $conversion->sendConversion($data);
} catch (\VaseLekarny\Exceptions\ApiException $e) {
    // Get the error message
    $message = $e->getMessage();

    // Get the full response from the API
    $response = $e->getResponse();
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance50

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

372d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9becd2d5ca6bca18ddc82f1d7a47e4de6c278e0e495c36ddc4227bccd29c2e16?d=identicon)[David Kojecký](/maintainers/David%20Kojeck%C3%BD)

---

Top Contributors

[![codefit](https://avatars.githubusercontent.com/u/17836699?v=4)](https://github.com/codefit "codefit (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codefit-vl-conversion/health.svg)

```
[![Health](https://phpackages.com/badges/codefit-vl-conversion/health.svg)](https://phpackages.com/packages/codefit-vl-conversion)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
