Show / Hide Table of Contents

Class EventService

Class representing a set of event-related functionality.

Inheritance
System.Object
EasyPostService
EventService
Implements
IEasyPostService
IDisposable
Inherited Members
EasyPostService.Client
EasyPostService.RequestAsync<T>(Method, String, CancellationToken, Nullable<Dictionary<String, Object>>, Nullable<String>, ApiVersion)
EasyPostService.RequestAsync(Method, String, CancellationToken, Nullable<Dictionary<String, Object>>, ApiVersion)
EasyPostService.Dispose()
EasyPostService.Dispose(Boolean)
Namespace: EasyPost.Services
Assembly: EasyPost.dll
Syntax
public class EventService : EasyPostService, IEasyPostService

Methods

| Improve this Doc View Source

All(All, CancellationToken)

List all Events. Related API documentation.

Declaration
public async Task<EventCollection> All(All parameters, CancellationToken cancellationToken = null)
Parameters
Type Name Description
All parameters

All parameter set.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<EventCollection>

EventCollection instance.

| Improve this Doc View Source

All(Nullable<Dictionary<String, Object>>, CancellationToken)

List all Events. Related API documentation.

Declaration
public async Task<EventCollection> All(Dictionary<string, object>? parameters = null, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.Nullable<Dictionary<System.String, System.Object>> parameters

Dictionary containing parameters to filter the results on. See All for valid keys.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<EventCollection>

EventCollection instance.

| Improve this Doc View Source

GetNextPage(EventCollection, Nullable<Int32>, CancellationToken)

Get the next page of a paginated EventCollection. Related API documentation.

Declaration
public async Task<EventCollection> GetNextPage(EventCollection collection, int? pageSize = null, CancellationToken cancellationToken = null)
Parameters
Type Name Description
EventCollection collection

The EventCollection to get the next page of.

System.Nullable<System.Int32> pageSize

The size of the next page.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<EventCollection>

The next page, as a EventCollection instance.

Exceptions
Type Condition
EndOfPaginationError

Thrown if there is no next page to retrieve.

| Improve this Doc View Source

Retrieve(String, CancellationToken)

Retrieve an Event. Related API documentation.

Declaration
public async Task<Event> Retrieve(string id, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String id

The ID of the Event to retrieve.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Event>

An Event instance.

| Improve this Doc View Source

RetrieveAllPayloads(String, CancellationToken)

Retrieve all Payloads for an Event. Related API documentation.

Declaration
public async Task<List<Payload>> RetrieveAllPayloads(string eventId, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String eventId

ID of the Event to retrieve payloads for.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<List<Payload>>

A list of Payload objects.

| Improve this Doc View Source

RetrievePayload(String, String, CancellationToken)

Retrieve a specific Payload for an Event. Related API documentation.

Declaration
public async Task<Payload> RetrievePayload(string eventId, string payloadId, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String eventId

ID of the Event to retrieve payload for.

System.String payloadId

ID of the Payload to retrieve.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Payload>

A Payload object.

Exceptions
Type Condition
InvalidRequestError

Thrown if the specified payload ID is malformed.

NotFoundError

Thrown if the specified payload is not found.

Implements

IEasyPostService
IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX