Class WorkflowCardClient
- Namespace
- Crews.PlanningCenter.Api.People.V2019_01_14
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with the WorkflowCard resource.
public class WorkflowCardClient : SingletonResourceClient<WorkflowCard, WorkflowCardResource, WorkflowCardResponse>
- Inheritance
-
WorkflowCardClient
- Inherited Members
Constructors
WorkflowCardClient(HttpClient, Uri)
Client for interacting with the WorkflowCard resource.
public WorkflowCardClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Properties
Activities
Associated Activities.
public PaginatedWorkflowCardActivityClient Activities { get; }
Property Value
Assignee
Associated Assignee.
public PersonClient Assignee { get; }
Property Value
CurrentStep
Associated CurrentStep.
public WorkflowStepClient CurrentStep { get; }
Property Value
Notes
Associated Notes.
public PaginatedWorkflowCardNoteClient Notes { get; }
Property Value
Person
Associated Person.
public PersonClient Person { get; }
Property Value
Workflow
Associated Workflow.
public WorkflowClient Workflow { get; }
Property Value
Methods
DeleteAsync(CancellationToken)
Deletes the WorkflowCard resource asynchronously.
public Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA 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 WorkflowCard resource asynchronously.
public Task<WorkflowCardResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<WorkflowCardResponse>
A task representing the asynchronous operation, containing the WorkflowCard resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
GoBackAsync(CancellationToken)
Move a Workflow Card back to the previous step.
public Task GoBackAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
IncludeAssignee()
Include related Assignee resources in the response.
public WorkflowCardClient IncludeAssignee()
Returns
IncludeCurrentStep()
Include related CurrentStep resources in the response.
public WorkflowCardClient IncludeCurrentStep()
Returns
IncludePerson()
Include related Person resources in the response.
public WorkflowCardClient IncludePerson()
Returns
IncludeWorkflow()
Include related Workflow resources in the response.
public WorkflowCardClient IncludeWorkflow()
Returns
PatchAsync(WorkflowCard, CancellationToken)
Updates an existing WorkflowCard resource asynchronously.
public Task<WorkflowCardResponse> PatchAsync(WorkflowCard resource, CancellationToken cancellationToken = default)
Parameters
resourceWorkflowCardThe resource data to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<WorkflowCardResponse>
A task representing the asynchronous operation, containing the updated WorkflowCard resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PatchAsync(JsonApiDocument<WorkflowCardResource>, CancellationToken)
Updates an existing WorkflowCard resource asynchronously.
public Task<WorkflowCardResponse> PatchAsync(JsonApiDocument<WorkflowCardResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<WorkflowCardResource>The JSON:API document to be sent in the patch request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<WorkflowCardResponse>
A task representing the asynchronous operation, containing the updated WorkflowCard resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PromoteAsync(CancellationToken)
Move a Workflow Card to the next step.
public Task PromoteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
RemoveAsync(CancellationToken)
Removes a card
public Task RemoveAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
RestoreAsync(CancellationToken)
Restore a card
public Task RestoreAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
SendEmailAsync(CancellationToken)
Sends an email to the subject of the card
Pass in a subject and note.
public Task SendEmailAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
SkipStepAsync(CancellationToken)
Move a Workflow Card to the next step without completing the current step.
public Task SkipStepAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
SnoozeAsync(CancellationToken)
Snoozes a card for a specific duration
Pass in a duration in days.
public Task SnoozeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
UnsnoozeAsync(CancellationToken)
Unsnoozes a card
public Task UnsnoozeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken