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.
Open you composer.json file and add
"subbe/waveapp":"0.3"
and go to the location of your composer file in terminal and run
composer update
php artisan vendor:publish
Update your .env file to include
WAVE_ACCESS_TOKEN=
WAVE_GRAPHQL_URI=
WAVE_BUSINESS_ID=
- user
- countries
- country
- businesses
- business
- currencies
- currency
- accountTypes
- accountSubyypes
-
customerCreate
-
customerPatch
-
customerDelete
-
accountCreate
-
accountPatch
-
accountArchive
-
productCreate
-
productPatch
-
productArchive
-
salesTaxCreate
-
salesTaxPatch
-
salesTaxRateCreate
-
salesTaxArchive
-
moneyTransactionCreate
-
invoiceCreate
-
invoiceDelete
-
invoiceSend
-
invoiceApprove
-
invoiceMarkSent
$waveapp = new \Subbe\WaveApp\WaveApp();
$countries = $waveapp->countries();
--- OR ---
$country = $waveapp->country(['code' => 'US']);
$waveapp = new \Subbe\WaveApp\WaveApp();
$customer = [
"input" => [
"businessId" => "<REPLACE-THIS-WITH-THE-BUSINESS-ID>",
"name" => "Lucifer Morningstar",
"firstName" => "Lucifer",
"lastName" => "Morningstar",
"displayId" => "Lucifer",
"email" => "[email protected]",
"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");