AnointedAutomation.Objects
2.1.3
See the version list below for details.
dotnet add package AnointedAutomation.Objects --version 2.1.3
NuGet\Install-Package AnointedAutomation.Objects -Version 2.1.3
<PackageReference Include="AnointedAutomation.Objects" Version="2.1.3" />
<PackageVersion Include="AnointedAutomation.Objects" Version="2.1.3" />
<PackageReference Include="AnointedAutomation.Objects" />
paket add AnointedAutomation.Objects --version 2.1.3
#r "nuget: AnointedAutomation.Objects, 2.1.3"
#:package AnointedAutomation.Objects@2.1.3
#addin nuget:?package=AnointedAutomation.Objects&version=2.1.3
#tool nuget:?package=AnointedAutomation.Objects&version=2.1.3
AnointedAutomation.Objects
Plain C# models shared across AnointedAutomation services: user accounts and profiles, billing and payment records, Google sign in payloads, and standard API response envelopes. The classes carry no database attributes, so the same types work with MongoDB, SQL or plain JSON.
Installation
dotnet add package AnointedAutomation.Objects
- Target framework:
net10.0 - Dependencies:
- AnointedAutomation.Enums (payment and card enums such as
PaymentProvider,TransactionStatus,CardType) - Newtonsoft.Json 13.0.4
- AnointedAutomation.Enums (payment and card enums such as
Quick start
using System.Collections.Generic;
using AnointedAutomation.Objects;
using AnointedAutomation.Objects.Account;
using AnointedAutomation.Objects.Billing;
User user = new User
{
UserId = "u_123",
Email = "user@example.com",
Username = "johndoe",
Role = "member",
Profile = new Profile { FirstName = "John", LastName = "Doe" }
};
// Typed response envelope with status-code factories.
ResponseData<User> ok = ResponseData<User>.Ok(user, "User loaded");
ResponseData<User> missing = ResponseData<User>.NotFound("No such user");
// Paged results: totalPages, hasNextPage and hasPreviousPage are computed.
PaginatedResponse<User> page = new PaginatedResponse<User>(new List<User> { user }, currentPage: 1, pageSize: 20, totalItems: 41);
// Card helpers.
bool looksValid = CreditCard.ValidateLuhn("4242424242424242");
string masked = CreditCard.MaskCardNumber("4242424242424242");
API overview
Responses (AnointedAutomation.Objects)
| Type | Description |
|---|---|
ResponseData |
Untyped envelope: Message, Data, Error, success, Timestamp (ISO 8601 UTC), plus fixed Anointed, Automation, Copyright, Links and Trinity fields. The (string message, object data, object error) constructor sets success from whether Error is null. |
ResponseData<T> |
Typed envelope with Data, Message, statusCode, success, Timestamp, and static factories Ok, Created, Accepted, NoContent, Error, BadRequest, Unauthorized, Forbidden, NotFound, Conflict, UnprocessableEntity, TooManyRequests, InternalServerError, ServiceUnavailable. |
PaginatedResponse<T> |
Data, currentPage, pageSize, totalItems, totalPages, hasNextPage, hasPreviousPage. |
ChristianEmoticons |
String constants such as LatinCross, PrayingHands, Dove, Bible, Fish. |
Account (AnointedAutomation.Objects.Account)
| Type | Description |
|---|---|
User |
Account record: UserId, Email, Username, Password, Role, Profile, Token, tokenExpiration, emailConfirmed, IPAddresses, Friends, FriendId, BlockedUsers, isBanned, banned, BannedReason, createdDate, lastActiveDate, timeOnline, Google, Meta, and account deletion fields (deletionDate, DeletionConfirmationCode, deletionConfirmationExpiration). |
Profile |
Extends Billing.Contact (FirstName, MiddleName, LastName, dob, number) with a Newtonsoft JObject AccountSettings. |
Credentials |
Login payload: Email, Password, Token, GoogleToken. |
IPInfo |
Login history for one IP: IpAddress, firstLogin, lastLogin, loginCount, timeOnline. |
Billing (AnointedAutomation.Objects.Billing)
| Type | Description |
|---|---|
Purchase |
Order with addresses, Item (Product), discounts, tax, tip, total, TransactionId, OrderStatus (TransactionStatus) and a StatusHistory; UpdateOrderStatus(newStatus, changedBy, reason) records each change. |
Subscription |
Extends Purchase with Status (SubscriptionStatus), billing period, trial, pause/cancel dates, per metric Usage, and lifecycle methods Pause, Resume, Cancel, Renew, UpdateStatus, IsUsable, IsTrialing, CalculateNextBillingDate, GetDaysRemaining, AddUsageMetric, UpdateUsage, IsOverUsageLimit. |
SubscriptionUsage |
Metered usage: Limit, Used, Remaining, UsagePercentage, IsOverLimit, IsNearLimit, IncrementUsage, DecrementUsage, ResetForNewPeriod. |
StatusHistoryEntry |
One status transition: PreviousStatus, NewStatus, ChangedBy, Reason, Timestamp. |
Bill |
A customer's billing record: AdressBilling, Orders, PaymentTypesOnFile, Purchases, Refunds, Subscriptions. |
Product, Sale, Inventory |
Catalog, sales and stock records. Product.GetTotalQuantitySold(products, sales) totals sales per product. |
Address, Contact |
Postal address and person/contact details. |
CreditCard |
Card details with IsValid, IsExpired, ValidateLuhn, static DetectCardType (CardType), static MaskCardNumber, GetDisplayString and ToSecureObject (strips sensitive data). |
PaymentCredentials, PayeeInfo |
Payment method on file (CreditCard, PayeeInfo, paymentType). |
PaymentIntent, PaymentCustomer, PaymentMethodToken, Refund, Dispute |
Provider agnostic payment records, each tagged with a PaymentProvider and the provider's own id. Amounts are long minor units. |
WebhookEvent |
A received provider webhook (Provider, EventType, RawPayload, IsProcessed, ProcessingError, Signature). |
PaymentAuditLog |
Request/response audit record for a provider call; SetRequestBody and SetResponseBody pass bodies through the static MaskSensitiveData, and CalculateDuration fills DurationMs. |
DisputeStatus |
Enum of dispute states. |
Google (AnointedAutomation.Objects.Google)
| Type | Description |
|---|---|
GoogleObjects |
Holds GoogleTokenInfo and UserProfile; stored on User.Google. |
GoogleTokenInfo |
Google token response and token info fields, mapped with [JsonProperty] to Google's snake_case names. |
UserProfile |
Google user info (id, email, verifiedEmail, name, givenName, familyName, picture, locale, hd, ...). |
Naming convention
Properties follow the AnointedAutomation hybrid casing: value types are camelCase (success, statusCode, createdDate) and reference types are PascalCase (Message, Data, Email). The companion serializers in AnointedAutomation.Objects.API (JsonCasingConvention) and AnointedAutomation.Repository.Mongo (HybridElementNameConvention) keep the JSON wire and the database on the same rule.
Storing these models
The models have no MongoDB or EF Core attributes. For MongoDB, call BsonClassMapRegistrar.RegisterClassMaps() from AnointedAutomation.Repository.Mongo at startup; it maps User.UserId to _id and registers a serializer for the JObject in Profile.AccountSettings.
Related packages
- AnointedAutomation.Enums: enums used by the billing models.
- AnointedAutomation.Objects.API: ASP.NET Core additions (
CustomFormFile,JsonCasingConvention,GraphQlEnvelope). - AnointedAutomation.Repository.Mongo: MongoDB helper and BSON class maps for these models.
License
MIT. See LICENSE.
Support This Project
This library is free and open source. The best way to support the work is to shop with us:
- Christian items: https://store.anointed.company
- Everything else: https://www.mart.club
Found a bug or have a request? Open an issue at https://github.com/AnointedAutomation/AnointedAutomation/issues.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- AnointedAutomation.Enums (>= 1.0.4)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on AnointedAutomation.Objects:
| Package | Downloads |
|---|---|
|
AnointedAutomation.Repository.Mongo
A MongoDB helper and generic repository base for .NET, with CRUD, paging, aggregation, index management, BSON class maps and casing conventions. |
|
|
AnointedAutomation.Objects.API
ASP.NET Core helpers: an in memory IFormFile, a hybrid casing System.Text.Json naming convention, and a GraphQL response envelope reader. |
|
|
AnointedAutomation.Objects.Mongo
MongoDB-specific objects with BSON attributes - AnointedAutomation.Objects.Mongo |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.1 | 127 | 10/26/2026 |
| 2.7.0 | 329 | 10/16/2026 |
| 2.6.1 | 86 | 10/16/2026 |
| 2.6.0 | 91 | 10/16/2026 |
| 2.5.0 | 93 | 10/15/2026 |
| 2.4.0 | 335 | 10/1/2026 |
| 2.3.1 | 107 | 10/1/2026 |
| 2.3.0 | 100 | 10/1/2026 |
| 2.2.1 | 240 | 10/1/2026 |
| 2.2.0 | 151 | 10/1/2026 |
| 2.1.5 | 124 | 9/29/2026 |
| 2.1.4 | 101 | 9/29/2026 |
| 2.1.3 | 284 | 9/25/2026 |
| 2.1.2 | 620 | 8/23/2026 |
| 2.1.1 | 350 | 7/27/2026 |
| 2.1.0 | 186 | 7/26/2026 |
| 2.0.0 | 311 | 7/2/2026 |
| 1.0.3 | 338 | 6/30/2026 |
| 1.0.2 | 653 | 6/20/2026 |
| 1.0.1 | 423 | 5/30/2026 |