frengky/fineract-client-php

Apache Fineract 1.x 平台 API 的 PHP 客户端库

v1.0.0 2021-04-09 05:43 UTC

This package is auto-updated.

Last update: 2024-09-09 13:27:28 UTC


README

Apache Fineract 是一个安全的多租户微型金融平台。Apache Fineract API 的目标是使开发者能够在其平台上构建应用程序
参考应用程序(用户名:mifos,密码:password)与文档中交互链接相同的演示租户一起工作 - API 是围绕 REST 组织的 - 在这里了解更多关于 Apache Fineract 的信息:这里 - 您可以通过浏览器 尝试 API - 通用选项 在这里 - 了解更多关于 更新日期和数字 的信息 - 关于身份验证和 HTTP 及 HTTPS 的基础知识,请参考 这里 - 查看关于 ERROR 代码的信息 这里 请参考旧文档以获取任何文档查询 这里

此 PHP 包是由 Swagger Codegen 项目自动生成的

  • API 版本:1.0.0
  • 包版本:1.0.0
  • 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen

要求

PHP 7.2.5 及以上版本

安装与使用

Composer

要使用 Composer 安装绑定,请将以下内容添加到 composer.json

composer require frengky/fineract-client-php

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/fineract-client-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请遵循安装过程,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');
// Configure API key authorization: tenantid
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKey('fineract-platform-tenantid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKeyPrefix('fineract-platform-tenantid', 'Bearer');

$apiInstance = new Frengky\Fineract\Api\AccountNumberFormatApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Frengky\Fineract\Model\PostAccountNumberFormatsRequest(); // \Frengky\Fineract\Model\PostAccountNumberFormatsRequest |

try {
    $result = $apiInstance->create($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountNumberFormatApi->create: ', $e->getMessage(), PHP_EOL;
}
// Configure HTTP basic authorization: basicAuth
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');
// Configure API key authorization: tenantid
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKey('fineract-platform-tenantid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKeyPrefix('fineract-platform-tenantid', 'Bearer');

$apiInstance = new Frengky\Fineract\Api\AccountNumberFormatApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$accountNumberFormatId = 789; // int | accountNumberFormatId

try {
    $result = $apiInstance->delete($accountNumberFormatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountNumberFormatApi->delete: ', $e->getMessage(), PHP_EOL;
}
// Configure HTTP basic authorization: basicAuth
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');
// Configure API key authorization: tenantid
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKey('fineract-platform-tenantid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKeyPrefix('fineract-platform-tenantid', 'Bearer');

$apiInstance = new Frengky\Fineract\Api\AccountNumberFormatApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->retrieveAll3();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountNumberFormatApi->retrieveAll3: ', $e->getMessage(), PHP_EOL;
}
// Configure HTTP basic authorization: basicAuth
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');
// Configure API key authorization: tenantid
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKey('fineract-platform-tenantid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKeyPrefix('fineract-platform-tenantid', 'Bearer');

$apiInstance = new Frengky\Fineract\Api\AccountNumberFormatApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$accountNumberFormatId = 789; // int | accountNumberFormatId

try {
    $result = $apiInstance->retrieveOne($accountNumberFormatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountNumberFormatApi->retrieveOne: ', $e->getMessage(), PHP_EOL;
}
// Configure HTTP basic authorization: basicAuth
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');
// Configure API key authorization: tenantid
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKey('fineract-platform-tenantid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKeyPrefix('fineract-platform-tenantid', 'Bearer');

$apiInstance = new Frengky\Fineract\Api\AccountNumberFormatApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->retrieveTemplate2();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountNumberFormatApi->retrieveTemplate2: ', $e->getMessage(), PHP_EOL;
}
// Configure HTTP basic authorization: basicAuth
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');
// Configure API key authorization: tenantid
$config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKey('fineract-platform-tenantid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Frengky\Fineract\Configuration::getDefaultConfiguration()->setApiKeyPrefix('fineract-platform-tenantid', 'Bearer');

$apiInstance = new Frengky\Fineract\Api\AccountNumberFormatApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Frengky\Fineract\Model\PutAccountNumberFormatsRequest(); // \Frengky\Fineract\Model\PutAccountNumberFormatsRequest |
$accountNumberFormatId = 789; // int | accountNumberFormatId

try {
    $result = $apiInstance->update1($body, $accountNumberFormatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountNumberFormatApi->update1: ', $e->getMessage(), PHP_EOL;
}
?>

API 端点文档

所有 URI 都是相对于 https://demo.fineract.dev/fineract-provider/api/v1

模型文档

授权文档

基本认证

  • 类型:HTTP基本认证

租户ID

  • 类型:API密钥
  • API密钥参数名:fineract-platform-tenantid
  • 位置:HTTP头

作者

dev@fineract.apache.org