Luftborn.EConomicSDK 3.0.1

dotnet add package Luftborn.EConomicSDK --version 3.0.1                
NuGet\Install-Package Luftborn.EConomicSDK -Version 3.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="Luftborn.EConomicSDK" Version="3.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Luftborn.EConomicSDK --version 3.0.1                
#r "nuget: Luftborn.EConomicSDK, 3.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 Luftborn.EConomicSDK as a Cake Addin
#addin nuget:?package=Luftborn.EConomicSDK&version=3.0.1

// Install Luftborn.EConomicSDK as a Cake Tool
#tool nuget:?package=Luftborn.EConomicSDK&version=3.0.1                

EConomic SDK

Description

.Net Core SDK for EConomic API, it's a .Net core wrapper for EConomic APIs including APIs for invoices & orders & customers... etc, e-conomic addresses all your bookkeeping needs in one intuitive accounting program, and provide API gateway to access all accounting operations.

For more specific information about EConomic APIs, Please visit EConomic API sites which also include full API documentation and code samples.

https://restdocs.e-conomic.com/

Installation

Use the nuget package manager to install library.

Install-Package Luftborn.EConomicSDK -Version 3.0.1

Requirements

.Net Core v3
VSCode or VS
Nuget Package Manager

EConomicSDK Configuration

  Add below section to your application Startup.cs file.
  
  services.AddEconomicDependencies(AppSecretToken, AgreementGrantToken);
  

Or

services.AddEconomicDependencies();
services.AddOptions<EconomicConfiguration>()
	.Configure(options =>
	{
		options.AgreementGrantToken = AgreementGrantToken;
		options.AppSecretToken = AppSecretToken;
	});
  

EConomicSDK Usage

What's New:

remove Newtonsoft.Json and use System.Text.Json instead

search is improved via flent api builder

Ex:

var filter = FilterDefinitionBuilder.GreaterThan(nameof(CustomerResponseDTO.CustomerNumber), 1000);

var paramters = new SearchParametersBuilder()
	.LimitSize(10)
	.SkipPages(1)
	.SortDecending(nameof(CustomerResponseDTO.CustomerNumber))
	.AddFilter(filter)
	.Build();

var customersResult = await _customersClient.GetCustomersAsync(paramters);
this is equivalent to :
https://restapi.e-conomic.com/customers?skippages=1&pagesize=10&sort=~customernumber&filter=customernumber$gt:1000

Table of Contents

  1. Get Accounts

  2. Get Customers

  3. Get Invoices

  4. Create Draft Invoice

  5. Delete Draft Invoice

  6. Create Booked Invoice

    <a name="get-accounts"></a>

    1. Get Accounts / Account

     //create API service
     var accounts = new AccountsAPI();
    
     //get all accounts, using filter and sort
     var accountsResult = await accounts.GetAccounts("", "", "");
    
     //get one account by account number 
     var accountScheme = await accounts.GetByAccountNumber("1000");
    

    <a name="get-customers"></a>

    2. Get Customers / Customer

     // create customers API service
     var customersAPI = new CustomersAPI();
    
     // get all customers
     var customersResult = await customersAPI.GetCustomers("", "", "");
    
     // get customer by customer number
     var customerResult = await customersAPI.GetByCustomerNumber("1000");
    

    <a name="get-invoices"></a>

    3. Get Invoices / Invoice

     // create invoices API service
     var invoicesAPI = new InvoicesAPI();
    
     // get all invoices
     var invoices = await invoicesAPI.GetInvoices("", "", "");
    
     // get all draft invoices
     var invoices = await invoicesAPI.GetDraftInvoices();
    
     // get draft invoice by invoice number
     var invoice =  await invoicesAPI.GetDraftInvoice('765765765');
    

    <a name="draft-invoice"></a>

    4 Create Draft Invoice

     // draft invoice object
     var invoice = new DraftInvoicePost();
    
     // create draft invoice
     var result = await invoicesAPI.CreateDraftInvoice(invoice);
    

    <a name="delete-draft"></a>

    5 Delete Draft Invoice

     // delete draft invoice
     var deleteMessage = await invoicesAPI.DeleteDraftInvoice("1000")
    

    <a name="booked-invoice"></a>

    6 Create Booked Invoice

     // booked invoice object
     var bookedInvoice = new BookedDraftInvoice();
    
     // assgine bookedInvpice properties
     bookedInvoice.DraftInvoiceNumber = 1000;
     bookedInvoice.Self = new Uri("balabalaa");
    
     // booked draft invoice
     var bookedInvoice = await invoicesAPI.BookedDraftInvoice(invoice);
    

Contributing

Pull requests are welcome, Please open an issue first to discuss what you would like to change.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
3.0.1 1,877 3/24/2023
3.0.0 1,071 3/13/2023
2.1.0 1,907 5/10/2022
2.0.2 1,447 10/19/2021
2.0.1 1,122 10/18/2021
2.0.0 1,168 10/18/2021
1.1.0 1,123 9/17/2021
1.0.0 1,095 9/2/2021