WaveApp
A wrapper to use the WaveApp's graphql api in your laravel apps.
The original documentation is available at:
To use WaveApp, you will need to register on the developer portal.
Requirement & Install
Require the package using composer:
composer require subbe/waveapp
Update your .env file to include
WAVE_ACCESS_TOKEN=
WAVE_GRAPHQL_URI=
WAVE_BUSINESS_ID=
Queries
- 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
Mutations
-
customerCreate
-
customerPatch
-
customerDelete
-
accountCreate
-
accountPatch
-
accountArchive
-
productCreate
-
productPatch
-
productArchive
-
salesTaxCreate
-
salesTaxPatch
-
salesTaxArchive
-
salesTaxRateCreate
-
moneyTransactionCreate
-
invoiceCreate
-
invoiceClone
-
invoiceDelete
-
invoiceSend
-
invoiceApprove
-
invoiceMarkSent
Usage
Query
$waveapp = new \Subbe\WaveApp\WaveApp();
$countries = $waveapp->countries();
or, with parameters...
$waveapp = new \Subbe\WaveApp\WaveApp();
$country = $waveapp->country(['code' => 'US']);
Mutation
$waveapp = new \Subbe\WaveApp\WaveApp();
$customer = [
"input" => [
"businessId" => "<REPLACE-THIS-WITH-THE-BUSINESS-ID>",
"name" => "Lucifer Morningstar",
"firstName" => "Lucifer",
"lastName" => "Morningstar",
"displayId" => "Lucifer",
"email" => "lucifer.morningstar@hell.com",
"mobile" => "6666666",
"phone" => "6666666",
"fax" => "",
"address" => [
"addressLine1" => "666 Diablo Street",
"addressLine2" => "Hell's Kitchen",
"city" => "New York",
"postalCode" => "10018",
"countryCode" => "US"
],
"tollFree" => "",
"website" => "",
"internalNotes" => "",
"currency" => "USD",
"shippingDetails" => [
"name" => "Lucifer",
"phone" => "6666666",
"instructions" => "pray",
"address" => [
"addressLine1" => "666 Diablo Street",
"addressLine2" => "Hell's Kitchen",
"city" => "New York",
"postalCode" => "10018",
"countryCode" => "US"
]
]
]
];
$newCustomer = $waveapp->customerCreate($customer, "CustomerCreateInput");
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.