chaplean/zoho-books-client-bundle

ZohoBooks 客户端包

安装: 86

依赖项: 0

建议者: 0

安全: 0

星级: 0

观察者: 1

分支: 0

开放问题: 0

类型:zoho-books-client-bundle

v0.1.2 2019-06-17 11:44 UTC

This package is auto-updated.

Last update: 2024-08-28 12:27:56 UTC


README

build status build status contributions welcome

此包允许您轻松地从PHP代码中使用 Zoho Books API

目录

安装

此包需要至少 Symfony 3.0。

您可以使用 composer 安装 zoho-books-client-bundle

composer require chaplean/zoho-books-client-bundle

然后在您的 AppKernel.php 中添加

new Chaplean\Bundle\ZohoBooksClientBundle\ChapleanZohoBooksClientBundle(),

配置

首先,您需要导入包配置。

config.yml

imports:
    - { resource: '@ChapleanZohoBooksClientBundle/Resources/config/config.yml' }

您还必须创建一些参数。

parameters.yml

parameters:
    chaplean_zoho_books.organization_id: f545ff15s4g
    chaplean_zoho_books.access_token: g45df45g41g5fd

使用

以下是如何使用 getEstimate 路由的示例。

$response = $zohoBooksApi->getEstimate()
    ->bindUrlParameters(['id' => 'df154f1fds4f54dsf15'])
    ->exec();
    
if ($response->succeeded()) {
    $content = $response->getContent();
    // your code
}

可用函数

  • 联系人

    • getContacts()
    • getContactPersons()
  • 项目

    • getItems()
    • getItem()
    • postItem()
    • putItem()
    • deleteItem()
    • postItemActive()
    • postItemInactive()
  • 报价

    • getEstimate()
    • getEstimates()
    • postEstimate()
    • putEstimate()
    • deleteEstimate()
    • postEstimateAsDeclined()
    • postEstimateAsAccepted()
  • 发票

    • getInvoice()
    • getInvoices()
    • postInvoice()
    • putInvoice()
    • deleteInvoice()

版本控制

zoho-books-client-bundle 遵循 语义化版本控制。简而言之,方案是 MAJOR.MINOR.PATCH,其中

  1. MAJOR 在有重大更改时增加,
  2. MINOR 在向后兼容的方式中添加新功能时增加,
  3. PATCH 在向后兼容的方式中修复错误时增加。

低于 1.0.0 的版本被视为实验性版本,重大更改可能随时发生。

贡献

欢迎贡献!有许多贡献方式,我们非常感谢。以下是一些主要方式

  • 错误报告:虽然我们努力提供高质量的软件,但错误可能发生,我们无法修复我们不知道的问题。因此,即使您不确定或只想提问,也请报告。无论如何,问题可能表明文档仍可改进!
  • 功能请求:当前API没有涵盖您的用例?希望提出建议或添加某些内容?我们很乐意阅读并开始讨论,以尝试找到最佳解决方案。
  • 拉取请求:希望贡献代码或文档?我们非常乐意!如果您需要帮助开始,GitHub有关于拉取请求的文档。我们使用"fork and pull model",其中贡献者将更改推送到他们的个人分支,然后创建向主存储库的拉取请求。请将您的拉取请求针对 master 分支。

提醒一下,所有贡献者都应遵守我们的 行为准则

黑客攻击

在黑客攻击此项目时,您可能会发现以下命令很有用。

# Install dependencies
composer install

# Run tests
bin/phpunit

许可证

zoho-books-client-bundle 在MIT许可的条款下分发。

有关详细信息,请参阅 LICENSE