Skip to content

Latest commit

 

History

History
359 lines (274 loc) · 18.7 KB

File metadata and controls

359 lines (274 loc) · 18.7 KB

CollectionTicketComments

(issueTracking->collectionTicketComments)

Overview

Available Operations

create

Create Comment

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;

$sdk = Unify\Apideck::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->build();

$request = new Operations\IssueTrackingCollectionTicketCommentsAddRequest(
    collectionId: 'apideck-io',
    ticketId: '<id>',
    collectionTicketComment: new Components\CollectionTicketCommentInput(
        passThrough: [
            new Components\PassThroughBody(
                serviceId: '<id>',
                extendPaths: [
                    new Components\ExtendPaths(
                        path: '$.nested.property',
                        value: [
                            'TaxClassificationRef' => [
                                'value' => 'EUC-99990201-V1-00020000',
                            ],
                        ],
                    ),
                ],
            ),
        ],
        body: 'What internet provider do you use?',
    ),
    serviceId: 'salesforce',
);

$response = $sdk->issueTracking->collectionTicketComments->create(
    request: $request
);

if ($response->createCommentResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\IssueTrackingCollectionTicketCommentsAddRequest ✔️ The request object to use for the request.

Response

?Operations\IssueTrackingCollectionTicketCommentsAddResponse

Errors

Error Type Status Code Content Type
Errors\BadRequestResponse 400 application/json
Errors\UnauthorizedResponse 401 application/json
Errors\PaymentRequiredResponse 402 application/json
Errors\NotFoundResponse 404 application/json
Errors\UnprocessableResponse 422 application/json
Errors\APIException 4XX, 5XX */*

list

List Comments

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;

$sdk = Unify\Apideck::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->build();

$request = new Operations\IssueTrackingCollectionTicketCommentsAllRequest(
    collectionId: 'apideck-io',
    ticketId: '<id>',
    serviceId: 'salesforce',
    sort: new Components\CommentsSort(
        by: Components\CommentsSortBy::CreatedAt,
        direction: Components\SortDirection::Desc,
    ),
    passThrough: [
        'search' => 'San Francisco',
    ],
    fields: 'id,updated_at',
);

$responses = $sdk->issueTracking->collectionTicketComments->list(
    request: $request
);


foreach ($responses as $response) {
    if ($response->httpMeta->response->getStatusCode() === 200) {
        // handle response
    }
}

Parameters

Parameter Type Required Description
$request Operations\IssueTrackingCollectionTicketCommentsAllRequest ✔️ The request object to use for the request.

Response

?Operations\IssueTrackingCollectionTicketCommentsAllResponse

Errors

Error Type Status Code Content Type
Errors\BadRequestResponse 400 application/json
Errors\UnauthorizedResponse 401 application/json
Errors\PaymentRequiredResponse 402 application/json
Errors\NotFoundResponse 404 application/json
Errors\UnprocessableResponse 422 application/json
Errors\APIException 4XX, 5XX */*

delete

Delete Comment

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Operations;

$sdk = Unify\Apideck::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->build();

$request = new Operations\IssueTrackingCollectionTicketCommentsDeleteRequest(
    id: '<id>',
    collectionId: 'apideck-io',
    ticketId: '<id>',
    serviceId: 'salesforce',
);

$response = $sdk->issueTracking->collectionTicketComments->delete(
    request: $request
);

if ($response->deleteCommentResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\IssueTrackingCollectionTicketCommentsDeleteRequest ✔️ The request object to use for the request.

Response

?Operations\IssueTrackingCollectionTicketCommentsDeleteResponse

Errors

Error Type Status Code Content Type
Errors\BadRequestResponse 400 application/json
Errors\UnauthorizedResponse 401 application/json
Errors\PaymentRequiredResponse 402 application/json
Errors\NotFoundResponse 404 application/json
Errors\UnprocessableResponse 422 application/json
Errors\APIException 4XX, 5XX */*

get

Get Comment

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Operations;

$sdk = Unify\Apideck::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->build();

$request = new Operations\IssueTrackingCollectionTicketCommentsOneRequest(
    id: '<id>',
    collectionId: 'apideck-io',
    ticketId: '<id>',
    serviceId: 'salesforce',
    fields: 'id,updated_at',
);

$responses = $sdk->issueTracking->collectionTicketComments->get(
    request: $request
);


foreach ($responses as $response) {
    if ($response->httpMeta->response->getStatusCode() === 200) {
        // handle response
    }
}

Parameters

Parameter Type Required Description
$request Operations\IssueTrackingCollectionTicketCommentsOneRequest ✔️ The request object to use for the request.

Response

?Operations\IssueTrackingCollectionTicketCommentsOneResponse

Errors

Error Type Status Code Content Type
Errors\BadRequestResponse 400 application/json
Errors\UnauthorizedResponse 401 application/json
Errors\PaymentRequiredResponse 402 application/json
Errors\NotFoundResponse 404 application/json
Errors\UnprocessableResponse 422 application/json
Errors\APIException 4XX, 5XX */*

update

Update Comment

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;

$sdk = Unify\Apideck::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->build();

$request = new Operations\IssueTrackingCollectionTicketCommentsUpdateRequest(
    id: '<id>',
    collectionId: 'apideck-io',
    ticketId: '<id>',
    collectionTicketComment: new Components\CollectionTicketCommentInput(
        passThrough: [
            new Components\PassThroughBody(
                serviceId: '<id>',
                extendPaths: [
                    new Components\ExtendPaths(
                        path: '$.nested.property',
                        value: [
                            'TaxClassificationRef' => [
                                'value' => 'EUC-99990201-V1-00020000',
                            ],
                        ],
                    ),
                ],
            ),
        ],
        body: 'What internet provider do you use?',
    ),
    serviceId: 'salesforce',
);

$response = $sdk->issueTracking->collectionTicketComments->update(
    request: $request
);

if ($response->updateCommentResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\IssueTrackingCollectionTicketCommentsUpdateRequest ✔️ The request object to use for the request.

Response

?Operations\IssueTrackingCollectionTicketCommentsUpdateResponse

Errors

Error Type Status Code Content Type
Errors\BadRequestResponse 400 application/json
Errors\UnauthorizedResponse 401 application/json
Errors\PaymentRequiredResponse 402 application/json
Errors\NotFoundResponse 404 application/json
Errors\UnprocessableResponse 422 application/json
Errors\APIException 4XX, 5XX */*