Skip to content

laudeco/mindee-api-php-sdk

Repository files navigation

OpenAPIClient-php

Financial Document endpoints

Installation & Usage

Requirements

PHP 8.0 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

try {
    $token = ''; // API Token
    $file = ''; //TODO change by a file
    $document = FilePath::fromPath($file); // Any concrete class that implements _FileInterface_
    
    $client = MindeeClientFactory::financialDocument(new Token($token));
    $result = $client->parse($document);
    
    echo $result->customerName()."\n";
    echo $result->customerAddress()."\n";
    
} catch (Exception $e) {
    echo 'Exception :', $e->getMessage(), PHP_EOL;
}

Models

Authorization

apiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Releases

No releases published

Packages

No packages published