Skip to content

Commit 96e049c

Browse files
committed
Alexander's Anointed Automated Git Helper
1 parent 813822c commit 96e049c

27 files changed

+298
-1128
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
4040
# Define packages to check
4141
declare -A PACKAGES=(
42+
["AnointedAutomation.Enums/AnointedAutomation.Enums.csproj"]="anointedautomation.enums"
4243
["AnointedAutomation.Logging/AnointedAutomation.Logging.csproj"]="anointedautomation.logging"
4344
["AnointedAutomation.Memory/AnointedAutomation.Memory.csproj"]="anointedautomation.memory"
4445
["AnointedAutomation.APIMiddlewares/AnointedAutomation.APIMiddlewares.csproj"]="anointedautomation.apimiddlewares"

.github/workflows/version-increment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
4242
# Define all project files and their directories to check
4343
declare -A PROJECTS=(
44+
["AnointedAutomation.Enums/AnointedAutomation.Enums.csproj"]="AnointedAutomation.Enums"
4445
["AnointedAutomation.Logging/AnointedAutomation.Logging.csproj"]="AnointedAutomation.Logging"
4546
["AnointedAutomation.Memory/AnointedAutomation.Memory.csproj"]="AnointedAutomation.Memory"
4647
["AnointedAutomation.APIMiddlewares/AnointedAutomation.APIMiddlewares.csproj"]="AnointedAutomation.APIMiddlewares"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>disable</ImplicitUsings>
6+
<Nullable>disable</Nullable>
7+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
8+
<PackageProjectUrl>https://github.com/roku674/AnointedAutomation</PackageProjectUrl>
9+
<Title>AnointedAutomation.Enums</Title>
10+
<Company>Anointed Automation LLC - Alexander Fields</Company>
11+
<Copyright>Copyright © 2023 Anointed Automation, LLC All rights reserved.</Copyright>
12+
<Description>Shared enumerations for AnointedAutomation packages</Description>
13+
<RepositoryUrl>https://github.com/roku674/AnointedAutomation</RepositoryUrl>
14+
<Version>0.0.1</Version>
15+
<PackageTags>enums</PackageTags>
16+
<PackageReleaseNotes>https://github.com/roku674/AnointedAutomation/pkgs/nuget/AnointedAutomation.Enums</PackageReleaseNotes>
17+
<Authors>Anointed Automation LLC, Alexander Fields</Authors>
18+
<PackageReadmeFile>README.md</PackageReadmeFile>
19+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
20+
</PropertyGroup>
21+
22+
<ItemGroup>
23+
<None Include="README.md" Pack="true" PackagePath="/" />
24+
</ItemGroup>
25+
26+
</Project>

AnointedAutomation.Objects/API/Billing/PaymentType.cs renamed to AnointedAutomation.Enums/PaymentType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Edited by Alexander Fields https://www.alexanderfields.me 2025-07-02 11:48:25
33
//Created by Alexander Fields
44

5-
namespace AnointedAutomation.Objects.Billing
5+
namespace AnointedAutomation.Enums
66
{
77
/// <summary>
88
/// Defines the supported payment methods.

AnointedAutomation.Enums/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# AnointedAutomation.Enums
2+
3+
Shared enumerations for AnointedAutomation packages.
4+
5+
## Overview
6+
7+
This package contains all shared enum definitions used across the AnointedAutomation ecosystem. By centralizing enums in a single package, we ensure consistency and avoid duplication across dependent packages.
8+
9+
## Enums
10+
11+
### PaymentType
12+
Defines supported payment methods.
13+
- `None` (0)
14+
- `PayPalToken` (1)
15+
- `MasterCard` (2)
16+
- `Visa` (3)
17+
- `ACH` (4)
18+
19+
### MessageType
20+
Defines log message severity levels.
21+
- `Info` (0)
22+
- `Warning` (1)
23+
- `Error` (2)
24+
- `Debug` (3)
25+
26+
## Usage
27+
28+
```csharp
29+
using AnointedAutomation.Enums;
30+
31+
var paymentMethod = PaymentType.Visa;
32+
var logLevel = MessageType.Info;
33+
```
34+
35+
## License
36+
37+
MIT License - Copyright © 2023 Anointed Automation, LLC
38+
39+
Created by Alexander Fields - https://www.alexanderfields.me

AnointedAutomation.Objects.API/API/Account/Credentials.cs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,21 @@
99
// - Reference types (objects): PascalCase (e.g., string Message, object Data)
1010
// =============================================================================
1111

12+
using BaseCredentials = AnointedAutomation.Objects.Account.Credentials;
13+
1214
namespace AnointedAutomation.Objects.API.Account
1315
{
14-
public class Credentials
16+
/// <summary>
17+
/// API-specific credentials class. Inherits all properties from the base Credentials class.
18+
/// </summary>
19+
public class Credentials : BaseCredentials
1520
{
1621
public Credentials()
17-
{
18-
}
22+
: base()
23+
{ }
1924

2025
public Credentials(string email, string password, string token, string googleToken)
21-
{
22-
this.Email = email ?? throw new System.ArgumentNullException(nameof(email));
23-
this.Password = password ?? throw new System.ArgumentNullException(nameof(password));
24-
this.Token = token;
25-
this.GoogleToken = googleToken;
26-
}
27-
28-
public string Email { get; set; }
29-
public string GoogleToken { get; set; }
30-
public string Password { get; set; }
31-
public string Token { get; set; }
26+
: base(email, password, token, googleToken)
27+
{ }
3228
}
3329
}

AnointedAutomation.Objects.API/API/Billing/Address.cs

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,74 +9,22 @@
99
// - Reference types (objects): PascalCase (e.g., string Message, object Data)
1010
// =============================================================================
1111

12-
using System.Runtime.Serialization;
12+
using BaseAddress = AnointedAutomation.Objects.Billing.Address;
1313

1414
namespace AnointedAutomation.Objects.API.Billing
1515
{
16+
/// <summary>
17+
/// API-specific address class. Inherits all properties from the base Address class.
18+
/// </summary>
1619
[System.Serializable]
17-
public class Address
20+
public class Address : BaseAddress
1821
{
1922
public Address()
20-
{
21-
}
23+
: base()
24+
{ }
2225

23-
/// <summary>
24-
/// </summary>
25-
/// <param name="city">!nullable</param>
26-
/// <param name="country">!nullable</param>
27-
/// <param name="name"></param>
28-
/// <param name="contact">!nullable</param>
29-
/// <param name="state">!nullable</param>
30-
/// <param name="street">!nullable</param>
31-
/// <param name="zip"></param>
32-
public Address(string city, string country, string name, Contact contact, string state, string street, int zip)
33-
{
34-
this.City = city ?? throw new System.ArgumentNullException(nameof(city));
35-
this.Country = country ?? throw new System.ArgumentNullException(nameof(country));
36-
this.Name = name;
37-
this.Contact = contact ?? throw new System.ArgumentNullException(nameof(contact));
38-
this.State = state ?? throw new System.ArgumentNullException(nameof(state));
39-
this.Street = street ?? throw new System.ArgumentNullException(nameof(street));
40-
this.zip = zip;
41-
}
42-
43-
/// <summary>
44-
/// Do they put on for their...
45-
/// </summary>
46-
[DataMember]
47-
public string City { get; set; }
48-
49-
[DataMember]
50-
public Contact Contact { get; set; }
51-
52-
/// <summary>
53-
/// Their Country/State (not to be confused with individual states in U.S.)
54-
/// </summary>
55-
[DataMember]
56-
public string Country { get; set; }
57-
58-
/// <summary>
59-
/// This isn't required if sending to a person
60-
/// </summary>
61-
[DataMember]
62-
public string Name { get; set; }
63-
64-
/// <summary>
65-
/// State/Province
66-
/// </summary>
67-
[DataMember]
68-
public string State { get; set; }
69-
70-
/// <summary>
71-
/// street address
72-
/// </summary>
73-
[DataMember]
74-
public string Street { get; set; }
75-
76-
/// <summary>
77-
/// zip code
78-
/// </summary>
79-
[DataMember]
80-
public int zip { get; set; }
26+
public Address(string city, string country, string name, AnointedAutomation.Objects.Billing.Contact contact, string state, string street, int zip)
27+
: base(city, country, name, contact, state, street, zip)
28+
{ }
8129
}
8230
}
Lines changed: 17 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,28 @@
11
// Copyright © Anointed Automation, LLC., 2024. All Rights Reserved. Created by Alexander Fields https://www.alexanderfields.me on 2024-01-16 19:19:01
22
// Edited by Alexander Fields https://www.alexanderfields.me 2025-07-02 11:48:25
33

4-
using System.Collections.Generic;
5-
using System.Runtime.Serialization;
4+
// =============================================================================
5+
// NAMING CONVENTION:
6+
// This codebase follows a specific property naming pattern:
7+
// - Value types (structs): lowercase (e.g., bool success, int statusCode)
8+
// - Reference types (objects): PascalCase (e.g., string Message, object Data)
9+
// =============================================================================
10+
11+
using BaseBill = AnointedAutomation.Objects.Billing.Bill;
612

713
namespace AnointedAutomation.Objects.API.Billing
814
{
9-
public class Bill
15+
/// <summary>
16+
/// API-specific bill class. Inherits all properties from the base Bill class.
17+
/// </summary>
18+
public class Bill : BaseBill
1019
{
1120
public Bill()
12-
{
13-
}
14-
15-
public Bill(string userId, Address addressBilling, List<string> orders, PaymentCredentials paymentTypes, List<Purchase> purchases, List<Purchase> refunds, List<Subscription> subscriptions)
16-
{
17-
this._id = userId;
18-
this.AdressBilling = addressBilling ?? new Address();
19-
this.Orders = orders ?? new List<string>();
20-
this.PaymentTypesOnFile = paymentTypes ?? new PaymentCredentials();
21-
this.Purchases = purchases ?? new List<Purchase>();
22-
this.Refunds = refunds ?? new List<Purchase>();
23-
this.Subscriptions = subscriptions ?? new List<Subscription>();
24-
}
25-
26-
[DataMember]
27-
public string _id { get; set; }
28-
29-
/// <summary>
30-
/// Keep a billign address on file
31-
/// </summary>
32-
[DataMember]
33-
public Address AdressBilling
34-
{
35-
get; set;
36-
}
37-
38-
[DataMember]
39-
public List<string> Orders
40-
{
41-
get; set;
42-
}
43-
44-
/// <summary>
45-
/// Credit cards, billing, etc
46-
/// </summary>
47-
[DataMember]
48-
public PaymentCredentials PaymentTypesOnFile
49-
{
50-
get; set;
51-
}
52-
53-
/// <summary>
54-
/// All purchases made
55-
/// </summary>
56-
[DataMember]
57-
public List<Purchase> Purchases
58-
{
59-
get; set;
60-
}
61-
62-
/// <summary>
63-
/// Purchases that have been refunded
64-
/// </summary>
65-
[DataMember]
66-
public List<Purchase> Refunds
67-
{
68-
get; set;
69-
}
70-
71-
/// <summary>
72-
/// Subscriptions
73-
/// </summary>
74-
[DataMember]
75-
public List<Subscription> Subscriptions
76-
{
77-
get; set;
78-
}
21+
: base()
22+
{ }
7923

80-
public dynamic GetPrimaryPayment()
81-
{
82-
if (PaymentTypesOnFile.CreditCard != null)
83-
{
84-
return PaymentTypesOnFile.CreditCard;
85-
}
86-
else if (PaymentTypesOnFile.PayeeInfo != null)
87-
{
88-
return PaymentTypesOnFile.PayeeInfo;
89-
}
90-
else
91-
return null;
92-
}
24+
public Bill(string userId, AnointedAutomation.Objects.Billing.Address addressBilling, System.Collections.Generic.List<string> orders, AnointedAutomation.Objects.Billing.PaymentCredentials paymentTypes, System.Collections.Generic.List<AnointedAutomation.Objects.Billing.Purchase> purchases, System.Collections.Generic.List<AnointedAutomation.Objects.Billing.Purchase> refunds, System.Collections.Generic.List<AnointedAutomation.Objects.Billing.Subscription> subscriptions)
25+
: base(userId, addressBilling, orders, paymentTypes, purchases, refunds, subscriptions)
26+
{ }
9327
}
9428
}

AnointedAutomation.Objects.API/API/Billing/Contact.cs

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,22 @@
99
// - Reference types (objects): PascalCase (e.g., string Message, object Data)
1010
// =============================================================================
1111

12-
using System.Runtime.Serialization;
12+
using BaseContact = AnointedAutomation.Objects.Billing.Contact;
1313

1414
namespace AnointedAutomation.Objects.API.Billing
1515
{
16+
/// <summary>
17+
/// API-specific contact class. Inherits all properties from the base Contact class.
18+
/// </summary>
1619
[System.Serializable]
17-
public class Contact
20+
public class Contact : BaseContact
1821
{
1922
public Contact()
20-
{
21-
}
23+
: base()
24+
{ }
2225

23-
/// <summary>
24-
/// Construct their name
25-
/// </summary>
26-
/// <param name="firstName">!nullable</param>
27-
/// <param name="lastName">!nullable</param>
28-
/// <param name="middleName"></param>
29-
/// <param name="number"></param>
3026
public Contact(System.DateTime dob, string firstName, string lastName, string middleName, ulong number)
31-
{
32-
this.dob = dob != default ? dob : new System.DateTime(1900, 1, 1);
33-
this.FirstName = firstName ?? "";
34-
this.LastName = lastName ?? "";
35-
this.MiddleName = middleName;
36-
this.number = number;
37-
}
38-
39-
[DataMember]
40-
public System.DateTime dob { get; set; }
41-
42-
[DataMember]
43-
public string FirstName { get; set; }
44-
45-
[DataMember]
46-
public string LastName { get; set; }
47-
48-
[DataMember]
49-
public string MiddleName { get; set; }
50-
51-
/// <summary>
52-
/// This is their phone number if they have one
53-
/// </summary>
54-
[DataMember]
55-
public ulong number { get; set; }
27+
: base(dob, firstName, lastName, middleName, number)
28+
{ }
5629
}
5730
}

0 commit comments

Comments
 (0)