Download the PHP package michaelhull/connectwise-php-client without Composer
On this page you can find all versions of the php package michaelhull/connectwise-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download michaelhull/connectwise-php-client
More information about michaelhull/connectwise-php-client
Files in michaelhull/connectwise-php-client
Package connectwise-php-client
Short Description SPINEN's PHP Client for ConnectWise.
License MIT
Informations about the package connectwise-php-client
SPINEN's ConnectWise PHP Client
PHP client for the RestFull ConnectWise APIs. This package used to be based on the SOAP APIs & had 3 separate repositories, but as of this version there is only this one.
We solely use Laravel for our applications, so there is some Laravel specific files that you can use if you are using this client in a Laravel application. We have tried to make sure that you can use the client outside of Laravel, and have some documentation about it below.
Note about the integration
We are using the "Member Impersonation" model where you setup an integrator username & password with access to the "Member API", which makes all calls to ConnectWise performed under the permission of the user (member id) of the application.
We make all of our ConnectWise users' member ID equal to their email (i.e. [email protected] has a member ID of joedoe in connectwise) [NOTE: The "." was removed from joe.doe as ConnectWise does not allow dots in the member ID]. By following this convention, we can infer the member ID from the logged in user's email address in our applications. We have included a trait that you can use on the User model that will preform the logic above.
Laravel Configuration and Usage
Configuration
-
Add the following to ...
-
Add the appropriate values to your ...
-
Add the provider to
-
[Optional] Add the alias to
- Use the trait on the User model, which is located at , if your ConnectWise member_id is a match to your email as described above. If you do not follow that convention, then you can define your own accessor on the User model or just add a column to your user table that you populate with the appropriate values.
Usage
Here is an example of getting the system information...
As of version 3.1.0, the response is either a Laravel collection of models or a single model. You can see the models in . They all extend , so you can see the methods that they provide.
Same call using the facade...
Non-Laravel Usage
To use the client outside of Laravel, you just need to new-up the objects...
All versions of connectwise-php-client with dependencies
guzzlehttp/guzzle Version ^6.2
illuminate/support Version ~5.3
nesbot/carbon Version ~1.20