MandalaConsulting.Objects.API
0.0.6
dotnet add package MandalaConsulting.Objects.API --version 0.0.6
NuGet\Install-Package MandalaConsulting.Objects.API -Version 0.0.6
<PackageReference Include="MandalaConsulting.Objects.API" Version="0.0.6" />
<PackageVersion Include="MandalaConsulting.Objects.API" Version="0.0.6" />
<PackageReference Include="MandalaConsulting.Objects.API" />
paket add MandalaConsulting.Objects.API --version 0.0.6
#r "nuget: MandalaConsulting.Objects.API, 0.0.6"
#addin nuget:?package=MandalaConsulting.Objects.API&version=0.0.6
#tool nuget:?package=MandalaConsulting.Objects.API&version=0.0.6
MandalaConsulting.Objects.API
A .NET library providing standardized data models and objects for API development, including account management, billing, and common API response structures.
Overview
MandalaConsulting.Objects.API offers a comprehensive set of data models designed for building robust APIs. It includes models for user accounts, billing operations, and standardized API responses with built-in JSON serialization support.
Installation
Install via NuGet:
dotnet add package MandalaConsulting.Objects.API
Features
- Account Management Models: User accounts, profiles, credentials, and IP information
- Billing System Models: Complete billing workflow including products, purchases, subscriptions, and payment processing
- API Response Standardization: Consistent response format with generic type support
- File Upload Support: Custom form file handling for multipart uploads
- MongoDB Integration: Built-in MongoDB support for all data models
- JSON Serialization: Newtonsoft.Json integration with custom serializers
Key Components
Account Models
User
- Core user account informationProfile
- User profile detailsCredentials
- Authentication credentialsIPInfo
- IP address tracking and geolocation
Billing Models
Product
- Product catalog itemsPurchase
- Purchase transactionsSubscription
- Recurring billing subscriptionsBill
- Invoice/bill generationCreditCard
- Payment card informationPaymentCredentials
- Payment authenticationAddress
- Billing/shipping addresses
API Utilities
ResponseData<T>
- Generic API response wrapperCustomFormFile
- Multipart file upload handlingJObjectSerializer
- Custom JSON serialization for MongoDB
Usage Example
using MandalaConsulting.Objects.API;
// Create a standardized API response
var response = new ResponseData<User>
{
Success = true,
Data = new User
{
Email = "user@example.com",
Username = "johndoe"
},
Message = "User retrieved successfully"
};
// Handle file uploads
public async Task<IActionResult> Upload(CustomFormFile file)
{
if (file != null && file.Length > 0)
{
// Process file
}
}
Dependencies
- .NET 8.0
- MongoDB.Driver (3.4.0)
- Newtonsoft.Json (13.0.3)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (8.0.15)
Documentation
For detailed documentation on individual models and their properties, see the API subfolder README.
License
Copyright © 2023 Mandala Consulting, LLC. All rights reserved.
Author
Created by Alexander Fields
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 8.0.17)
- MongoDB.Bson (>= 3.4.0)
- MongoDB.Driver (>= 3.4.0)
- MongoDB.Driver.Core (>= 2.30.0)
- MongoDB.Driver.GridFS (>= 2.30.0)
- MongoDB.Libmongocrypt (>= 1.12.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.