Show / Hide Table of Contents

Class ReferralCustomerService

Class representing a set of referral customer-related beta 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.Beta
Assembly: EasyPost.dll
Syntax
public class ReferralCustomerService : EasyPostService, IEasyPostService

Constructors

| Improve this Doc View Source

ReferralCustomerService(EasyPostClient)

Initializes a new instance of the ReferralCustomerService class.

Declaration
public ReferralCustomerService(EasyPostClient client)
Parameters
Type Name Description
EasyPostClient client

The EasyPostClient to tie to this service and use for API calls.

Methods

| Improve this Doc View Source

AddPaymentMethod(AddPaymentMethod, CancellationToken)

Add a Stripe payment method to a ReferralCustomer This function should be called against a Client configured with the ReferralCustomer's API key. This function will fail if called against a non-Referral Customer Client. Related API documentation.

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

AddPaymentMethod parameter set.

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

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

Add a Stripe payment method to a ReferralCustomer This function should be called against a Client configured with the ReferralCustomer's API key. This function will fail if called against a non-Referral Customer Client. Related API documentation.

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

Unique customer ID provided by Stripe.

System.String paymentMethodReference

ID of the card or bank account provided by Stripe.

PaymentMethod.Priority priority

Which priority to save this payment method as on EasyPost.

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

CreateBankAccountClientSecret(CancellationToken)

Creates a client secret to use with Stripe when adding a bank account. Related API documentation.

Declaration
public async Task<StripeClientSecret> CreateBankAccountClientSecret(CancellationToken cancellationToken = null)
Parameters
Type Name Description
CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<StripeClientSecret>

A StripeClientSecret object containing the client secret.

Exceptions
Type Condition
ApiError

When the request fails.

| Improve this Doc View Source

CreateBankAccountClientSecret(Nullable<String>, CancellationToken)

Creates a client secret to use with Stripe when adding a bank account. Related API documentation.

Declaration
public async Task<StripeClientSecret> CreateBankAccountClientSecret(string? returnUrl, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.Nullable<System.String> returnUrl

Optional return URL for the bank account setup.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<StripeClientSecret>

A StripeClientSecret object containing the client secret.

Exceptions
Type Condition
ApiError

When the request fails.

| Improve this Doc View Source

CreateCreditCardClientSecret(CancellationToken)

Creates a client secret to use with Stripe when adding a credit card. Related API documentation.

Declaration
public async Task<StripeClientSecret> CreateCreditCardClientSecret(CancellationToken cancellationToken = null)
Parameters
Type Name Description
CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<StripeClientSecret>

A StripeClientSecret object containing the client secret.

Exceptions
Type Condition
ApiError

When the request fails.

| Improve this Doc View Source

RefundByAmount(RefundByAmount, CancellationToken)

Refund a ReferralCustomer's wallet by a specified amount. Refund will be issued to the user's original payment method. Related API documentation.

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

RefundByAmount parameter set.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentRefund>

A PaymentRefund object.

| Improve this Doc View Source

RefundByAmount(Int32, CancellationToken)

Refund a ReferralCustomer's wallet by a specified amount. Refund will be issued to the user's original payment method. Related API documentation.

Declaration
public async Task<PaymentRefund> RefundByAmount(int amount, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.Int32 amount

Amount in cents to refund the Referral Customer.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentRefund>

A PaymentRefund object.

| Improve this Doc View Source

RefundByPaymentLog(RefundByPaymentLog, CancellationToken)

Refund a ReferralCustomer's wallet for a specified payment log entry. Refund will be issued to the user's original payment method. Related API documentation.

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

RefundByPaymentLog parameter set.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentRefund>

A PaymentRefund object.

| Improve this Doc View Source

RefundByPaymentLog(String, CancellationToken)

Refund a ReferralCustomer's wallet for a specified payment log entry. Refund will be issued to the user's original payment method. Related API documentation.

Declaration
public async Task<PaymentRefund> RefundByPaymentLog(string paymentLogId, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String paymentLogId

Payment log ID to refund.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<PaymentRefund>

A PaymentRefund object.

Implements

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