Add the government_agency party role
Regulators and registries that don't tax the company (a division of corporations, a licensing board), distinct from tax_agency. Core Role, MCP descriptions, viewer label/noun/icon, docs, and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
1 parent
8498e6cfab
commit
e9e8d9fb11
8 files changed
+27
-8
No files matched your search
@@ -51,6 +51,9 @@ pub enum Role {
|
||||
PayoutPlatform,
|
||||
/// Taxes the company (the IRS, a state).
|
||||
TaxAgency,
|
||||
/// Regulates or registers the company without taxing it (a secretary
|
||||
/// of state, a division of corporations, a licensing board).
|
||||
GovernmentAgency,
|
||||
/// Holds the company's money or credit (a bank, a card issuer).
|
||||
FinancialInstitution,
|
||||
/// Rents property to the company (gets a 1099-MISC for rent).
|
||||
@@ -59,7 +62,7 @@ pub enum Role {
|
||||
|
||||
impl Role {
|
||||
/// Every role, in display order.
|
||||
pub const ALL: [Role; 9] = [
|
||||
pub const ALL: [Role; 10] = [
|
||||
Role::Vendor,
|
||||
Role::Contractor,
|
||||
Role::Customer,
|
||||
@@ -67,6 +70,7 @@ impl Role {
|
||||
Role::Member,
|
||||
Role::PayoutPlatform,
|
||||
Role::TaxAgency,
|
||||
Role::GovernmentAgency,
|
||||
Role::FinancialInstitution,
|
||||
Role::Landlord,
|
||||
];
|
||||
@@ -81,6 +85,7 @@ impl Role {
|
||||
Role::Member => "member",
|
||||
Role::PayoutPlatform => "payout_platform",
|
||||
Role::TaxAgency => "tax_agency",
|
||||
Role::GovernmentAgency => "government_agency",
|
||||
Role::FinancialInstitution => "financial_institution",
|
||||
Role::Landlord => "landlord",
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ fn gets_1099_is_contractor_and_landlord_only() {
|
||||
#[test]
|
||||
fn role_keys_round_trip() {
|
||||
let all: BTreeSet<Role> = Role::ALL.into_iter().collect();
|
||||
assert_eq!(all.len(), 9, "nine distinct roles");
|
||||
assert_eq!(all.len(), 10, "ten distinct roles");
|
||||
for r in [
|
||||
Role::Vendor,
|
||||
Role::Contractor,
|
||||
@@ -335,6 +335,7 @@ fn role_keys_round_trip() {
|
||||
Role::Member,
|
||||
Role::PayoutPlatform,
|
||||
Role::TaxAgency,
|
||||
Role::GovernmentAgency,
|
||||
Role::FinancialInstitution,
|
||||
Role::Landlord,
|
||||
] {
|
||||
@@ -343,6 +344,7 @@ fn role_keys_round_trip() {
|
||||
}
|
||||
assert_eq!(Role::PayoutPlatform.key(), "payout_platform");
|
||||
assert_eq!(Role::TaxAgency.key(), "tax_agency");
|
||||
assert_eq!(Role::GovernmentAgency.key(), "government_agency");
|
||||
assert_eq!(Role::FinancialInstitution.key(), "financial_institution");
|
||||
assert_eq!(Role::Contractor.key(), "contractor");
|
||||
assert_eq!(Role::parse("boss"), None);
|
||||
|
||||
Reference in new issue
Block a user