Table of Contents

Class PaginatedPhoneNumberClient

Namespace
Crews.PlanningCenter.Api.People.V2025_07_17
Assembly
Crews.PlanningCenter.Api.dll

Client for interacting with PhoneNumber collection resources.

public class PaginatedPhoneNumberClient : PaginatedResourceClient<PhoneNumber, PhoneNumberResource, PhoneNumberCollectionResponse, PhoneNumberResponse>
Inheritance
PaginatedPhoneNumberClient
Inherited Members

Constructors

PaginatedPhoneNumberClient(HttpClient, Uri)

Client for interacting with PhoneNumber collection resources.

public PaginatedPhoneNumberClient(HttpClient httpClient, Uri uri)

Parameters

httpClient HttpClient
uri Uri

Methods

AddCustomParameter(string, string)

Adds a custom query parameter to the request URI.

public PaginatedPhoneNumberClient AddCustomParameter(string parameter, string value)

Parameters

parameter string

The name of the query parameter.

value string

The value of the query parameter.

Returns

PaginatedPhoneNumberClient

The current PaginatedPhoneNumberClient instance.

ClearParameters()

Removes the entire query string from the request URI.

public PaginatedPhoneNumberClient ClearParameters()

Returns

PaginatedPhoneNumberClient

The current PaginatedPhoneNumberClient instance.

Filter(string)

Adds a filter query parameter to the request.

public PaginatedPhoneNumberClient Filter(string filter)

Parameters

filter string

The filter criteria.

Returns

PaginatedPhoneNumberClient

The current PaginatedPhoneNumberClient instance.

Remarks

See Planning Center API documentation for details on supported filter values for this resource.

GetAsync(CancellationToken)

Fetches a paginated list of PhoneNumber resources asynchronously.

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

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PhoneNumberCollectionResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

Offset(int)

Sets the item offset in the paginated response.

public PaginatedPhoneNumberClient Offset(int count)

Parameters

count int

The number of items to skip.

Returns

PaginatedPhoneNumberClient

The current PaginatedPhoneNumberClient instance.

OrderByCarrier()

Sort response items by the Carrier attribute.

public PhoneNumberClient OrderByCarrier()

Returns

PhoneNumberClient

OrderByCarrierDescending()

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

public PhoneNumberClient OrderByCarrierDescending()

Returns

PhoneNumberClient

OrderByCreatedAt()

Sort response items by the CreatedAt attribute.

public PhoneNumberClient OrderByCreatedAt()

Returns

PhoneNumberClient

OrderByCreatedAtDescending()

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

public PhoneNumberClient OrderByCreatedAtDescending()

Returns

PhoneNumberClient

OrderByLocation()

Sort response items by the Location attribute.

public PhoneNumberClient OrderByLocation()

Returns

PhoneNumberClient

OrderByLocationDescending()

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

public PhoneNumberClient OrderByLocationDescending()

Returns

PhoneNumberClient

OrderByNumber()

Sort response items by the Number attribute.

public PhoneNumberClient OrderByNumber()

Returns

PhoneNumberClient

OrderByNumberDescending()

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

public PhoneNumberClient OrderByNumberDescending()

Returns

PhoneNumberClient

OrderByPrimary()

Sort response items by the Primary attribute.

public PhoneNumberClient OrderByPrimary()

Returns

PhoneNumberClient

OrderByPrimaryDescending()

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

public PhoneNumberClient OrderByPrimaryDescending()

Returns

PhoneNumberClient

OrderByUpdatedAt()

Sort response items by the UpdatedAt attribute.

public PhoneNumberClient OrderByUpdatedAt()

Returns

PhoneNumberClient

OrderByUpdatedAtDescending()

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

public PhoneNumberClient OrderByUpdatedAtDescending()

Returns

PhoneNumberClient

PerPage(int)

Sets the number of items to be returned per page in the paginated response.

public PaginatedPhoneNumberClient PerPage(int count)

Parameters

count int

The number of items to be returned per page.

Returns

PaginatedPhoneNumberClient

The current PaginatedPhoneNumberClient instance.

PostAsync(PhoneNumber, CancellationToken)

Creates a new PhoneNumber resource asynchronously.

public Task<PhoneNumberResponse> PostAsync(PhoneNumber resource, CancellationToken cancellationToken = default)

Parameters

resource PhoneNumber

The resource data to be sent in the POST request.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PhoneNumberResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

PostAsync(JsonApiDocument<PhoneNumberResource>, CancellationToken)

Creates a new PhoneNumber resource asynchronously.

public Task<PhoneNumberResponse> PostAsync(JsonApiDocument<PhoneNumberResource> document, CancellationToken cancellationToken = default)

Parameters

document JsonApiDocument<PhoneNumberResource>

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

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<PhoneNumberResponse>

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

Exceptions

JsonApiException

Thrown when the HTTP response indicates a failure status code.

WhereCarrier(string)

Query response items by the Carrier attribute.

public PhoneNumberClient WhereCarrier(string value)

Parameters

value string

Returns

PhoneNumberClient

WhereCreatedAt(DateTime)

Query response items by the CreatedAt attribute.

public PhoneNumberClient WhereCreatedAt(DateTime value)

Parameters

value DateTime

Returns

PhoneNumberClient

WhereLocation(string)

Query response items by the Location attribute.

public PhoneNumberClient WhereLocation(string value)

Parameters

value string

Returns

PhoneNumberClient

WhereNumber(string)

Query response items by the Number attribute.

public PhoneNumberClient WhereNumber(string value)

Parameters

value string

Returns

PhoneNumberClient

WherePrimary(bool)

Query response items by the Primary attribute.

public PhoneNumberClient WherePrimary(bool value)

Parameters

value bool

Returns

PhoneNumberClient

WhereUpdatedAt(DateTime)

Query response items by the UpdatedAt attribute.

public PhoneNumberClient WhereUpdatedAt(DateTime value)

Parameters

value DateTime

Returns

PhoneNumberClient

WithId(string)

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

public PhoneNumberClient WithId(string id)

Parameters

id string

The ID of the resource to create a client for.

Returns

PhoneNumberClient

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