subbe/waveapp

用于消费WaveApp的GraphQL API的包装器

维护者

详细信息

github.com/subbe/waveapp

源代码

问题

安装: 475

依赖项: 0

建议者: 0

安全: 0

星标: 17

关注者: 2

分支: 10

开放问题: 1

类型:项目

1.0.0 2021-12-07 07:26 UTC

This package is auto-updated.

Last update: 2024-08-29 05:24:55 UTC


README

StyleCI Build Status codecov

用于在您的Laravel应用程序中使用WaveApp的graphql api的包装器。

原始文档可在以下位置找到:

要使用WaveApp,您需要在开发者门户上注册

要求与安装

使用composer安装此包

composer require subbe/waveapp

更新您的.env文件以包含以下内容

WAVE_ACCESS_TOKEN=
WAVE_GRAPHQL_URI=
WAVE_BUSINESS_ID=

查询

  • user
  • countries
  • country
  • businesses
  • business
  • currencies
  • currency
  • accountTypes
  • accountSubtypes
  • customerExists
  • customers
  • products
  • taxes
  • invoicesByCustomerByStatus
  • getBusiness
  • businessAccounts
  • getBusinessAccount
  • businessCustomers
  • getBusinessCustomer
  • businessInvoices
  • getBusinessInvoices
  • businessSalesTaxes
  • getBusinessSalesTax
  • businessProducts
  • getBusinessProduct
  • businessVendors
  • getBusinessVendor

突变

  • customerCreate

  • customerPatch

  • customerDelete

  • accountCreate

  • accountPatch

  • accountArchive

  • productCreate

  • productPatch

  • productArchive

  • salesTaxCreate

  • salesTaxPatch

  • salesTaxArchive

  • salesTaxRateCreate

  • moneyTransactionCreate

  • invoiceCreate

  • invoiceClone

  • invoiceDelete

  • invoiceSend

  • invoiceApprove

  • invoiceMarkSent

用法

查询

$waveapp = new \Subbe\WaveApp\WaveApp();
$countries = $waveapp->countries();

或,使用参数...

$waveapp = new \Subbe\WaveApp\WaveApp();
$country = $waveapp->country(['code' => 'US']);

突变

$waveapp = new \Subbe\WaveApp\WaveApp();
$customer = [
    "input" => [
        "businessId" => "<REPLACE-THIS-WITH-THE-BUSINESS-ID>",
        "name" => "Genevieve Heidenreich",
        "firstName" => "Genevieve",
        "lastName" => "Heidenreich",
        "displayId" => "Genevieve",
        "email" => "genevieve.heidenreich@example.com",
        "mobile" => "011 8795",
        "phone" => "330 8738",
        "fax" => "566 5965",
        "tollFree" => "266 5698",
        "website" => "http://www.hermiston.com/architecto-commodi-possimus-esse-non-necessitatibus",
        "internalNotes" => "",
        "currency" => "USD",
        "address" => [
            "addressLine1" => "167 Iva Run",
            "addressLine2" => "Parker Mews, Monahanstad, 40778-7100",
            "city" => "West Tyrique",
            "postalCode" => "82271",
            "countryCode" => "EC",
       ],
       "shippingDetails" => [
            "name" => "Genevieve",
            "phone" => "011 8795",
            "instructions" => [
                "Delectus deleniti accusamus rerum voluptatem tempora.",
            ],
            "address" => [
                "addressLine1" => "167 Iva Run",
                "addressLine2" => "Parker Mews, Monahanstad, 40778-7100",
                "city" => "West Tyrique",
                "postalCode" => "82271",
                "countryCode" => "EC",
            ],
        ],
    ],
];

$newCustomer = $waveapp->customerCreate($customer, "CustomerCreateInput");

贡献

欢迎提交拉取请求。对于主要更改,请先打开一个问题来讨论您想进行哪些更改。

许可证

MIT