leventcz/parasut-php
最新稳定版本:v1.1.2
Composer 安装命令:
composer require leventcz/parasut-php
包简介
Parasut API v4 client for PHP
README 文档
README
Parasut PHP API Client
Modern PHP API client that allows you to interact with the Parasut API v4
Installation
Requires PHP 8.2+
composer require leventcz/parasut-php
Usage
Initializing Client
$credentials = [ 'client_id' => 'YOUR_CLIENT_ID', 'client_secret' => 'YOUR_CLIENT_SECRET', 'company_id' => 'YOUR_COMPANY_ID', 'username' => 'YOUR_USERNAME', 'password' => 'YOUR_PASSWORD' ]; $client = Parasut::client($credentials);
Examples
// paginate through sales invoices $salesInvoices = $client ->salesInvoice() ->index(['page' => ['size' => 10, 'number' => 4]]); $salesInvoices['data']; // array of sales invoices $salesInvoices['meta']; // pagination meta // retrieve the specified sales invoice with its payments $salesInvoice = $client ->salesInvoice() ->show($id, ['include' => 'payments']); $salesInvoice['data']; // sales invoice $salesInvoice['included']; // array of payments
Methods & Parameters
The methods fully follow the naming conventions of their related endpoints and take required and optional parameters as arguments.
// POST | https://api.parasut.com/v4/{company_id}/contacts/{id}/contact_debit_transactions $client ->contact() ->contactDebitTransactions($id, $query, $body) // PATCH | https://api.parasut.com/v4/{company_id}/employees/{id}/archive $client ->employee() ->archive($id, $query)
API Reference
License
Parasut PHP is an open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 380
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-28