ans-group/sdk-php

Add ability to reply to support requests

Closed this issue · 1 comments

https://developers.ukfast.io/documentation/pss#/Replies/post_pss_v1_requests__id__replies

We need to add the ability to reply to a support request through the SDK.

Example of testing:

<?php

require_once "./vendor/autoload.php";

$author = new \UKFast\SDK\PSS\Entities\Author;
$author->id = 1;

$reply = new \UKFast\SDK\PSS\Entities\Reply;
$reply->author = $author;
$reply->description = "test description goes here\nwith a new line";

$pss = (new \UKFast\SDK\PSS\Client)->auth('REDACTED');
try {
    $response = $pss->replies()->create(1, $reply);
} catch (\UKFast\SDK\Exception\ApiException $e) {
    var_dump($e->getErrors());
} catch (\Exception $e) {
    var_dump($e->getMessage());
}