(issueTracking->collectionTickets)
- create - Create Ticket
- list - List Tickets
- delete - Delete Ticket
- get - Get Ticket
- update - Update Ticket
Create Ticket
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
use Apideck\Unify\Utils;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity($security)->build();
$request = new Operations\IssueTrackingCollectionTicketsAddRequest(
collectionId: 'apideck-io',
ticket: new Components\TicketInput(
assignees: [
new Components\AssigneeInput(
id: '12345',
),
],
tags: [
new Components\CollectionTagInput(
id: '12345',
),
],
passThrough: [
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
],
parentId: '12345',
type: 'Technical',
subject: 'Technical Support Request',
description: 'I am facing issues with my internet connection',
status: 'open',
priority: Components\Priority::High,
dueDate: Utils\Utils::parseDateTime('2020-09-30T07:43:32.000Z'),
),
serviceId: 'salesforce',
);
$response = $sdk->issueTracking->collectionTickets->create(
request: $request
);
if ($response->createTicketResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\IssueTrackingCollectionTicketsAddRequest | ✔️ | The request object to use for the request. |
?Operations\IssueTrackingCollectionTicketsAddResponse
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 Tickets
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity($security)->build();
$request = new Operations\IssueTrackingCollectionTicketsAllRequest(
collectionId: 'apideck-io',
serviceId: 'salesforce',
sort: new Components\TicketsSort(
by: Components\TicketsSortBy::CreatedAt,
direction: Components\SortDirection::Desc,
),
filter: new Components\IssuesFilter(
status: [
'open',
],
),
passThrough: [
'search' => 'San Francisco',
],
fields: 'id,updated_at',
);
$responses = $sdk->issueTracking->collectionTickets->list(
request: $request
);
foreach ($responses as $response) {
if ($response->httpMeta->response->getStatusCode() === 200) {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\IssueTrackingCollectionTicketsAllRequest | ✔️ | The request object to use for the request. |
?Operations\IssueTrackingCollectionTicketsAllResponse
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 Ticket
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity($security)->build();
$request = new Operations\IssueTrackingCollectionTicketsDeleteRequest(
ticketId: '<id>',
collectionId: 'apideck-io',
serviceId: 'salesforce',
);
$response = $sdk->issueTracking->collectionTickets->delete(
request: $request
);
if ($response->deleteTicketResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\IssueTrackingCollectionTicketsDeleteRequest | ✔️ | The request object to use for the request. |
?Operations\IssueTrackingCollectionTicketsDeleteResponse
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 Ticket
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity($security)->build();
$request = new Operations\IssueTrackingCollectionTicketsOneRequest(
ticketId: '<id>',
collectionId: 'apideck-io',
serviceId: 'salesforce',
fields: 'id,updated_at',
);
$response = $sdk->issueTracking->collectionTickets->get(
request: $request
);
if ($response->getTicketResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\IssueTrackingCollectionTicketsOneRequest | ✔️ | The request object to use for the request. |
?Operations\IssueTrackingCollectionTicketsOneResponse
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 Ticket
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
use Apideck\Unify\Utils;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity($security)->build();
$request = new Operations\IssueTrackingCollectionTicketsUpdateRequest(
ticketId: '<id>',
collectionId: 'apideck-io',
ticket: new Components\TicketInput(
assignees: [
new Components\AssigneeInput(
id: '12345',
),
],
tags: [
new Components\CollectionTagInput(
id: '12345',
),
],
passThrough: [
new Components\PassThroughBody(
serviceId: '<id>',
extendPaths: [
new Components\ExtendPaths(
path: '$.nested.property',
value: [
'TaxClassificationRef' => [
'value' => 'EUC-99990201-V1-00020000',
],
],
),
],
),
],
parentId: '12345',
type: 'Technical',
subject: 'Technical Support Request',
description: 'I am facing issues with my internet connection',
status: 'open',
priority: Components\Priority::High,
dueDate: Utils\Utils::parseDateTime('2020-09-30T07:43:32.000Z'),
),
serviceId: 'salesforce',
);
$response = $sdk->issueTracking->collectionTickets->update(
request: $request
);
if ($response->updateTicketResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\IssueTrackingCollectionTicketsUpdateRequest | ✔️ | The request object to use for the request. |
?Operations\IssueTrackingCollectionTicketsUpdateResponse
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 | */* |