![]() |
VOOZH | about |
dotnet add package Endjin.FreeAgent.Domain --version 1.0.7
NuGet\Install-Package Endjin.FreeAgent.Domain -Version 1.0.7
<PackageReference Include="Endjin.FreeAgent.Domain" Version="1.0.7" />
<PackageVersion Include="Endjin.FreeAgent.Domain" Version="1.0.7" />Directory.Packages.props
<PackageReference Include="Endjin.FreeAgent.Domain" />Project file
paket add Endjin.FreeAgent.Domain --version 1.0.7
#r "nuget: Endjin.FreeAgent.Domain, 1.0.7"
#:package Endjin.FreeAgent.Domain@1.0.7
#addin nuget:?package=Endjin.FreeAgent.Domain&version=1.0.7Install as a Cake Addin
#tool nuget:?package=Endjin.FreeAgent.Domain&version=1.0.7Install as a Cake Tool
Domain models and types for the FreeAgent accounting API, providing strongly-typed representations of all FreeAgent resources.
Install via NuGet Package Manager:
dotnet add package Endjin.FreeAgent.Domain
Or via Package Manager Console:
Install-Package Endjin.FreeAgent.Domain
This package provides strongly-typed models for all FreeAgent resources:
using Endjin.FreeAgent.Domain;
using System.Collections.Immutable;
// Create a new invoice
Invoice invoice = new()
{
Contact = new Uri("https://api.freeagent.com/v2/contacts/123"),
DatedOn = DateOnly.FromDateTime(DateTime.Now),
PaymentTermsInDays = 30,
Currency = "GBP",
Status = "Draft",
InvoiceItems = new List<InvoiceItem>
{
new()
{
Description = "Consulting Services",
ItemType = "Services",
Quantity = 1,
Price = 1000.00m,
SalesTaxRate = 20.0m
}
}
};
// Create a contact
Contact contact = new()
{
OrganisationName = "Acme Corp",
FirstName = "John",
LastName = "Smith",
Email = "john.smith@acme.com",
Country = "United Kingdom",
UsesContactInvoiceSequence = true
};
// Create a project
Project project = new()
{
Name = "Website Development",
Contact = new Uri("https://api.freeagent.com/v2/contacts/123"),
Status = "Active",
Currency = "GBP",
BudgetUnits = "Hours",
HoursPerDay = 8.0m,
NormalBillingRate = 150.0m
};
All domain models are configured for optimal JSON serialization using System.Text.Json:
using System.Text.Json;
using Endjin.FreeAgent.Domain;
// Serialize
Invoice invoice = new() { /* ... */ };
string json = JsonSerializer.Serialize(invoice, SharedJsonOptions.Instance);
// Deserialize
Invoice? deserialized = JsonSerializer.Deserialize<Invoice>(json, SharedJsonOptions.Instance);
All models use strongly-typed properties with appropriate .NET types:
This project is licensed under the Apache License 2.0 - see the file for details.
For support, please contact Endjin Limited or raise an issue on our GitHub repository.
Copyright (c) Endjin Limited. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Endjin.FreeAgent.Domain:
| Package | Downloads |
|---|---|
|
Endjin.FreeAgent.Client
.NET client library for the FreeAgent accounting API, providing strongly-typed access to all FreeAgent resources including invoices, contacts, projects, expenses, and more. |
|
|
Endjin.FreeAgent.Domain.Extensions
Extension types and helper methods for the Endjin.FreeAgent.Domain library, providing additional domain models for timesheets, date/time utilities, currency extensions, and user settings. |
This package is not used by any popular GitHub repositories.