Skip to content

Latest commit

 

History

History
318 lines (243 loc) · 20.4 KB

File metadata and controls

318 lines (243 loc) · 20.4 KB

CollectionTicketComments

(IssueTracking.CollectionTicketComments)

Overview

Available Operations

List

List Comments

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;

var sdk = new Apideck(
    apiKey: "<YOUR_BEARER_TOKEN_HERE>",
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);

IssueTrackingCollectionTicketCommentsAllRequest req = new IssueTrackingCollectionTicketCommentsAllRequest() {
    CollectionId = "apideck-io",
    TicketId = "<id>",
    ServiceId = "salesforce",
    Sort = new CommentsSort() {
        By = CommentsSortBy.CreatedAt,
        Direction = SortDirection.Desc,
    },
    PassThrough = new Dictionary<string, object>() {
        { "search", "San Francisco" },
    },
    Fields = "id,updated_at",
};

IssueTrackingCollectionTicketCommentsAllResponse? res = await sdk.IssueTracking.CollectionTicketComments.ListAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

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

Response

IssueTrackingCollectionTicketCommentsAllResponse

Errors

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

Create

Create Comment

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;

var sdk = new Apideck(
    apiKey: "<YOUR_BEARER_TOKEN_HERE>",
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);

IssueTrackingCollectionTicketCommentsAddRequest req = new IssueTrackingCollectionTicketCommentsAddRequest() {
    CollectionId = "apideck-io",
    TicketId = "<id>",
    CollectionTicketComment = new CollectionTicketCommentInput() {
        Body = "What internet provider do you use?",
        PassThrough = new List<PassThroughBody>() {
            new PassThroughBody() {
                ServiceId = "<id>",
                ExtendPaths = new List<ExtendPaths>() {
                    new ExtendPaths() {
                        Path = "$.nested.property",
                        Value = new Dictionary<string, object>() {
                            { "TaxClassificationRef", new Dictionary<string, object>() {
                                { "value", "EUC-99990201-V1-00020000" },
                            } },
                        },
                    },
                },
            },
        },
    },
    ServiceId = "salesforce",
};

var res = await sdk.IssueTracking.CollectionTicketComments.CreateAsync(req);

// handle response

Parameters

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

Response

IssueTrackingCollectionTicketCommentsAddResponse

Errors

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

Get

Get Comment

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;

var sdk = new Apideck(
    apiKey: "<YOUR_BEARER_TOKEN_HERE>",
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);

IssueTrackingCollectionTicketCommentsOneRequest req = new IssueTrackingCollectionTicketCommentsOneRequest() {
    Id = "<id>",
    CollectionId = "apideck-io",
    TicketId = "<id>",
    ServiceId = "salesforce",
    Fields = "id,updated_at",
};

IssueTrackingCollectionTicketCommentsOneResponse? res = await sdk.IssueTracking.CollectionTicketComments.GetAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

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

Response

IssueTrackingCollectionTicketCommentsOneResponse

Errors

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

Update

Update Comment

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;

var sdk = new Apideck(
    apiKey: "<YOUR_BEARER_TOKEN_HERE>",
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);

IssueTrackingCollectionTicketCommentsUpdateRequest req = new IssueTrackingCollectionTicketCommentsUpdateRequest() {
    Id = "<id>",
    CollectionId = "apideck-io",
    TicketId = "<id>",
    CollectionTicketComment = new CollectionTicketCommentInput() {
        Body = "What internet provider do you use?",
        PassThrough = new List<PassThroughBody>() {
            new PassThroughBody() {
                ServiceId = "<id>",
                ExtendPaths = new List<ExtendPaths>() {
                    new ExtendPaths() {
                        Path = "$.nested.property",
                        Value = new Dictionary<string, object>() {
                            { "TaxClassificationRef", new Dictionary<string, object>() {
                                { "value", "EUC-99990201-V1-00020000" },
                            } },
                        },
                    },
                },
            },
        },
    },
    ServiceId = "salesforce",
};

var res = await sdk.IssueTracking.CollectionTicketComments.UpdateAsync(req);

// handle response

Parameters

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

Response

IssueTrackingCollectionTicketCommentsUpdateResponse

Errors

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

Delete

Delete Comment

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;

var sdk = new Apideck(
    apiKey: "<YOUR_BEARER_TOKEN_HERE>",
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);

IssueTrackingCollectionTicketCommentsDeleteRequest req = new IssueTrackingCollectionTicketCommentsDeleteRequest() {
    Id = "<id>",
    CollectionId = "apideck-io",
    TicketId = "<id>",
    ServiceId = "salesforce",
};

var res = await sdk.IssueTracking.CollectionTicketComments.DeleteAsync(req);

// handle response

Parameters

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

Response

IssueTrackingCollectionTicketCommentsDeleteResponse

Errors

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