Skip to content

Commit 540c1ff

Browse files
Feat/Setting Privilege Fee Per License Type (#749)
several jurisdictions have reported that they set different privilege fees based on the type of license for which the privilege record is being purchased. This deprecates the old jurisdictionFee field in place of a 'privilegeFees' field, which is a list of objects defining the amount for every license type supported by the compact. ### Testing List - tests/test data updated to reference new schema Closes #635 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced support for jurisdiction-specific privilege fees, allowing multiple license types with distinct fee amounts per jurisdiction. - Added new configuration fields for privilege fees across various jurisdictions and compacts. - Updated API responses and schemas to include detailed privilege fee information for each license type. - **Bug Fixes** - Improved validation to ensure all required license types have corresponding privilege fees and to detect duplicates or unknown license types. - **Refactor** - Deprecated the single jurisdiction fee field in favor of the new privilege fees structure. - Enhanced fee calculation logic to apply discounts and determine fees by license type. - Renamed license type properties for clarity and improved configuration validation. - **Tests** - Updated test data and assertions to validate the new privilege fees structure and deprecation of the old fee field. - Improved test coverage for multiple license types and privilege fee scenarios. - **Chores** - Added new environment variable to smoke test configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 13af561 commit 540c1ff

File tree

31 files changed

+2218
-1737
lines changed

31 files changed

+2218
-1737
lines changed

backend/compact-connect/common_constructs/stack.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,15 @@ def __init__(self, *args, standard_tags: StandardTags, environment_name: str, **
5959
)
6060

6161
@cached_property
62-
def license_types(self):
63-
"""Flattened list of all license types across all compacts"""
62+
def license_type_names(self):
63+
"""Flattened list of all license type names across all compacts"""
6464
return [typ['name'] for compact in self.node.get_context('license_types').values() for typ in compact]
6565

66+
@cached_property
67+
def license_types(self):
68+
"""Dictionary of license types by compact"""
69+
return self.node.get_context('license_types')
70+
6671
@cached_property
6772
def common_env_vars(self):
6873
return {

backend/compact-connect/compact-config/aslp/kentucky.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Kentucky"
33
postalAbbreviation: "ky"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 100
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "aud"
8+
amount: 100
9+
- licenseTypeAbbreviation: "slp"
10+
amount: 100
511
militaryDiscount:
612
active: true
713
discountType: "FLAT_RATE"

backend/compact-connect/compact-config/aslp/nebraska.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Nebraska"
33
postalAbbreviation: "ne"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 100
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "aud"
8+
amount: 100
9+
- licenseTypeAbbreviation: "slp"
10+
amount: 100
511
militaryDiscount:
612
active: true
713
discountType: "FLAT_RATE"

backend/compact-connect/compact-config/aslp/ohio.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Ohio"
33
postalAbbreviation: "oh"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 25
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "aud"
8+
amount: 25
9+
- licenseTypeAbbreviation: "slp"
10+
amount: 25
511
jurisdictionOperationsTeamEmails:
612
713
jurisdictionAdverseActionsNotificationEmails: ["[email protected]"]

backend/compact-connect/compact-config/coun/florida.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Florida"
33
postalAbbreviation: "fl"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 15
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "lpc"
8+
amount: 15
59
jurisdictionOperationsTeamEmails:
610
711
jurisdictionAdverseActionsNotificationEmails: []

backend/compact-connect/compact-config/coun/kentucky.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Kentucky"
33
postalAbbreviation: "ky"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 100
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "lpc"
8+
amount: 100
59
militaryDiscount:
610
active: true
711
discountType: "FLAT_RATE"

backend/compact-connect/compact-config/coun/nebraska.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Nebraska"
33
postalAbbreviation: "ne"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 100
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "lpc"
8+
amount: 100
59
militaryDiscount:
610
active: true
711
discountType: "FLAT_RATE"

backend/compact-connect/compact-config/coun/ohio.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Ohio"
33
postalAbbreviation: "oh"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 100
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "lpc"
8+
amount: 100
59
militaryDiscount:
610
active: true
711
discountType: "FLAT_RATE"

backend/compact-connect/compact-config/octp/alabama.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Alabama"
33
postalAbbreviation: "al"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 100
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "ot"
8+
amount: 100
9+
- licenseTypeAbbreviation: "ota"
10+
amount: 100
511
jurisdictionOperationsTeamEmails:
612
713
jurisdictionAdverseActionsNotificationEmails: []

backend/compact-connect/compact-config/octp/arkansas.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# PLACEHOLDER DATA, NOT FINAL CONFIGURATION.
22
jurisdictionName: "Arkansas"
33
postalAbbreviation: "ar"
4+
# deprecated - will be removed as part of https://github.com/csg-org/CompactConnect/issues/636
45
jurisdictionFee: 3
6+
privilegeFees:
7+
- licenseTypeAbbreviation: "ot"
8+
amount: 3
9+
- licenseTypeAbbreviation: "ota"
10+
amount: 3
511
jurisdictionOperationsTeamEmails:
612
713
jurisdictionAdverseActionsNotificationEmails: ["[email protected]"]

0 commit comments

Comments
 (0)