| Method | Description |
|---|---|
| AddFundsToInsurance | Add Funds To Insurance |
| ConnectInsurer | Connect a Shipsurance Account |
| DisconnectInsurer | Disconnect a Shipsurance Account |
| GetInsuranceBalance | Get Insurance Funds Balance |
AddFundsToInsuranceResponseBody AddFundsToInsurance (AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default)
AddFundsToInsuranceResponseBody AddFundsToInsurance (HttpClient methodClient, AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default)Add Funds To Insurance
You may need to auto fund your account from time to time. For example, if you don't normally ship items over $100, and may want to add funds to insurance rather than keeping the account funded.
using System.Collections.Generic;
using System.Diagnostics;
using ShipEngineSDK;
using ShipEngineSDK.Model;
namespace Example
{
public class AddFundsToInsuranceExample
{
public static async Task Main()
{
var shipEngine = new ShipEngine("api_key");
var addFundsToInsuranceRequestBody = new AddFundsToInsuranceRequestBody();
try
{
// Add Funds To Insurance
AddFundsToInsuranceResponseBody result = await shipEngine.AddFundsToInsurance(addFundsToInsuranceRequestBody);
Debug.WriteLine(result);
}
catch (ShipEngineException e)
{
Debug.Print("Exception when calling InsuranceApi.AddFundsToInsurance: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| methodClient | HttpClient | The HttpClient instance to use for the request. | |
| addFundsToInsuranceRequestBody | AddFundsToInsuranceRequestBody | ||
| cancellationToken | CancellationToken | The cancellation token to use for the request. |
AddFundsToInsuranceResponseBody
Object ConnectInsurer (ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default)
Object ConnectInsurer (HttpClient methodClient, ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default)Connect a Shipsurance Account
Connect a Shipsurance Account
using System.Collections.Generic;
using System.Diagnostics;
using ShipEngineSDK;
using ShipEngineSDK.Model;
namespace Example
{
public class ConnectInsurerExample
{
public static async Task Main()
{
var shipEngine = new ShipEngine("api_key");
var connectInsurerRequestBody = new ConnectInsurerRequestBody();
try
{
// Connect a Shipsurance Account
Object result = await shipEngine.ConnectInsurer(connectInsurerRequestBody);
Debug.WriteLine(result);
}
catch (ShipEngineException e)
{
Debug.Print("Exception when calling InsuranceApi.ConnectInsurer: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| methodClient | HttpClient | The HttpClient instance to use for the request. | |
| connectInsurerRequestBody | ConnectInsurerRequestBody | ||
| cancellationToken | CancellationToken | The cancellation token to use for the request. |
Object
Object DisconnectInsurer (CancellationToken cancellationToken = default)
Object DisconnectInsurer (HttpClient methodClient, CancellationToken cancellationToken = default)Disconnect a Shipsurance Account
Disconnect a Shipsurance Account
using System.Collections.Generic;
using System.Diagnostics;
using ShipEngineSDK;
using ShipEngineSDK.Model;
namespace Example
{
public class DisconnectInsurerExample
{
public static async Task Main()
{
var shipEngine = new ShipEngine("api_key");
try
{
// Disconnect a Shipsurance Account
Object result = await shipEngine.DisconnectInsurer();
Debug.WriteLine(result);
}
catch (ShipEngineException e)
{
Debug.Print("Exception when calling InsuranceApi.DisconnectInsurer: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| methodClient | HttpClient | The HttpClient instance to use for the request. | |
| cancellationToken | CancellationToken | The cancellation token to use for the request. |
Object
GetInsuranceBalanceResponseBody GetInsuranceBalance (CancellationToken cancellationToken = default)
GetInsuranceBalanceResponseBody GetInsuranceBalance (HttpClient methodClient, CancellationToken cancellationToken = default)Get Insurance Funds Balance
Retrieve the balance of your Shipsurance account.
using System.Collections.Generic;
using System.Diagnostics;
using ShipEngineSDK;
using ShipEngineSDK.Model;
namespace Example
{
public class GetInsuranceBalanceExample
{
public static async Task Main()
{
var shipEngine = new ShipEngine("api_key");
try
{
// Get Insurance Funds Balance
GetInsuranceBalanceResponseBody result = await shipEngine.GetInsuranceBalance();
Debug.WriteLine(result);
}
catch (ShipEngineException e)
{
Debug.Print("Exception when calling InsuranceApi.GetInsuranceBalance: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| methodClient | HttpClient | The HttpClient instance to use for the request. | |
| cancellationToken | CancellationToken | The cancellation token to use for the request. |