Table of Contents

Class ServiceTypeClient

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

Client for interacting with the ServiceType resource.

public class ServiceTypeClient : SingletonResourceClient<ServiceType, ServiceTypeResource, ServiceTypeResponse>
Inheritance
ServiceTypeClient
Inherited Members

Constructors

ServiceTypeClient(HttpClient, Uri)

Client for interacting with the ServiceType resource.

public ServiceTypeClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Properties

Attachments

Associated Attachments.

public PaginatedAttachmentClient Attachments { get; }

Property Value

PaginatedAttachmentClient

ItemNoteCategories

Associated ItemNoteCategories.

public PaginatedItemNoteCategoryClient ItemNoteCategories { get; }

Property Value

PaginatedItemNoteCategoryClient

LiveControllers

Associated LiveControllers.

public PaginatedLiveControllerClient LiveControllers { get; }

Property Value

PaginatedLiveControllerClient

PlanNoteCategories

Associated PlanNoteCategories.

public PaginatedPlanNoteCategoryClient PlanNoteCategories { get; }

Property Value

PaginatedPlanNoteCategoryClient

PlanTemplates

Associated PlanTemplates.

public PaginatedPlanTemplateClient PlanTemplates { get; }

Property Value

PaginatedPlanTemplateClient

PlanTimes

Associated PlanTimes.

public PaginatedPlanTimeClient PlanTimes { get; }

Property Value

PaginatedPlanTimeClient

Plans

Associated Plans.

public PaginatedPlanClient Plans { get; }

Property Value

PaginatedPlanClient

PublicView

Associated PublicView.

public PublicViewClient PublicView { get; }

Property Value

PublicViewClient

TeamPositions

Associated TeamPositions.

public PaginatedTeamPositionClient TeamPositions { get; }

Property Value

PaginatedTeamPositionClient

Teams

Associated Teams.

public PaginatedTeamClient Teams { get; }

Property Value

PaginatedTeamClient

TimePreferenceOptions

Associated TimePreferenceOptions.

public PaginatedTimePreferenceOptionClient TimePreferenceOptions { get; }

Property Value

PaginatedTimePreferenceOptionClient

UnscopedPlans

Associated UnscopedPlans.

public PaginatedPlanClient UnscopedPlans { get; }

Property Value

PaginatedPlanClient

Methods

CreatePlansAsync(CancellationToken)

Create multiple plans
This action provides the abillity to create multiple plans with a single API request.

Accepted attributes:

- count (Integer) The number of plans to create. (max 12, default 1)

- copy_items (Boolean) Copy Items from another plan. (default false)

- copy_people (Boolean) Copy People from another plan. (default false)

- team_ids (Array[Integer]) IDs of teams to copy people from when copy_people is set to true.
If nil, copy_people copies from all teams. (default nil)

- copy_notes (Boolean) Copy Notes from another plan. (default false)

- as_template (Boolean) Create the new plans as templates (default false)

- base_date (ISO 8601 Date) The date from which to start building the plans. (default false)

Accepted Relationships

- plan (optional) The plan from which to copy times, items, people, and notes

- template (optional) Collection of templates from which to copy items, people, and notes (not times) for each new plan.
Order dependant. Takes precedence over plan.

public Task CreatePlansAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

DeleteAsync(CancellationToken)

Deletes the ServiceType resource asynchronously.

public Task DeleteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task representing the asynchronous delete operation.

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

GetAsync(CancellationToken)

Fetches the ServiceType resource asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTypeResponse>

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

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

PatchAsync(ServiceType, CancellationToken)

Updates an existing ServiceType resource asynchronously.

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

Parameters

resource ServiceType

The resource data to be sent in the patch request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTypeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PatchAsync(JsonApiDocument<ServiceTypeResource>, CancellationToken)

Updates an existing ServiceType resource asynchronously.

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

Parameters

document JsonApiDocument<ServiceTypeResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ServiceTypeResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.