Skip to content

g4code/customer-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

customer-support

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...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •