### Installing PHP Dependencies with Composer Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Executes the Composer command to download and install the packages listed in the composer.json file, including the WaveApps client library. ```Bash composer update ``` -------------------------------- ### Publishing Vendor Assets/Configuration in Laravel Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Runs the Artisan command to publish configuration files or other assets provided by the installed WaveApps client package into the Laravel application directory. ```Bash php artisan vendor:publish ``` -------------------------------- ### Fetching Specific Country by Code (PHP) Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Shows an alternative query example, demonstrating how to use the Waveapps client to fetch details for a single country by providing its country code as a parameter. ```PHP $country = $waveapp->country(['code' => 'US']); ``` -------------------------------- ### Creating a Customer via WaveApps Client Mutation (PHP) Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Illustrates how to use the Waveapps client to perform a 'customerCreate' mutation, providing a detailed input array including contact, address, and shipping information for the new customer. ```PHP $waveapp = new \Amritms\WaveappsClientPhp\Waveapps(); $customer = [ "input" => [ "businessId" => "", "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"); ``` -------------------------------- ### Initializing WaveApps Client and Fetching Countries (PHP) Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Demonstrates how to instantiate the Waveapps client class and call a simple query method to retrieve a list of all available countries from the WaveApps API. ```PHP $waveapp = new \Amritms\WaveappsClientPhp\Waveapps(); $countries = $waveapp->countries(); ``` -------------------------------- ### Configuring WaveApps Client Environment Variables Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Lists the necessary environment variables to configure the WaveApps client library, including API credentials and endpoint URLs for authentication and GraphQL queries. ```INI WAVE_CLIENT_ID= WAVE_CLIENT_SECRET= WAVE_GRAPHQL_AUTH_URI=https://api.waveapps.com/oauth2/token/ WAVE_GRAPHQL_URI=https://gql.waveapps.com/graphql/public ``` -------------------------------- ### Adding Composer Dependency for WaveApps Client PHP Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Specifies the required package and version to include the WaveApps client library in your PHP project using Composer. ```JSON "amritms/waveapps-client-php":"0.1" ``` -------------------------------- ### Defining Laravel Route for WaveApps Token Handling Source: https://github.com/amritms/waveapps-client-php/blob/master/README.md Sets up a POST route within a Laravel application to handle the OAuth2 token callback from WaveApps, directing the request to a specific controller method. ```PHP Route::post('webapps/token', 'WebappsController@handleToken'); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.