webforge/fastbill-api

此包已废弃,不再维护。未建议替代包。

dev-master / 1.0.x-dev 2018-07-11 09:23 UTC

This package is auto-updated.

Last update: 2020-02-06 16:35:55 UTC


README

对fastbill.com和fastbill-automatic.com API的部分实现

安装

使用Composer进行安装。

composer require webforge/fastbill-api:1.0.*@dev

(这将遵循开发分支,目前还没有稳定版本)

简单使用

<?php
use FastBill\Api\MyFastBillClient;

$fastBill = MyFastBillClient::create(
  array(
    'apiKey'=>'b338250aebc2684673321c2ab05af4d68sAhXRFx7rie98DlHTFrppzH1cmlaY5y',
    'email'=>'billing@ps-webforge.com'
  )
);

$invoices = $fastBill->getInvoices(array('invoice_id'=>$invoiceId));
$invoice = array_pop($invoices);

$invoice->getInvoiceNumber();
$invoice->getTitle();
$zHd = $invoice->getFirstName().' '.$invoice->getLastName();

$customer = $fastBill->getCustomers(array('customer_id'=>$invoice->getCustomerId()));

创建模型

$customer = Customer::fromArray(
  'customerId'=> 1234
));

测试

运行测试使用

phpunit

路线图

状态:这是一个开发版本,API在发布1.0.0之前仍然可能发生变化。如果您觉得这应该已经完成,请打开一个问题。Awdng 开始迁移使用此库进行fastbill自动API。

错误

请使用此存储库的问题功能报告错误/增强/建议或问题。

贡献者

许可

版权(c)2015 ps-webforge.com

在此软件及其相关文档文件(“软件”)的副本由任何人获得时,特此免费授予许可,以不受限制地处理该软件,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或销售软件的副本,并允许向软件提供副本的个人这样做,前提是遵守以下条件

上述版权声明和本许可声明应包含在软件的所有副本或实质性部分中。

软件按“原样”提供,不提供任何形式(明示或暗示)的保证,包括但不限于适销性、特定用途适用性和非侵权性保证。在任何情况下,作者或版权所有者不应对任何索赔、损害或其他责任承担责任,无论是基于合同、侵权或其他行为,无论是源于、因之或与此软件或其使用或其他交易有关。