Class PaginatedPhoneNumberClient
- Namespace
- Crews.PlanningCenter.Api.People.V2019_10_10
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with PhoneNumber collection resources.
public class PaginatedPhoneNumberClient : PaginatedResourceClient<PhoneNumber, PhoneNumberResource, PhoneNumberCollectionResponse, PhoneNumberResponse>
- Inheritance
-
PaginatedResourceClient<PhoneNumber, PhoneNumberResource, PhoneNumberCollectionResponse, PhoneNumberResponse>PaginatedPhoneNumberClient
- Inherited Members
Constructors
PaginatedPhoneNumberClient(HttpClient, Uri)
Client for interacting with PhoneNumber collection resources.
public PaginatedPhoneNumberClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedPhoneNumberClient AddCustomParameter(string parameter, string value)
Parameters
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
filterstringThe 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
cancellationTokenCancellationTokenA 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
countintThe number of items to skip.
Returns
- PaginatedPhoneNumberClient
The current PaginatedPhoneNumberClient instance.
OrderByCarrier()
Sort response items by the Carrier attribute.
public PhoneNumberClient OrderByCarrier()
Returns
OrderByCarrierDescending()
Sort response items by the Carrier attribute. Use reverse order.
public PhoneNumberClient OrderByCarrierDescending()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public PhoneNumberClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public PhoneNumberClient OrderByCreatedAtDescending()
Returns
OrderByLocation()
Sort response items by the Location attribute.
public PhoneNumberClient OrderByLocation()
Returns
OrderByLocationDescending()
Sort response items by the Location attribute. Use reverse order.
public PhoneNumberClient OrderByLocationDescending()
Returns
OrderByNumber()
Sort response items by the Number attribute.
public PhoneNumberClient OrderByNumber()
Returns
OrderByNumberDescending()
Sort response items by the Number attribute. Use reverse order.
public PhoneNumberClient OrderByNumberDescending()
Returns
OrderByPrimary()
Sort response items by the Primary attribute.
public PhoneNumberClient OrderByPrimary()
Returns
OrderByPrimaryDescending()
Sort response items by the Primary attribute. Use reverse order.
public PhoneNumberClient OrderByPrimaryDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public PhoneNumberClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public PhoneNumberClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedPhoneNumberClient PerPage(int count)
Parameters
countintThe 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
resourcePhoneNumberThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA 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
documentJsonApiDocument<PhoneNumberResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA 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
valuestring
Returns
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public PhoneNumberClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereLocation(string)
Query response items by the Location attribute.
public PhoneNumberClient WhereLocation(string value)
Parameters
valuestring
Returns
WhereNumber(string)
Query response items by the Number attribute.
public PhoneNumberClient WhereNumber(string value)
Parameters
valuestring
Returns
WherePrimary(bool)
Query response items by the Primary attribute.
public PhoneNumberClient WherePrimary(bool value)
Parameters
valuebool
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public PhoneNumberClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a PhoneNumber client for a specific resource ID.
public PhoneNumberClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- PhoneNumberClient
A new instance of the resource client for the specified resource ID.