Skip to content

Commit 405a097

Browse files
authored
Small Application Refactoring (#244)
* refactoring application * update test * add Corporation to EntityType
1 parent fbde0d2 commit 405a097

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

e2e_tests/application_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def create_business_application():
5656
Phone("1", "2025550158"), "[email protected]", ssn="574572795")
5757
],
5858
year_of_incorporation=date.today() - timedelta(days=2 * 365),
59-
business_vertical="Construction"
59+
business_vertical="Construction",
60+
tags={"test": "test"},
61+
idempotency_key=generate_uuid()
6062
)
6163

6264
return client.applications.create(request)

unit/models/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
SourceOfIncome = Literal["EmploymentOrPayrollIncome", "PartTimeOrContractorIncome", "InheritancesAndGifts",
2222
"PersonalInvestments", "BusinessOwnershipInterests", "GovernmentBenefits"]
2323
Status = Literal["Approved", "Denied", "PendingReview"]
24-
Title = Literal["CEO", "COO", "CFO", "President"]
25-
EntityType = Literal["Corporation", "LLC", "Partnership"]
24+
Title = Literal["CEO", "COO", "CFO", "President", "BenefitsAdministrationOfficer", "CIO", "VP", "AVP", "Treasurer",
25+
"Secretary", "Controller", "Manager", "Partner", "Member"]
26+
EntityType = Literal["Corporation", "LLC", "Partnership", "PubliclyTradedCorporation", "PrivatelyHeldCorporation",
27+
"NotForProfitOrganization"]
2628
UseSelfieVerification = Literal["Never", "ReplaceIdentification"]
2729

2830

unit/models/application.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ def __init__(self, name: str, address: Address, phone: Phone, state_of_incorpora
187187
year_of_incorporation: Optional[Union[date, str]] = None,
188188
countries_of_operation: Optional[List[str]] = None, stock_symbol: Optional[str] = None,
189189
business_vertical: Optional[BusinessVertical] = None,
190-
device_fingerprints: Optional[List[DeviceFingerprint]] = None
190+
device_fingerprints: Optional[List[DeviceFingerprint]] = None,
191+
tags: Optional[Dict[str, str]] = None, idempotency_key: Optional[str] = None
191192
):
192193
self.name = name
193194
self.address = address
@@ -210,6 +211,8 @@ def __init__(self, name: str, address: Address, phone: Phone, state_of_incorpora
210211
self.stock_symbol = stock_symbol
211212
self.business_vertical = business_vertical
212213
self.device_fingerprints = device_fingerprints
214+
self.tags = tags
215+
self.idempotency_key = idempotency_key
213216

214217
def to_json_api(self) -> Dict:
215218
return super().to_payload("businessApplication")

0 commit comments

Comments
 (0)