Show / Hide Table of Contents

Class ReferralCustomerService

Class representing a set of referral customer-related functionality.

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

Methods

| Improve this Doc View Source

AddBankAccountFromStripe(String, String, Dictionary<String, Object>, PaymentMethod.Priority, CancellationToken)

Add a bank account to EasyPost for a ReferralCustomer. This function requires the ReferralCustomer's API key. Related API documentation.

Declaration
public async Task<PaymentMethod> AddBankAccountFromStripe(string referralApiKey, string financialConnectionsId, Dictionary<string, object> mandateData, PaymentMethod.Priority priority, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String referralApiKey

API key of the referral user.

System.String financialConnectionsId

Financial connections ID from Stripe.

Dictionary<System.String, System.Object> mandateData

Mandate data for the bank account.

PaymentMethod.Priority priority

Priority of the bank account (e.g., "primary" or "secondary").

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentMethod>

A PaymentMethod object.

Exceptions
Type Condition
ApiError

When the request fails.

| Improve this Doc View Source

AddCreditCardFromStripe(String, String, PaymentMethod.Priority, CancellationToken)

Add a credit card to EasyPost for a ReferralCustomer with a payment method ID from Stripe. This function requires the ReferralCustomer's API key. Related API documentation.

Declaration
public async Task<PaymentMethod> AddCreditCardFromStripe(string referralApiKey, string paymentMethodId, PaymentMethod.Priority priority, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String referralApiKey

API key of the referral user.

System.String paymentMethodId

Payment method ID from Stripe.

PaymentMethod.Priority priority

Priority of the credit card (e.g., "primary" or "secondary").

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentMethod>

A PaymentMethod object.

Exceptions
Type Condition
ApiError

When the request fails.

| Improve this Doc View Source

AddCreditCardToUser(String, String, Int32, Int32, String, PaymentMethod.Priority, CancellationToken)

Add a credit card to a ReferralCustomer. This function should be called against a Client configured with the white label partner's API key. This function requires the target ReferralCustomer's API key as a parameter. Related API documentation.

Declaration
public async Task<PaymentMethod> AddCreditCardToUser(string referralApiKey, string number, int expirationMonth, int expirationYear, string cvc, PaymentMethod.Priority priority = null, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String referralApiKey

API key of the ReferralCustomer.

System.String number

Credit card number.

System.Int32 expirationMonth

Expiration month of the credit card.

System.Int32 expirationYear

Expiration year of the credit card.

System.String cvc

CVC of the credit card.

PaymentMethod.Priority priority

Priority of the credit card.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentMethod>

The PaymentMethod that was added.

Exceptions
Type Condition
ApiError

When the request fails.

| Improve this Doc View Source

All(All, CancellationToken)

List all ReferralCustomers. This function should be called against a Client configured with the white label partner's API key. Related API documentation.

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

Parameters to filter the list of ReferralCustomers.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<ReferralCustomerCollection>

A ReferralCustomerCollection instance.

| Improve this Doc View Source

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

List all ReferralCustomers. This function should be called against a Client configured with the white label partner's API key. Related API documentation.

Declaration
public async Task<ReferralCustomerCollection> 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 ReferralCustomers.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<ReferralCustomerCollection>

A ReferralCustomerCollection instance.

| Improve this Doc View Source

CreateReferral(Dictionary<String, Object>, CancellationToken)

Create a ReferralCustomer for the account associated with the API key used. This function should be called against a Client configured with the white label partner's API key. Referral Customer API documentation.

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

Data to use to create the ReferralCustomer.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<ReferralCustomer>

A ReferralCustomer instance.

| Improve this Doc View Source

CreateReferral(CreateReferralCustomer, CancellationToken)

Create a ReferralCustomer for the account associated with the API key used. This function should be called against a Client configured with the white label partner's API key. Related API documentation.

Declaration
public async Task<ReferralCustomer> CreateReferral(CreateReferralCustomer parameters, CancellationToken cancellationToken = null)
Parameters
Type Name Description
CreateReferralCustomer parameters

Data to use to create the ReferralCustomer.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<ReferralCustomer>

A ReferralCustomer instance.

| Improve this Doc View Source

GetNextPage(ReferralCustomerCollection, Nullable<Int32>, CancellationToken)

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

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

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

The next page, as a ReferralCustomerCollection instance.

Exceptions
Type Condition
EndOfPaginationError

Thrown if there is no next page to retrieve.

| Improve this Doc View Source

UpdateReferralEmail(String, String, CancellationToken)

Update a ReferralCustomer's email. This function should be called against a Client configured with the white label partner's API key. Related API documentation.

Declaration
public async Task UpdateReferralEmail(string referralId, string email, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String referralId

The ID of the ReferralCustomer to update.

System.String email

The new email address for the ReferralCustomer.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task

None.

Implements

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