Show / Hide Table of Contents

Class InsuranceService

Class representing a set of insurance-related functionality.

Inheritance
System.Object
EasyPostService
InsuranceService
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 InsuranceService : EasyPostService, IEasyPostService

Methods

| Improve this Doc View Source

All(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

to use for the HTTP request.

Returns
Type Description
Task<InsuranceCollection>

An InsuranceCollection instance containing Insurances instances.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<InsuranceCollection>

An InsuranceCollection instance containing Insurances instances.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<Insurance>

An Insurance object.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<Insurance>

An Insurance object.

| Improve this Doc View Source

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

to use for the HTTP request.

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.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<Insurance>

An Insurance instance.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<Insurance>

An Insurance instance.

Implements

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