keboola/billing-api-php-client

Keboola Connection 计费 API 的 PHP 客户端

5.0.0 2024-01-15 14:45 UTC

This package is auto-updated.

Last update: 2024-09-15 16:30:06 UTC


README

计费 API 的 PHP 客户端 (API 文档)。

用法

composer require keboola/billing-api-php-client
use Keboola\BillingApi\Client;

$client = new Client(
    'http://billing.keboola.com/',
    'xxx-xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
);
$credits = $client->getRemainingCredits();
var_dump($credits);

运行测试

  • 在上述设置中,您可以运行测试

    docker-compose build
    docker-compose run tests
  • 使用本地代码运行测试

    docker-compose run tests-local composer install
    docker-compose run tests-local

许可

MIT 许可,见 LICENSE 文件。