billingo / php-sdk
3.0.10
2020-11-25 13:08 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
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-25 21:49:00 UTC
README
这是 Billingo API v3 文档。我们的 API 基于 REST 软件架构风格。API 使用面向资源的 URL,接受 JSON 编码的请求体并返回 JSON 编码的响应。要使用此 API,您必须在我们的 网站 上生成新的 API 密钥。之后,您可以在本页面上测试您的 API 密钥。
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:3.0.10
- 打包包: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 = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Billingo\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 \Billingo\Client\Model\BankAccount(); // \Billingo\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 = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Billingo\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 = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Billingo\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 = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Billingo\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 = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Billingo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Billingo\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 \Billingo\Client\Model\BankAccount(); // \Billingo\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
类 | 方法 | HTTP 请求 | 描述 |
---|---|---|---|
BankAccountApi | createBankAccount | POST /bank-accounts | 创建银行账户 |
BankAccountApi | deleteBankAccount | DELETE /bank-accounts/{id} | 删除银行账户 |
BankAccountApi | getBankAccount | GET /bank-accounts/{id} | 检索银行账户 |
BankAccountApi | listBankAccount | GET /bank-accounts | 列出所有银行账户 |
BankAccountApi | updateBankAccount | PUT /bank-accounts/{id} | 更新银行账户 |
CurrencyApi | getConversionRate | GET /currencies | 获取货币汇率。 |
DocumentApi | cancelDocument | POST /documents/{id}/cancel | 取消文档 |
DocumentApi | createDocument | POST /documents | 创建文档 |
DocumentApi | createDocumentFromProforma | POST /documents/{id}/create-from-proforma | 从形式单创建文档。 |
DocumentApi | deletePayment | DELETE /documents/{id}/payments | 删除文档上的所有支付历史记录 |
DocumentApi | downloadDocument | GET /documents/{id}/download | 以 PDF 格式下载文档。 |
DocumentApi | getDocument | GET /documents/{id} | 检索文档 |
DocumentApi | getOnlineSzamlaStatus | GET /documents/{id}/online-szamla | 检索文档在线 Számla 状态 |
DocumentApi | getPayment | GET /documents/{id}/payments | 检索支付历史记录 |
DocumentApi | getPublicUrl | GET /documents/{id}/public-url | 检索文档下载公开 URL。 |
DocumentApi | listDocument | GET /documents | 列出所有文档 |
DocumentApi | sendDocument | POST /documents/{id}/send | 将发票发送到指定的电子邮件地址。 |
DocumentApi | updatePayment | PUT /documents/{id}/payments | 更新支付历史记录 |
DocumentBlockApi | listDocumentBlock | GET /document-blocks | 列出所有文档块 |
DocumentExportApi | create | POST /document-export | 创建文档导出。 |
DocumentExportApi | download | GET /document-export/{id}/download | 返回导出的二进制文件。 |
DocumentExportApi | 轮询 | GET /document-export/{id}/poll | 检索导出状态。 |
OrganizationApi | getOrganizationData | GET /organization | 检索组织数据。 |
PartnerApi | createPartner | POST /partners | 创建合作伙伴 |
PartnerApi | deletePartner | DELETE /partners/{id} | 删除合作伙伴 |
PartnerApi | getPartner | GET /partners/{id} | 检索合作伙伴 |
PartnerApi | listPartner | GET /partners | 列出所有合作伙伴 |
PartnerApi | updatePartner | PUT /partners/{id} | 更新合作伙伴 |
ProductApi | createProduct | POST /products | 创建产品 |
ProductApi | deleteProduct | DELETE /products/{id} | 删除产品 |
ProductApi | getProduct | GET /products/{id} | 检索产品 |
ProductApi | listProduct | GET /products | 列出所有产品 |
ProductApi | updateProduct | PUT /products/{id} | 更新产品 |
UtilApi | checkTaxNumber | GET /utils/check-tax-number/{tax_number} | 检查税号。 |
UtilApi | getId | GET /utils/convert-legacy-id/{id} | 将旧ID转换为v3 ID。 |
模型文档说明
- 地址
- BankAccount
- BankAccountList
- Body
- Body1
- CheckTaxNumberMessage
- ClientError
- ClientErrorResponse
- ConversationRate
- 国家
- CreateDocumentExport
- 货币
- Document
- DocumentBankAccount
- DocumentBlock
- DocumentBlockList
- DocumentExportId
- DocumentExportOtherOptions
- DocumentExportQueryType
- DocumentExportSortBy
- DocumentExportStatus
- DocumentExportStatusState
- DocumentExportType
- DocumentInsert
- DocumentInsertType
- DocumentItem
- DocumentItemData
- DocumentLanguage
- DocumentList
- DocumentNotificationStatus
- DocumentOrganization
- DocumentPartner
- DocumentProductData
- DocumentPublicUrl
- DocumentSettings
- DocumentSummary
- DocumentType
- DocumentVatRateSummary
- Id
- OneOfDocumentInsertItemsItems
- OneOfbody
- OneOfbody1
- OnlinePayment
- OnlineSzamlaStatus
- OnlineSzamlaStatusMessage
- OrganizationData
- Partner
- PartnerList
- PartnerTaxType
- PartnerUpsert
- PaymentHistory
- PaymentMethod
- PaymentStatus
- Product
- ProductList
- Round
- SendDocument
- ServerError
- ServerErrorResponse
- SubscriptionErrorResponse
- TaxNumber
- UnitPriceType
- ValidationError
- ValidationErrorResponse
- Vat
授权文档说明
api_key
- 类型: API密钥
- API密钥参数名: X-API-KEY
- 位置: HTTP头部
作者
hello@billingo.hu