Class ClaimService
Class representing a set of claim-related functionality.
Inherited Members
Namespace: EasyPost.Services
Assembly: EasyPost.dll
Syntax
public class ClaimService : EasyPostService, IEasyPostService
  Methods
| Improve this Doc View SourceAll(All, CancellationToken)
List all Claims.
Declaration
public async Task<ClaimCollection> All(All parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| All | parameters | Parameters to filter the list of Claims.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<ClaimCollection> | A ClaimCollection instance containing Claims instances.  | 
      
Cancel(String, CancellationToken)
Refund an Claim.
Declaration
public async Task<Claim> Cancel(string id, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | The ID of the Claim to refund.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<Claim> | A Claim instance.  | 
      
Create(Create, CancellationToken)
Create an Claim.
Declaration
public async Task<Claim> Create(Create parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Create | parameters | Data to use to create the Claim.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<Claim> | A Claim object.  | 
      
GetNextPage(ClaimCollection, Nullable<Int32>, CancellationToken)
Get the next page of a paginated ClaimCollection.
Declaration
public async Task<ClaimCollection> GetNextPage(ClaimCollection collection, int? pageSize = null, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ClaimCollection | collection | The ClaimCollection to get the next page of.  | 
      
| System.Nullable<System.Int32> | pageSize | The size of the next page.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<ClaimCollection> | The next page, as a ClaimCollection instance.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| EndOfPaginationError | Thrown if there is no next page to retrieve.  | 
      
Retrieve(String, CancellationToken)
Retrieve an Claim.
Declaration
public async Task<Claim> Retrieve(string id, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | The ID of the Claim to retrieve.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<Claim> | A Claim instance.  | 
      
Implements
      IDisposable