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