Shippo 5.0.0-beta.9

This is a prerelease version of Shippo.
dotnet add package Shippo --version 5.0.0-beta.9                
NuGet\Install-Package Shippo -Version 5.0.0-beta.9                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shippo" Version="5.0.0-beta.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shippo --version 5.0.0-beta.9                
#r "nuget: Shippo, 5.0.0-beta.9"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Shippo as a Cake Addin
#addin nuget:?package=Shippo&version=5.0.0-beta.9&prerelease

// Install Shippo as a Cake Tool
#tool nuget:?package=Shippo&version=5.0.0-beta.9&prerelease                

Shippo

SDK Example Usage

Example

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.Addresses.ListAsync(
    page: 1,
    results: 5,
    shippoApiVersion: "2018-02-08"
);

// handle response

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default, an API error will raise a Shippo.Models.Errors.SDKException exception, which has the following properties:

Property Type Description
Message string The error message
StatusCode int The HTTP status code
RawResponse HttpResponseMessage The raw HTTP response
Body string The response content

When custom error responses are specified for an operation, the SDK may also throw their associated exceptions. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the InitiateOauth2SigninAsync method throws the following exceptions:

Error Type Status Code Content Type
Shippo.Models.Errors.InitiateOauth2SigninResponseBody 400 application/json
Shippo.Models.Errors.InitiateOauth2SigninCarrierAccountsResponseBody 401 application/json
Shippo.Models.Errors.InitiateOauth2SigninCarrierAccountsResponseResponseBody 404 application/json
Shippo.Models.Errors.SDKException 4XX, 5XX */*

Example

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
using System;
using Shippo.Models.Errors;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

try
{
    InitiateOauth2SigninRequest req = new InitiateOauth2SigninRequest() {
        CarrierAccountObjectId = "<id>",
        RedirectUri = "https://enlightened-mortise.com/",
    };

    var res = await sdk.CarrierAccounts.InitiateOauth2SigninAsync(req);

    // handle response
}
catch (Exception ex)
{
    if (ex is InitiateOauth2SigninResponseBody)
    {
        // Handle exception data
        throw;
    }
    else if (ex is InitiateOauth2SigninCarrierAccountsResponseBody)
    {
        // Handle exception data
        throw;
    }
    else if (ex is InitiateOauth2SigninCarrierAccountsResponseResponseBody)
    {
        // Handle exception data
        throw;
    }
    else if (ex is Shippo.Models.Errors.SDKException)
    {
        // Handle default exception
        throw;
    }
}

Server Selection

Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the serverUrl: string optional parameter when initializing the SDK client instance. For example:

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    serverUrl: "https://api.goshippo.com",
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.Addresses.ListAsync(
    page: 1,
    results: 5,
    shippoApiVersion: "2018-02-08"
);

// handle response

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
APIKeyHeader apiKey API key

To authenticate with the API the APIKeyHeader parameter must be set when initializing the SDK client instance. For example:

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.Addresses.ListAsync(
    page: 1,
    results: 5,
    shippoApiVersion: "2018-02-08"
);

// handle response
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Shippo:

Package Downloads
FenixAlliance.ABS.Integrations.Shippo

Application Component for the Alliance Business Suite.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.0-beta.9 48 11/26/2024
5.0.0-beta.8 46 11/20/2024
5.0.0-beta.7 226 10/10/2024
5.0.0-beta.4 710 7/15/2024
5.0.0-beta.3 48 7/8/2024
5.0.0-beta.2 124 6/26/2024
5.0.0-beta.1 57 6/17/2024
4.0.2 3,552 6/21/2024
4.0.1 144 6/17/2024
4.0.0 228 6/7/2024
4.0.0-beta.1 62 6/7/2024
3.3.0 51,854 2/1/2022 3.3.0 is deprecated because it is no longer maintained.
3.2.0 6,028 4/26/2021 3.2.0 is deprecated because it is no longer maintained.
3.1.1 854 4/9/2021 3.1.1 is deprecated because it is no longer maintained.
3.1.0 456 3/29/2021 3.1.0 is deprecated because it is no longer maintained.
3.0.0 910 1/20/2021 3.0.0 is deprecated because it is no longer maintained.
2.1.15 7,227 7/30/2020 2.1.15 is deprecated because it is no longer maintained.
2.1.14 1,178 4/17/2020 2.1.14 is deprecated because it is no longer maintained.
2.1.13 12,100 10/29/2018 2.1.13 is deprecated because it is no longer maintained.
2.1.12 840 10/23/2018 2.1.12 is deprecated because it is no longer maintained.
2.1.11 813 10/23/2018 2.1.11 is deprecated because it is no longer maintained.
2.1.10 1,983 9/7/2018 2.1.10 is deprecated because it is no longer maintained.
2.1.8 2,431 9/7/2018 2.1.8 is deprecated because it is no longer maintained.
2.1.2 16,905 10/9/2017 2.1.2 is deprecated because it is no longer maintained.
2.1.1 1,203 9/13/2017 2.1.1 is deprecated because it is no longer maintained.
2.1.0 1,377 9/7/2017 2.1.0 is deprecated because it is no longer maintained.
2.0.2 11,506 5/24/2017 2.0.2 is deprecated because it is no longer maintained.
1.5.7 2,575 11/17/2016 1.5.7 is deprecated because it is no longer maintained.
1.5.6 1,203 11/17/2016 1.5.6 is deprecated because it is no longer maintained.
1.5.5 1,294 11/11/2016 1.5.5 is deprecated because it is no longer maintained.
1.5.4 3,321 11/3/2016 1.5.4 is deprecated because it is no longer maintained.
1.5.3 1,743 11/2/2016 1.5.3 is deprecated because it is no longer maintained.
1.5.0 1,244 10/26/2016 1.5.0 is deprecated because it is no longer maintained.
1.4.4 15,238 9/16/2015 1.4.4 is deprecated because it is no longer maintained.
1.4.3 1,149 9/16/2015 1.4.3 is deprecated because it is no longer maintained.
1.4.2 1,182 7/8/2015 1.4.2 is deprecated because it is no longer maintained.
1.4.0 1,185 3/26/2015 1.4.0 is deprecated because it is no longer maintained.
1.0.3 1,102 3/26/2015 1.0.3 is deprecated because it is no longer maintained.
1.0.2 1,106 3/26/2015 1.0.2 is deprecated because it is no longer maintained.
1.0.1 1,095 3/26/2015 1.0.1 is deprecated because it is no longer maintained.
1.0.0 1,369 3/26/2015 1.0.0 is deprecated because it is no longer maintained.