alphaws / billingo-api-v3
Billingo 发票 API 的 Swagger Hub 克隆版
dev-master
2021-07-20 01:16 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-20 08:00:30 UTC
README
这是 Billingo API v3 的文档。我们的 API 基于 REST 软件架构风格。API 具有资源导向的 URL,接受 JSON 编码的请求体,并返回 JSON 编码的响应。要使用此 API,您必须在我们 网站上 生成一个新的 API 密钥。之后,您可以在本页面上测试您的 API 密钥。
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:3.0.14
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen 更多信息请访问 https://www.billingo.hu/kapcsolat
需求
PHP 5.5 及以上
安装和用法
Composer
要通过 Composer 安装绑定,请在 composer.json
中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照 安装过程 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new Swagger\Client\Api\BankAccountApi( // 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 \Swagger\Client\Model\BankAccount(); // \Swagger\Client\Model\BankAccount | BankAccount object that you would like to store. try { $result = $apiInstance->createBankAccount($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling BankAccountApi->createBankAccount: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new Swagger\Client\Api\BankAccountApi( // 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 ); $id = 56; // int | try { $apiInstance->deleteBankAccount($id); } catch (Exception $e) { echo 'Exception when calling BankAccountApi->deleteBankAccount: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new Swagger\Client\Api\BankAccountApi( // 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 ); $id = 56; // int | try { $result = $apiInstance->getBankAccount($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling BankAccountApi->getBankAccount: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new Swagger\Client\Api\BankAccountApi( // 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 ); $page = 56; // int | $per_page = 25; // int | try { $result = $apiInstance->listBankAccount($page, $per_page); print_r($result); } catch (Exception $e) { echo 'Exception when calling BankAccountApi->listBankAccount: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new Swagger\Client\Api\BankAccountApi( // 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 \Swagger\Client\Model\BankAccount(); // \Swagger\Client\Model\BankAccount | Bank account object that you would like to update. $id = 56; // int | try { $result = $apiInstance->updateBankAccount($body, $id); print_r($result); } catch (Exception $e) { echo 'Exception when calling BankAccountApi->updateBankAccount: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://api.billingo.hu/v3
模型文档
- 地址
- 银行账户
- 银行账户列表
- 类别
- 检查税号信息
- 客户端错误
- 客户端错误响应
- 汇率
- 更正类型
- 国家
- 创建文档导出
- 货币
- 折扣
- 折扣类型
- 文档
- 文档祖先
- 文档银行账户
- 文档块
- 文档块列表
- 文档取消
- 文档导出过滤器额外选项
- 文档导出 ID
- 文档导出其他选项
- 文档导出查询类型
- 文档导出排序
- 文档导出状态
- 文档导出状态状态
- 文档导出类型
- 文档表单
- 文档格式
- 文档插入
- 文档插入类型
- 文档项目
- 文档项目数据
- 文档语言
- 文档列表
- 文档通知状态
- 文档组织
- 文档合作伙伴
- 文档产品数据
- 文档公开 URL
- 文档设置
- 文档摘要
- 文档类型
- 文档增值税率摘要
- 权益
- 标识
- 发票设置
- 账簿编号信息
- 修改文档插入
- 一种文档折扣
- 一种文档插入折扣
- 一种文档插入项
- 一种发票设置文档格式
- 一种发票设置文档类型
- 一种修改文档插入项
- 在线支付
- 在线账单状态
- 在线账单状态枚举
- 在线账单状态信息
- 组织数据
- 合作伙伴
- 合作伙伴自定义账单设置
- 合作伙伴列表
- 合作伙伴税务类型
- 支付历史
- 支付方式
- 支付状态
- 产品
- 产品列表
- 四舍五入
- 发送文档
- 服务器错误
- 服务器错误响应
- 支出
- 支出列表
- 支出项目
- 支出合作伙伴
- 支出支付方式
- 支出保存
- 订阅
- 订阅错误响应
- 税号
- 太多请求响应
- 单价类型
- 验证错误
- 验证错误响应
- 增值税
授权文档
api_key
- 类型: API密钥
- API密钥参数名称: X-API-KEY
- 位置: HTTP头部