subbe / waveapp
A Wrapper to consume WaveApp's GraphQL API
Installs: 500
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 2
Forks: 10
Open Issues: 0
Type:project
Requires
- guzzlehttp/guzzle: >=6.0
Requires (Dev)
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^8.3
This package is auto-updated.
Last update: 2024-11-29 06:10:07 UTC
README
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" => "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");
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.