g4 / customer-support
customer support php library
Installs: 17 281
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- php: >=5.6
- g4/constants: 0.*
- g4/factory: 1.*
- g4/gateway: 2.*
- g4/value-object: *
Requires (Dev)
- codeception/codeception: 2.*
- g4/code-coverage: 1.*
- phpunit/php-code-coverage: 2.*
- phpunit/phpunit: 4.8.*
- squizlabs/php_codesniffer: 3.*
This package is auto-updated.
Last update: 2024-12-23 21:10:15 UTC
README
customer-support - php library
Install
Install through composer package manager. Find it on packagist.
composer require g4/customer-support
Usage
Zendesk instance
<?php $adapter = 'Zendesk'; $options = (new \G4\Gateway\Options()) ->addHeader('Authorization', 'Basic *********************************') ->addHeader('Content-Type', 'application/json'); $gateway = new \G4\Gateway\Http('url', $options); $data = new Dictionary([ 'name' => 'test' 'email' => 'test@gmail.com' 'subject' => 'test' 'comment' => 'test' ]); $customerSupport = new (G4\CustomerSupport\CustomerSupportFactory) $customerSupport ->setEmail(new Email($data->get('email'))) ->setName(new StringLiteral($data->get('name'))) ->setSubject(new StringLiteral($data->get('subject'))) ->setComment(new StringLiteral($data->get('comment'))) ->setGateway($gateway) ->setAdapter($adapter); ->createInstance()
Install dependencies
composer install
Run unit tests
make unit-tests
License
(The MIT License) see LICENSE file for details...