Billbee.Api.Client 1.0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Billbee.Api.Client --version 1.0.0.1                
NuGet\Install-Package Billbee.Api.Client -Version 1.0.0.1                
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="Billbee.Api.Client" Version="1.0.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Billbee.Api.Client --version 1.0.0.1                
#r "nuget: Billbee.Api.Client, 1.0.0.1"                
#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 Billbee.Api.Client as a Cake Addin
#addin nuget:?package=Billbee.Api.Client&version=1.0.0.1

// Install Billbee.Api.Client as a Cake Tool
#tool nuget:?package=Billbee.Api.Client&version=1.0.0.1                

Logo

Billbee API

With this package you can implement the official Billbee API in your C# application.

Prerequisites

Install

Just install this package und follow the demo instructions.

Official API Documentation

https://app01.billbee.de/swagger/ui/index

Usage

Simply open the solution in your Visual Studio or other C# IDE.

Then open the Billbee.Api.Client.Demo project and take a look at the examples in Program.cs

Demo

Initialization

// Creating an individual logger, that implements ILogger
ILogger logger = new Logger();

// Creating new instance of ApiClient           
ApiClient client = new ApiClient(logger: logger);

// Enter your api key here. If you don't have an api key. Please contact support@billbee.de with a description on what you would like to do, to get one.
client.Configuration.ApiKey = "";
// Enter the username of your main account here.
client.Configuration.Username = "";
// Enter the password of your api here.
client.Configuration.Password = "";

// Test the configuration
if (client.TestConfiguration())
{
	logger.LogMsg("Api test successful", LogSeverity.Info);
}
else
{
	logger.LogMsg("Api test failed. Please control your configuration", LogSeverity.Error);
}

Demo Calls

// Getting events for this account
var events = client.Events.GetEvents();

// Getting my shipping providers
var shippingProvider = client.Shipment.GetShippingProvider();

// Doing some stock manipulations
Console.WriteLine("Please enter one SKU of an article to update it's stock. Be aware, that these changes are permanent, so better use a demo article. Leave blank to skip.");
var sku = Console.ReadLine();
if (!string.IsNullOrWhiteSpace(sku))
{
    var updateStockCodeResult = client.Products.UpdateStockCode(new Billbee.Api.Client.Model.UpdateStockCode { Sku = sku, StockCode = "Testlager" });
    var updateStockResult = client.Products.UpdateStock(new Billbee.Api.Client.Model.UpdateStock { Sku = sku, NewQuantity = 15, Reason = "Change due to api tests." });
    var updateStockMultipleResult = client.Products.UpdateStockMultiple(new List<Billbee.Api.Client.Model.UpdateStock> { new Billbee.Api.Client.Model.UpdateStock { Sku = sku, NewQuantity = 15 }, new Billbee.Api.Client.Model.UpdateStock { Sku = "4712", NewQuantity = 23 } });
}

// Requesting the urls of the terms and conditions for the usage of billbee.
var termsAndConditions = client.AutomaticProvision.TermsInfo();

// Getting a list of all orders with order state 'confirmed'
var orders = client.Orders.GetOrderList(page: 1, pageSize: 20, orderStateId: new List<int> { 2 });
// var x = client.Orders.GetInvoiceList();

// Example to create a new order. Please create a complete order object for usage.
// var createOrderResult = client.Orders.PostNewOrder(new Billbee.Api.Client.Model.Order() { });

Console.WriteLine("Please enter one order number for further test manipulations. Be aware, that these changes are permanent. Please use an demo order. Leave blank to skip.");
var orderId = Console.ReadLine();
int orderIdInt;
if (!string.IsNullOrWhiteSpace(orderId) && int.TryParse(orderId, out orderIdInt))
{
    // Remove all old tags and add the given ones.
    var updateTagsResult = client.Orders.UpdateTags(new List<string>() { "Test C", "Test D" }, orderIdInt);

    // Add new tags.
    var addTagsResult = client.Orders.AddTags(new List<string>() { "Test A", "Test B" }, orderIdInt);

    // Add a shipment to an order. Please fill in the following and uncomment. the last line.
    string shippingId = "0815";
    int providerId = 0;
    int productId = 0;
    // client.Orders.AddShipment(new OrderShipment { Comment = "Test", OrderId = orderIdInt, ShippingId = shippingId, ShippingProviderId = providerId, ShippingProviderProductId = productId });

    // Getting documents
    var deliveryNoteResult = client.Orders.CreateDeliveryNote(orderIdInt, true);
    var invoiceResult = client.Orders.CreateInvoice(orderIdInt, true);
}

Contributing

Feel free to fork the repository and create pull-requests

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.4.2 2,380 4/14/2023
2.4.1 2,497 10/13/2022
2.4.0 1,052 8/12/2022
2.3.0 451 7/25/2022
2.2.1 728 1/17/2022
2.1.0 319 12/13/2021
2.0.1 383 10/25/2021
2.0.0 533 11/2/2020
1.0.1.2 836 10/24/2018
1.0.1.1 729 10/23/2018
1.0.1 773 10/16/2018
1.0.0.1 1,021 1/10/2018