imbue / wefact-api-php
PHP 的 WeFact API 客户端库。
1.1.0
2021-09-28 18:28 UTC
Requires
- php: ^7.2 || ^7.3 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3 || ^7.0
Requires (Dev)
- phpunit/phpunit: ^5.7 || ^6.5 || ^7.1 || ^9
This package is auto-updated.
Last update: 2024-09-29 00:57:51 UTC
README
PHP 库,用于在线发票软件 wefact.nl
入门
初始化 WeFact 客户端
$client = new WeFact(); $client->setApiToken($yourApiToken);
检索多张发票
$invoices = $client->invoices->list();
获取单个发票
$invoice = $client->invoices->show([ 'InvoiceCode' => 'F0001', ]);
创建发票
$invoice = $client->invoices->create([ 'DebtorCode' => 'DB10000', 'InvoiceLines' => [ [ 'Number' => 2, 'ProductCode' => 'P0001' ], [ 'Description' => 'Reiskosten à € 0,19 per km', 'PriceExcl' => 0.19 ] ] ]);
更新发票
$invoice = $client->invoices->edit([ 'Identifier' => 1, 'Discount' => 10, 'Term' => 30, ]);
删除发票
$invoice = $client->invoices->delete([ 'Identifier' => 1, ]);
下载附件
$invoices = $client->attachments->download([ 'ReferenceIdentifier' => '1', 'Type' => 'pricequote', 'Filename' => 'sample.pdf', ]);
可用的控制器
- 附件
- 贷项发票
- 贷项发票行
- 债务人
- 分组
- 发票
- 发票行
- 报价单
- 报价单行
- 产品
- 设置
- 订阅