Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/invoiced/invoiced-dotnet
Official .NET client library for the Invoiced API
https://github.com/invoiced/invoiced-dotnet
api billing csharp dotnet invoiced nuget
Last synced: 22 days ago
JSON representation
Official .NET client library for the Invoiced API
- Host: GitHub
- URL: https://github.com/invoiced/invoiced-dotnet
- Owner: Invoiced
- License: mit
- Created: 2017-11-04T03:38:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-09T16:18:51.000Z (over 1 year ago)
- Last Synced: 2024-08-31T00:19:00.291Z (4 months ago)
- Topics: api, billing, csharp, dotnet, invoiced, nuget
- Language: C#
- Homepage: https://developer.invoiced.com/api/?csharp
- Size: 178 KB
- Stars: 3
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# invoiced-dotnet
This repository contains the .NET client library for the [Invoiced](https://invoiced.com) API.
You can find detailed API documentation along with .NET code snippets [here](https://www.invoiced.com/resources/docs/api/?csharp).
[![CI](https://github.com/Invoiced/invoiced-dotnet/actions/workflows/ci.yml/badge.svg)](https://github.com/Invoiced/invoiced-dotnet/actions/workflows/ci.yml)
[![NuGet](https://img.shields.io/nuget/v/Invoiced.svg)](https://www.nuget.org/packages/Invoiced/)## Usage
First, you must instantiate a new client
```c#
using Invoiced;
...
var connection = new Connection("{YOUR_API_KEY}",Invoiced.Environment.sandbox);
```Then, API calls can be made like this:
```c#
# retrieve invoice
var invoice = connection.NewInvoice().retrieve(1);# mark as paid
var payment = connection.NewPayment();
payment.Amount = invoice.Balance;
payment.Method = "check";
payment.AppliedTo = new[]
{
new PaymentItem {Type = "invoice", Amount = 100, Invoice = invoice.Id}
};
payment.Create();
```## Developing
The test suite can be ran with `dotnet test`
## Deployment
Follow these steps to publish a package to NuGet:
```
dotnet pack invoicedapi -c Release --output nuget
cd nuget
nuget push Invoiced.X.X.X.nupkg -Source https://api.nuget.org/v3/index.json
```