Skip to content

bhaktaraz/waveapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP WaveApp Client

Simple PHP client for WaveApp

The original documentation is available at:

To use WaveApp, you will need to register on the developer portal.

Requirement & Install

  • Open terminal
  • cd /path-to-project
  • and run
composer require bhaktaraz/php-waveapp-client

Queries

  • user
  • countries
  • country
  • businesses
  • business
  • currencies
  • currency
  • accountTypes
  • accountSubTypes

Mutations

  • customerCreate

  • customerPatch

  • customerDelete

  • accountCreate

  • accountPatch

  • accountArchive

  • productCreate

  • productPatch

  • productArchive

  • salesTaxCreate

  • salesTaxPatch

  • salesTaxRateCreate

  • salesTaxArchive

  • moneyTransactionCreate

  • invoiceCreate

  • invoiceDelete

  • invoiceSend

  • invoiceApprove

  • invoiceMarkSent

How to use

Query

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

--- OR ---

$country = $waveapp->country(['code' => 'US']);

Mutation

$waveapp = new \Bhaktaraz\WaveApp\WaveApp();
$customer = [
    "input" => [
        "businessId" => "<REPLACE-THIS-WITH-THE-BUSINESS-ID>",
        "name" => "The Garuda Express",
        "firstName" => "Lokendra",
        "lastName" => "Saud",
        "displayId" => "Lokendra",
        "email" => "lokendra@thegarudaexpress.com",
        "mobile" => "980000000000",
        "phone" => "01-955555",
        "fax" => "",
        "address" => [
            "addressLine1" => "Mahadevsthan",
            "addressLine2" => "Baneshwor",
            "city" => "Kathmandu",
            "postalCode" => "440466",
            "countryCode" => "NP"
        ],
        "tollFree" => "",
        "website" => "",
        "internalNotes" => "",
        "currency" => "NPR",
        "shippingDetails" => [
            "name" => "Lokendra",
            "phone" => "9800000000",
            "instructions" => "Hey",
            "address" => [
                "addressLine1" => "Mahadevsthan",
                "addressLine2" => "Baneshwor",
                "city" => "Kathmandu",
                "postalCode" => "440466",
                "countryCode" => "NP"
            ]
        ]
    ] 
];

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

Note: Inspired from subbe/waveapp which is created for laravel apps. For my need I've created this generalized repo and can be used in any PHP applications.

About

Simple PHP client for Wave App

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages