Class PaginatedPhoneNumberClient
- Namespace
- Crews.PlanningCenter.Api.People.V2022_01_28
- 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
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.
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
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.