From e6f2c499960979e692d8bc4684e69c2b6050db2c Mon Sep 17 00:00:00 2001 From: Hongjing <60866283+chenhongjing@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:41:33 -0700 Subject: [PATCH] 23354 - Misc updates for Notice of Withdrawal (#3010) * 23354 - misc updates Signed-off-by: Hongjing Chen * fix linting-1 Signed-off-by: Hongjing Chen * modify testing identifier for continued in businesses Signed-off-by: Hongjing Chen --------- Signed-off-by: Hongjing Chen --- legal-api/src/legal_api/core/filing.py | 2 ++ legal-api/src/legal_api/core/meta/filing.py | 15 +++++++++++++++ legal-api/src/legal_api/models/filing.py | 16 ++++++++++++++++ .../v1/test_business_filings/test_filings.py | 11 +++++++++++ .../v2/test_business_filings/test_filings.py | 11 +++++++++++ 5 files changed, 55 insertions(+) diff --git a/legal-api/src/legal_api/core/filing.py b/legal-api/src/legal_api/core/filing.py index dbd5f67127..5456f99577 100644 --- a/legal-api/src/legal_api/core/filing.py +++ b/legal-api/src/legal_api/core/filing.py @@ -52,6 +52,7 @@ class Status(str, Enum): PENDING = 'PENDING' PAPER_ONLY = 'PAPER_ONLY' PENDING_CORRECTION = 'PENDING_CORRECTION' + WITHDRAWN = 'WITHDRAWN' # filings with staff review APPROVED = 'APPROVED' @@ -86,6 +87,7 @@ class FilingTypes(str, Enum): DISSOLUTION = 'dissolution' DISSOLVED = 'dissolved' INCORPORATIONAPPLICATION = 'incorporationApplication' + NOTICEOFWITHDRAWAL = 'noticeOfWithdrawal' PUTBACKON = 'putBackOn' REGISTRARSNOTATION = 'registrarsNotation' REGISTRARSORDER = 'registrarsOrder' diff --git a/legal-api/src/legal_api/core/meta/filing.py b/legal-api/src/legal_api/core/meta/filing.py index fb59b488cd..029d58a6a0 100644 --- a/legal-api/src/legal_api/core/meta/filing.py +++ b/legal-api/src/legal_api/core/meta/filing.py @@ -490,6 +490,21 @@ class FilingTitles(str, Enum): }, ] }, + 'noticeOfWithdrawal': { + 'name': 'noticeOfWithdrawal', + 'title': 'Notice of Withdrawal', + 'displayName': 'Notice of Withdrawal', + 'codes': { + 'BC': 'NWITH', + 'BEN': 'NWITH', + 'ULC': 'NWITH', + 'CC': 'NWITH', + 'C': 'NWITH', + 'CBEN': 'NWITH', + 'CUL': 'NWITH', + 'CCC': 'NWITH' + } + }, 'putBackOn': { 'name': 'putBackOn', 'title': 'Put Back On', diff --git a/legal-api/src/legal_api/models/filing.py b/legal-api/src/legal_api/models/filing.py index 4afb5ccf72..bf572214ed 100644 --- a/legal-api/src/legal_api/models/filing.py +++ b/legal-api/src/legal_api/models/filing.py @@ -50,6 +50,7 @@ class Status(str, Enum): PAID = 'PAID' PENDING = 'PENDING' PENDING_CORRECTION = 'PENDING_CORRECTION' + WITHDRAWN = 'WITHDRAWN' # filings with staff review APPROVED = 'APPROVED' @@ -337,6 +338,21 @@ class Source(Enum): }, 'temporaryCorpTypeCode': 'TMP' }, + 'noticeOfWithdrawal': { + 'name': 'noticeOfWithdrawal', + 'title': 'Notice of Withdrawal', + 'displayName': 'Notice of Withdrawal', + 'codes': { + 'BC': 'NWITH', + 'BEN': 'NWITH', + 'ULC': 'NWITH', + 'CC': 'NWITH', + 'C': 'NWITH', + 'CBEN': 'NWITH', + 'CUL': 'NWITH', + 'CCC': 'NWITH' + } + }, 'registration': { 'name': 'registration', 'title': 'Registration', diff --git a/legal-api/tests/unit/resources/v1/test_business_filings/test_filings.py b/legal-api/tests/unit/resources/v1/test_business_filings/test_filings.py index 472f4cdcec..699dd07e37 100644 --- a/legal-api/tests/unit/resources/v1/test_business_filings/test_filings.py +++ b/legal-api/tests/unit/resources/v1/test_business_filings/test_filings.py @@ -1031,6 +1031,9 @@ def test_calc_annual_report_date(session, client, jwt): CONTINUATION_OUT_FILING = copy.deepcopy(FILING_HEADER) CONTINUATION_OUT_FILING['filing']['continuationOut'] = {} +NOTICE_OF_WITHDRAWAL = copy.deepcopy(FILING_HEADER) +NOTICE_OF_WITHDRAWAL['filing']['noticeOfWithdrawal'] = {} + def _get_expected_fee_code(free, filing_name, filing_json: dict, legal_type): """Return fee codes for legal type.""" @@ -1096,6 +1099,14 @@ def _fee_code_asserts(business, filing_json: dict, multiple_fee_codes, expected_ ('BC1234567', CONTINUATION_OUT_FILING, 'continuationOut', Business.LegalTypes.BCOMP.value, False, []), ('BC1234567', CONTINUATION_OUT_FILING, 'continuationOut', Business.LegalTypes.BC_ULC_COMPANY.value, False, []), ('BC1234567', CONTINUATION_OUT_FILING, 'continuationOut', Business.LegalTypes.BC_CCC.value, False, []), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.COMP.value, False, []), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP.value, False, []), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_ULC_COMPANY.value, False, []), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_CCC.value, False, []), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CONTINUE_IN.value, False, []), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP_CONTINUE_IN.value, False, []), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.ULC_CONTINUE_IN.value, False, []), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CCC_CONTINUE_IN.value, False, []), ] ) def test_get_correct_fee_codes( diff --git a/legal-api/tests/unit/resources/v2/test_business_filings/test_filings.py b/legal-api/tests/unit/resources/v2/test_business_filings/test_filings.py index 13f1334c0f..5cdeb94db8 100644 --- a/legal-api/tests/unit/resources/v2/test_business_filings/test_filings.py +++ b/legal-api/tests/unit/resources/v2/test_business_filings/test_filings.py @@ -1094,6 +1094,9 @@ def test_calc_annual_report_date(session, client, jwt): SPECIAL_RESOLUTION_NO_CON_FILING = copy.deepcopy(CP_SPECIAL_RESOLUTION_TEMPLATE) del SPECIAL_RESOLUTION_NO_CON_FILING['filing']['changeOfName'] +NOTICE_OF_WITHDRAWAL = copy.deepcopy(FILING_HEADER) +NOTICE_OF_WITHDRAWAL['filing']['noticeOfWithdrawal'] = {} + def _get_expected_fee_code(free, filing_name, filing_json: dict, legal_type): """Return fee codes for legal type.""" @@ -1185,6 +1188,14 @@ def _get_expected_fee_code(free, filing_name, filing_json: dict, legal_type): False, [], False), ('CP1234567', CP_SPECIAL_RESOLUTION_TEMPLATE, 'specialResolution', Business.LegalTypes.COOP.value, False, ['SPRLN', 'OTCON'], False), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.COMP.value, False, [], False), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP.value, False, [], False), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_ULC_COMPANY.value, False, [], False), + ('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_CCC.value, False, [], False), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CONTINUE_IN.value, False, [], False), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP_CONTINUE_IN.value, False, [], False), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.ULC_CONTINUE_IN.value, False, [], False), + ('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CCC_CONTINUE_IN.value, False, [], False), ] ) def test_get_correct_fee_codes(