Table of Contents

Class PaginatedServiceTypeClient

Namespace
Crews.PlanningCenter.Api.Services.V2018_08_01
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with ServiceType collection resources.

public class PaginatedServiceTypeClient : PaginatedResourceClient<ServiceType, ServiceTypeResource, ServiceTypeCollectionResponse, ServiceTypeResponse>
Inheritance
PaginatedServiceTypeClient
Inherited Members

Constructors

PaginatedServiceTypeClient(HttpClient, Uri)

Client for interacting with ServiceType collection resources.

public PaginatedServiceTypeClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

GetAsync(CancellationToken)

Fetches a paginated list of ServiceType resources asynchronously.

public Task<ServiceTypeCollectionResponse> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTypeCollectionResponse>

A task representing the asynchronous operation, containing a paginated list of ServiceType resources.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

IncludeTimePreferenceOptions()

Include related TimePreferenceOptions resources in the response.

public ServiceTypeClient IncludeTimePreferenceOptions()

Returns

ServiceTypeClient

OrderByName()

Sort response items by the Name attribute.

public ServiceTypeClient OrderByName()

Returns

ServiceTypeClient

OrderByNameDescending()

Sort response items by the Name attribute. Use reverse order.

public ServiceTypeClient OrderByNameDescending()

Returns

ServiceTypeClient

OrderBySequence()

Sort response items by the Sequence attribute.

public ServiceTypeClient OrderBySequence()

Returns

ServiceTypeClient

OrderBySequenceDescending()

Sort response items by the Sequence attribute. Use reverse order.

public ServiceTypeClient OrderBySequenceDescending()

Returns

ServiceTypeClient

PostAsync(ServiceType, CancellationToken)

Creates a new ServiceType resource asynchronously.

public Task<ServiceTypeResponse> PostAsync(ServiceType resource, CancellationToken cancellationToken = default)

Parameters

resource ServiceType

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTypeResponse>

A task representing the asynchronous operation, containing the created ServiceType resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<ServiceTypeResource>, CancellationToken)

Creates a new ServiceType resource asynchronously.

public Task<ServiceTypeResponse> PostAsync(JsonApiDocument<ServiceTypeResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<ServiceTypeResource>

The JSON:API document to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTypeResponse>

A task representing the asynchronous operation, containing the created ServiceType resource.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereId(string)

Query response items by the Id attribute.

public ServiceTypeClient WhereId(string value)

Parameters

value string

Returns

ServiceTypeClient

WhereName(string)

Query response items by the Name attribute.

public ServiceTypeClient WhereName(string value)

Parameters

value string

Returns

ServiceTypeClient

WhereParentId(int)

Query response items by the ParentId attribute.

public ServiceTypeClient WhereParentId(int value)

Parameters

value int

Returns

ServiceTypeClient

WithId(string)

Creates a new instance of a ServiceType client for a specific resource ID.

public ServiceTypeClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

ServiceTypeClient

A new instance of the resource client for the specified resource ID.