Show / Hide Table of Contents

Class AddressService

Class representing a set of address-related functionality.

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

Methods

| Improve this Doc View Source

All(All, CancellationToken)

List all Address objects.

Declaration
public async Task<AddressCollection> 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<AddressCollection>

AddressCollection instance.

| Improve this Doc View Source

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

List all Address objects. Related API documentation.

Declaration
public async Task<AddressCollection> 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 result list with.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<AddressCollection>

A AddressCollection instance.

| Improve this Doc View Source

Create(Dictionary<String, Object>, CancellationToken)

Create an Address. Related API documentation.

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

Data to use to create the Address.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Address>

An Address object.

| Improve this Doc View Source

Create(Create, CancellationToken)

Create an Address. Related API documentation.

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

Data to use to create the Address.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Address>

An Address object.

| Improve this Doc View Source

CreateAndVerify(Dictionary<String, Object>, CancellationToken)

Create and verify an Address in one API call. Related API documentation.

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

Data to use to create the Address.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Address>

An Address object.

| Improve this Doc View Source

CreateAndVerify(Create, CancellationToken)

Create and verify an Address in one API call. Related API documentation.

Declaration
public async Task<Address> CreateAndVerify(Create parameters, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Create parameters

Data to use to create the Address.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Address>

An Address object.

| Improve this Doc View Source

GetNextPage(AddressCollection, Nullable<Int32>, CancellationToken)

Get the next page of a paginated AddressCollection.

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

The AddressCollection 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<AddressCollection>

The next page, as a AddressCollection instance.

Exceptions
Type Condition
EndOfPaginationError

Thrown if there is no next page to retrieve.

| Improve this Doc View Source

Retrieve(String, CancellationToken)

Retrieve an Address from its id.

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

String representing an Address. Starts with "adr_".

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Address>

EasyPost.Address instance.

| Improve this Doc View Source

Verify(String, CancellationToken)

Verify an Address.

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

ID of the address to verify.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Address>

EasyPost.Address instance. Check message for verification failures.

Implements

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