diff --git a/mhr_api/report-templates/template-parts/search-result/notes.html b/mhr_api/report-templates/template-parts/search-result/notes.html index da0d9f30a..5e10eb361 100755 --- a/mhr_api/report-templates/template-parts/search-result/notes.html +++ b/mhr_api/report-templates/template-parts/search-result/notes.html @@ -106,22 +106,9 @@ {% endif %} - - Phone: - {% if note.contactPhoneNumber is defined and note.contactPhoneNumber != '' %} - {{note.contactPhoneNumber}} - {% elif note.givingNoticeParty is defined and note.givingNoticeParty.phoneNumber is defined and note.givingNoticeParty.phoneNumber != '' %} - {{note.givingNoticeParty.phoneNumber}} - {% else %} - N/A - {% endif %} - - {% endif %} - {% if not loop.last %} -
- {% endif %} +
{% endfor %} {% endif %} diff --git a/mhr_api/src/database/postgres_views/mhr_account_reg_vw.sql b/mhr_api/src/database/postgres_views/mhr_account_reg_vw.sql index 2db6b64db..ee5c3bc57 100644 --- a/mhr_api/src/database/postgres_views/mhr_account_reg_vw.sql +++ b/mhr_api/src/database/postgres_views/mhr_account_reg_vw.sql @@ -69,7 +69,12 @@ SELECT r.mhr_number, r.status_type, r.registration_ts, r.id AS registration_id, (SELECT mrr.doc_storage_url FROM mhr_registration_reports mrr - WHERE mrr.registration_id = r.id) AS doc_storage_url + WHERE mrr.registration_id = r.id) AS doc_storage_url, + (SELECT l.location_type + FROM mhr_locations l, mhr_registrations r2 + WHERE r2.mhr_number = r.mhr_number + AND r2.id = l.registration_id + AND l.status_type = 'ACTIVE') AS location_type FROM mhr_registrations r, mhr_documents d, mhr_document_types dt WHERE r.id = d.registration_id AND d.document_type = dt.document_type diff --git a/mhr_api/src/mhr_api/models/db2/queries.py b/mhr_api/src/mhr_api/models/db2/queries.py index bade82758..5bedf908d 100644 --- a/mhr_api/src/mhr_api/models/db2/queries.py +++ b/mhr_api/src/mhr_api/models/db2/queries.py @@ -154,10 +154,19 @@ WHERE n.manhomid = mh.manhomid AND n.status = 'A' AND (n.docutype IN ('TAXN', 'NCON', 'REST') OR (n.docutype IN ('103 ', '103E') AND n.expiryda IS NOT NULL AND n.expiryda > current date)) - FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type - FROM manuhome mh, document d + FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type, + CASE + WHEN trim(l.mhdealer) != '' THEN 'MANUFACTURER' + WHEN trim(l.mahpname) != '' THEN 'MH_PARK' + WHEN trim(l.adddesc) != '' AND + (l.adddesc LIKE '%BAND%' OR l.adddesc LIKE '%INDIAN%' OR l.adddesc LIKE '%RESERVE%') THEN 'RESERVE' + ELSE 'OTHER' + END location_type + FROM manuhome mh, document d, location l WHERE mh.mhregnum = :query_mhr_number AND mh.mhregnum = d.mhregnum + AND mh.manhomid = l.manhomid + AND l.status = 'A' """ QUERY_ACCOUNT_ADD_REGISTRATION_DOC = """ SELECT mh.mhregnum, mh.mhstatus, d.regidate, TRIM(d.name), TRIM(d.olbcfoli), TRIM(d.docutype), @@ -196,11 +205,20 @@ WHERE n.manhomid = mh.manhomid AND n.status = 'A' AND (n.docutype IN ('TAXN', 'NCON', 'REST') OR (n.docutype IN ('103 ', '103E') AND n.expiryda IS NOT NULL AND n.expiryda > current date)) - FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type - FROM manuhome mh, document d, document d2 + FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type, + CASE + WHEN trim(l.mhdealer) != '' THEN 'MANUFACTURER' + WHEN trim(l.mahpname) != '' THEN 'MH_PARK' + WHEN trim(l.adddesc) != '' AND + (l.adddesc LIKE '%BAND%' OR l.adddesc LIKE '%INDIAN%' OR l.adddesc LIKE '%RESERVE%') THEN 'RESERVE' + ELSE 'OTHER' + END location_type + FROM manuhome mh, document d, document d2, location l WHERE d2.docuregi = :query_value AND d2.mhregnum = mh.mhregnum AND mh.mhregnum = d.mhregnum + AND mh.manhomid = l.manhomid + AND l.status = 'A' """ QUERY_ACCOUNT_REGISTRATIONS = """ SELECT mh.mhregnum, mh.mhstatus, d.regidate, TRIM(d.name), TRIM(d.olbcfoli), TRIM(d.docutype), @@ -239,10 +257,19 @@ WHERE n.manhomid = mh.manhomid AND n.status = 'A' AND (n.docutype IN ('TAXN', 'NCON', 'REST') OR (n.docutype IN ('103 ', '103E') AND n.expiryda IS NOT NULL AND n.expiryda > current date)) - FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type - FROM manuhome mh, document d + FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type, + CASE + WHEN trim(l.mhdealer) != '' THEN 'MANUFACTURER' + WHEN trim(l.mahpname) != '' THEN 'MH_PARK' + WHEN trim(l.adddesc) != '' AND + (l.adddesc LIKE '%BAND%' OR l.adddesc LIKE '%INDIAN%' OR l.adddesc LIKE '%RESERVE%') THEN 'RESERVE' + ELSE 'OTHER' + END location_type + FROM manuhome mh, document d, location l WHERE mh.mhregnum IN (?) AND mh.mhregnum = d.mhregnum + AND mh.manhomid = l.manhomid + AND l.status = 'A' ORDER BY d.regidate DESC """ QUERY_ACCOUNT_REGISTRATIONS_SORT = """ @@ -283,6 +310,13 @@ AND (n.docutype IN ('TAXN', 'NCON', 'REST') OR (n.docutype IN ('103 ', '103E') AND n.expiryda IS NOT NULL AND n.expiryda > current date)) FETCH FIRST 1 ROWS ONLY) AS frozen_doc_type, + CASE + WHEN trim(l.mhdealer) != '' THEN 'MANUFACTURER' + WHEN trim(l.mahpname) != '' THEN 'MH_PARK' + WHEN trim(l.adddesc) != '' AND + (l.adddesc LIKE '%BAND%' OR l.adddesc LIKE '%INDIAN%' OR l.adddesc LIKE '%RESERVE%') THEN 'RESERVE' + ELSE 'OTHER' + END location_type, (SELECT TRIM(o2.ownrname) FROM owner o2, owngroup og2 WHERE o2.manhomid = mh.manhomid @@ -290,9 +324,11 @@ AND og2.owngrpid = o2.owngrpid AND og2.regdocid = d.documtid FETCH FIRST 1 ROWS ONLY) as owner_name_sort - FROM manuhome mh, document d + FROM manuhome mh, document d, location l WHERE mh.mhregnum IN (?) AND mh.mhregnum = d.mhregnum + AND mh.manhomid = l.manhomid + AND l.status = 'A' """ PERMIT_COUNT_QUERY = """ SELECT COUNT(documtid) diff --git a/mhr_api/src/mhr_api/models/db2/utils.py b/mhr_api/src/mhr_api/models/db2/utils.py index b6160e4ae..692cd3e6b 100755 --- a/mhr_api/src/mhr_api/models/db2/utils.py +++ b/mhr_api/src/mhr_api/models/db2/utils.py @@ -631,7 +631,8 @@ def __build_summary(row, add_in_user_list: bool = True, mhr_list=None): 'path': '', 'documentId': str(row[8]), 'documentRegistrationNumber': str(row[9]), - 'documentType': str(row[5]) + 'documentType': str(row[5]), + 'locationType': str(row[15]) } if add_in_user_list: summary['inUserList'] = False @@ -816,7 +817,7 @@ def get_search_json(registration): include: bool = True doc_type = note.get('documentType', '') current_app.logger.debug('updating doc type=' + doc_type) - if doc_type in ('103', '103E', 'STAT', 'EXRE'): # Always exclude + if doc_type in ('103', '103E', 'STAT', 'EXRE', 'NCAN'): # Always exclude include = False elif not registration.staff and doc_type in ('102', 'NCON'): # Always exclude for non-staff include = False diff --git a/mhr_api/src/mhr_api/models/queries.py b/mhr_api/src/mhr_api/models/queries.py index 31ef0b876..f4599430e 100644 --- a/mhr_api/src/mhr_api/models/queries.py +++ b/mhr_api/src/mhr_api/models/queries.py @@ -105,7 +105,8 @@ WHERE mer.mhr_number = arv.mhr_number AND mer.account_id = :query_value1 AND mer.account_id != arv.account_id - AND (mer.removed_ind IS NULL OR mer.removed_ind != 'Y')) AS extra_reg_count + AND (mer.removed_ind IS NULL OR mer.removed_ind != 'Y')) AS extra_reg_count, + location_type FROM mhr_account_reg_vw arv """ QUERY_ACCOUNT_ADD_REG_MHR = QUERY_ACCOUNT_REG_BASE + """ diff --git a/mhr_api/src/mhr_api/models/registration_utils.py b/mhr_api/src/mhr_api/models/registration_utils.py index 9c405ab92..ed2a305f5 100644 --- a/mhr_api/src/mhr_api/models/registration_utils.py +++ b/mhr_api/src/mhr_api/models/registration_utils.py @@ -454,7 +454,7 @@ def update_notes_search_json(notes_json: dict, staff: bool) -> dict: for note in notes_json: include: bool = True doc_type = note.get('documentType', '') - if doc_type in ('REG_103', 'REG_103E', 'STAT', 'EXRE'): # Always exclude + if doc_type in ('REG_103', 'REG_103E', 'STAT', 'EXRE', 'NCAN'): # Always exclude include = False elif not staff and doc_type in ('REG_102', 'NCON'): # Always exclude for non-staff include = False @@ -745,7 +745,8 @@ def __build_summary(row, account_id: str, staff: bool, add_in_user_list: bool = 'path': '', 'documentId': str(row[8]), 'documentRegistrationNumber': str(row[9]), - 'registrationType': str(row[5]) + 'registrationType': str(row[5]), + 'locationType': str(row[22]) } if (staff or account_id == reg_account_id) and (doc_storage_url or model_utils.report_retry_elapsed(timestamp)): if summary['registrationType'] in (MhrRegistrationTypes.MHREG, MhrRegistrationTypes.MHREG_CONVERSION): diff --git a/mhr_api/src/mhr_api/reports/v2/report_utils.py b/mhr_api/src/mhr_api/reports/v2/report_utils.py index 1a819ba94..2f526aaf8 100755 --- a/mhr_api/src/mhr_api/reports/v2/report_utils.py +++ b/mhr_api/src/mhr_api/reports/v2/report_utils.py @@ -310,6 +310,8 @@ def get_report_files(request_data: dict, report_type: str, mail: bool = False) - title_text = request_data['templateVars'].get('meta_title', '') elif report_type == ReportTypes.MHR_NOTE: title_text = str(request_data['templateVars']['note'].get('documentDescription', '')).upper() + if title_text == 'CANCEL NOTE' and request_data['templateVars']['note'].get('cancelledDocumentDescription'): + title_text += ' (' + request_data['templateVars']['note'].get('cancelledDocumentDescription') + ')' else: title_text = str(request_data['templateVars'].get('documentDescription', '')).upper() subtitle_text = request_data['templateVars'].get('meta_subtitle', '') diff --git a/mhr_api/src/mhr_api/resources/v1/notes.py b/mhr_api/src/mhr_api/resources/v1/notes.py index 7ed756ec0..7149d6141 100644 --- a/mhr_api/src/mhr_api/resources/v1/notes.py +++ b/mhr_api/src/mhr_api/resources/v1/notes.py @@ -112,10 +112,14 @@ def post_notes(mhr_number: str): # pylint: disable=too-many-return-statements,t def get_transaction_type(request_json) -> str: - """Try and obtain an optional boolean parameter value from the request parameters.""" + """Derive the payment transaction type from unit note document type.""" tran_type: str = TransactionTypes.UNIT_NOTE - if request_json.get('note') and request_json['note'].get('documentType', '') == MhrDocumentTypes.TAXN: - tran_type = TransactionTypes.UNIT_NOTE_TAXN - elif request_json.get('note') and request_json['note'].get('documentType', '') == MhrDocumentTypes.REG_102: - tran_type = TransactionTypes.UNIT_NOTE_102 + if request_json.get('note') and request_json['note'].get('documentType', ''): + doc_type: str = request_json['note'].get('documentType') + if doc_type == MhrDocumentTypes.TAXN: + tran_type = TransactionTypes.UNIT_NOTE_TAXN + elif doc_type == MhrDocumentTypes.REG_102: + tran_type = TransactionTypes.UNIT_NOTE_102 + elif doc_type in (MhrDocumentTypes.REST, MhrDocumentTypes.NPUB, MhrDocumentTypes.NCON): + tran_type = TransactionTypes.UNIT_NOTE_OTHER return tran_type diff --git a/mhr_api/src/mhr_api/services/payment/__init__.py b/mhr_api/src/mhr_api/services/payment/__init__.py index d7a97e56f..16b4c4300 100644 --- a/mhr_api/src/mhr_api/services/payment/__init__.py +++ b/mhr_api/src/mhr_api/services/payment/__init__.py @@ -34,3 +34,4 @@ class TransactionTypes(str, Enum): UNIT_NOTE_TAXN = 'UNIT_NOTE_TAXN' UNIT_NOTE_102 = 'UNIT_NOTE_102' DECAL_REPLACE = 'DECAL_REPLACE' + UNIT_NOTE_OTHER = 'UNIT_NOTE_OTHER' diff --git a/mhr_api/src/mhr_api/services/payment/client/__init__.py b/mhr_api/src/mhr_api/services/payment/client/__init__.py index b3d76d480..8d1f2403f 100644 --- a/mhr_api/src/mhr_api/services/payment/client/__init__.py +++ b/mhr_api/src/mhr_api/services/payment/client/__init__.py @@ -44,6 +44,7 @@ 'TRANSPORT_PERMIT_EXT': 'TRAPP', 'UNIT_NOTE': 'CCONT', 'UNIT_NOTE_TAXN': 'TXSNT', + 'UNIT_NOTE_OTHER': 'MHROT', 'UNIT_NOTE_102': 'MHDEC', 'DECAL_REPLACE': 'MHDEC' } diff --git a/mhr_api/src/mhr_api/version.py b/mhr_api/src/mhr_api/version.py index 37eeb2432..1738e531f 100644 --- a/mhr_api/src/mhr_api/version.py +++ b/mhr_api/src/mhr_api/version.py @@ -22,4 +22,4 @@ Development release segment: .devN """ -__version__ = '1.5.9' # pylint: disable=invalid-name +__version__ = '1.6.0' # pylint: disable=invalid-name diff --git a/mhr_api/tests/unit/api/test_notes.py b/mhr_api/tests/unit/api/test_notes.py index 673c54313..ce4de39fd 100644 --- a/mhr_api/tests/unit/api/test_notes.py +++ b/mhr_api/tests/unit/api/test_notes.py @@ -23,7 +23,9 @@ from flask import current_app from mhr_api.models import MhrRegistration +from mhr_api.resources.v1.notes import get_transaction_type from mhr_api.services.authz import MHR_ROLE, STAFF_ROLE, COLIN_ROLE, TRANSFER_DEATH_JT +from mhr_api.services.payment import TransactionTypes from tests.unit.services.utils import create_header, create_header_account @@ -80,6 +82,18 @@ ('Valid missing note remarks', '000900', [MHR_ROLE, STAFF_ROLE], HTTPStatus.CREATED, 'PS12345'), ('Valid staff', '000900', [MHR_ROLE, STAFF_ROLE], HTTPStatus.CREATED, 'PS12345') ] +# testdata pattern is ({doc_type}, {transaction_type}) +TEST_TRANSACTION_DATA = [ + ('CAU', TransactionTypes.UNIT_NOTE), + ('CAUC', TransactionTypes.UNIT_NOTE), + ('CAUE', TransactionTypes.UNIT_NOTE), + ('NCAN', TransactionTypes.UNIT_NOTE), + ('REG_102', TransactionTypes.UNIT_NOTE_102), + ('TAXN', TransactionTypes.UNIT_NOTE_TAXN), + ('NPUB', TransactionTypes.UNIT_NOTE_OTHER), + ('REST', TransactionTypes.UNIT_NOTE_OTHER), + ('NCON', TransactionTypes.UNIT_NOTE_OTHER) +] @pytest.mark.parametrize('desc,mhr_num,roles,status,account', TEST_CREATE_DATA) @@ -139,3 +153,13 @@ def test_create(session, client, jwt, desc, mhr_num, roles, status, account): assert notice_json['address']['region'] assert notice_json['address']['country'] assert notice_json['address']['postalCode'] is not None + + +@pytest.mark.parametrize('doc_type,trans_type', TEST_TRANSACTION_DATA) +def test_get_transaction_type(session, client, jwt, doc_type, trans_type): + """Assert that the document type to payment transaction type mapping works as expected.""" + # setup + json_data = copy.deepcopy(NOTE_REGISTRATION) + json_data['note']['documentType'] = doc_type + transaction_type: str = get_transaction_type(json_data) + assert transaction_type == trans_type diff --git a/mhr_api/tests/unit/models/test_mhr_registration.py b/mhr_api/tests/unit/models/test_mhr_registration.py index 62a5484a6..c52dac6f9 100755 --- a/mhr_api/tests/unit/models/test_mhr_registration.py +++ b/mhr_api/tests/unit/models/test_mhr_registration.py @@ -376,6 +376,7 @@ def test_find_summary_by_mhr_number(session, account_id, mhr_num, exists, reg_de assert registration['path'] is not None assert registration['documentId'] is not None assert registration['inUserList'] == in_list + assert registration.get('locationType') else: assert not registration @@ -385,7 +386,7 @@ def test_find_summary_by_doc_reg_number(session, account_id, doc_reg_num, mhr_nu """Assert that finding summary MHR registration information by a document registration number works as expected.""" registration = MhrRegistration.find_summary_by_doc_reg_number(account_id, doc_reg_num) if result_count > 0: - current_app.logger.info(registration) + # current_app.logger.info(registration) assert registration['mhrNumber'] == mhr_num assert registration['registrationType'] assert 'hasCaution' in registration @@ -399,6 +400,7 @@ def test_find_summary_by_doc_reg_number(session, account_id, doc_reg_num, mhr_nu assert registration['path'] is not None assert registration['documentId'] is not None assert registration['inUserList'] == in_list + assert registration.get('locationType') if result_count == 1: assert not registration.get('changes') else: @@ -436,6 +438,7 @@ def test_find_account_registrations(session, account_id, has_results): assert not registration.get('inUserList') if registration['registrationDescription'] == REG_DESCRIPTION: assert 'lienRegistrationType' in registration + assert registration.get('locationType') if registration.get('changes'): for reg in registration.get('changes'): desc: str = reg['registrationDescription'] diff --git a/mhr_api/tests/unit/services/test_payment.py b/mhr_api/tests/unit/services/test_payment.py index acb7032a4..5d8f1247b 100644 --- a/mhr_api/tests/unit/services/test_payment.py +++ b/mhr_api/tests/unit/services/test_payment.py @@ -144,7 +144,8 @@ ('MHR Transport Permit Extension', TransactionTypes.TRANSPORT_PERMIT_EXT, '1234', 'UT-00001', 1), ('MHR Decal Replacement', TransactionTypes.DECAL_REPLACE, '1234', 'UT-00001', 1), ('MHR Unit Note 102', TransactionTypes.UNIT_NOTE_102, '1234', 'UT-00001', 1), - ('MHR Unit Note TAXN', TransactionTypes.UNIT_NOTE_TAXN, '1234', 'UT-00001', 1) + ('MHR Unit Note TAXN', TransactionTypes.UNIT_NOTE_TAXN, '1234', 'UT-00001', 1), + ('MHR Unit Note Other', TransactionTypes.UNIT_NOTE_OTHER, '1234', 'UT-00001', 1) ] # testdata pattern is ({type}, {trans_id}, {client_id}, {routingSlip}, {bcolNum}, {datNum}, {waiveFees}, {priority}) TEST_PAYMENT_DATA_STAFF = [ diff --git a/ppr-api/src/ppr_api/models/search_historical.py b/ppr-api/src/ppr_api/models/search_historical.py index e4f0a4935..9101bfec6 100644 --- a/ppr-api/src/ppr_api/models/search_historical.py +++ b/ppr-api/src/ppr_api/models/search_historical.py @@ -103,6 +103,87 @@ WHERE q.match_type = 'EXACT' ORDER BY q.serial_number ASC, q.year ASC, q.base_registration_ts ASC """ +BUSINESS_NAME_QUERY = """ +WITH q AS ( + SELECT(SELECT searchkey_business_name(:query_bus_name)) AS search_key, + SUBSTR((SELECT searchkey_business_name(:query_bus_name)),1,1) AS search_key_char1, + (SELECT business_name_strip_designation(:query_bus_name)) AS search_name_base, + (SELECT array_length(string_to_array(trim(regexp_replace(:query_bus_name,'^THE','','gi')),' '),1)) AS word_length) + SELECT r.registration_type,r.registration_ts AS base_registration_ts, + p.business_name, + r.registration_number AS base_registration_num, + CASE WHEN p.bus_name_base = search_name_base THEN 'EXACT' + ELSE 'SIMILAR' END match_type, + fs.expire_date,fs.state_type,p.id + FROM registrations r, financing_statements fs, parties p, q + WHERE r.financing_id = fs.id + AND r.id <= :query_value1 + AND r.registration_type_cl IN ('PPSALIEN', 'MISCLIEN', 'CROWNLIEN') + AND r.base_reg_number IS NULL + AND (fs.expire_date IS NULL OR + fs.expire_date > ((TO_TIMESTAMP(:query_value2, + 'YYYY-MM-DD HH24:MI:SSTZHH') at time zone 'utc') - interval '30 days')) + AND NOT EXISTS (SELECT r3.id + FROM registrations r3 + WHERE r3.financing_id = fs.id + AND r3.registration_type_cl = 'DISCHARGE' + AND r3.registration_ts < ((TO_TIMESTAMP(:query_value2, + 'YYYY-MM-DD HH24:MI:SSTZHH') at time zone 'utc') - + interval '30 days')) + AND p.financing_id = fs.id + AND p.registration_id_end IS NULL + AND p.party_type = 'DB' + AND p.bus_name_base = search_name_base + AND p.bus_name_key_char1 = search_key_char1 + AND ((search_key <% p.business_srch_key AND + SIMILARITY(search_key, p.business_srch_key) >= :query_bus_quotient) + OR p.business_srch_key = search_key + OR word_length=1 and search_key = split_part(business_name,' ',1) + OR (LENGTH(search_key) >= 3 AND LEVENSHTEIN(search_key, p.business_srch_key) <= 1) AND + p.bus_name_key_char1 = search_key_char1 + ) +ORDER BY p.business_name ASC, r.registration_ts ASC +""" +INDIVIDUAL_NAME_QUERY = """ +SELECT * FROM (WITH q AS (SELECT(searchkey_last_name(:query_last)) AS search_last_key) + SELECT r.registration_type,r.registration_ts AS base_registration_ts, + p.last_name,p.first_name,p.middle_initial,p.id, + r.registration_number AS base_registration_num, + CASE WHEN search_last_key = p.last_name_key AND p.first_name = :query_first THEN 'EXACT' + WHEN search_last_key = p.last_name_key AND LENGTH(:query_first) = 1 AND + :query_first = p.first_name_char1 THEN 'EXACT' + WHEN search_last_key = p.last_name_key AND LENGTH(p.first_name) = 1 AND + p.first_name = LEFT(:query_first, 1) THEN 'EXACT' + WHEN search_last_key = p.last_name_key AND p.first_name_char2 IS NOT NULL AND p.first_name_char2 = '-' AND + p.first_name_char1 = LEFT(:query_first, 1) THEN 'EXACT' + WHEN search_last_key = p.last_name_key AND LENGTH(:query_first) > 1 AND SUBSTR(:query_first, 2, 1) = '-' + AND p.first_name_char1 = LEFT(:query_first, 1) THEN 'EXACT' + ELSE 'SIMILAR' END match_type, + fs.expire_date,fs.state_type, p.birth_date + FROM registrations r, financing_statements fs, parties p, q + WHERE r.financing_id = fs.id + AND r.id <= :query_value1 + AND r.registration_type_cl IN ('PPSALIEN', 'MISCLIEN', 'CROWNLIEN') + AND r.base_reg_number IS NULL + AND (fs.expire_date IS NULL OR + fs.expire_date > ((TO_TIMESTAMP(:query_value2, + 'YYYY-MM-DD HH24:MI:SSTZHH') at time zone 'utc') - interval '30 days')) + AND NOT EXISTS (SELECT r3.id + FROM registrations r3 + WHERE r3.financing_id = fs.id + AND r3.registration_type_cl = 'DISCHARGE' + AND r3.registration_ts < ((TO_TIMESTAMP(:query_value2, + 'YYYY-MM-DD HH24:MI:SSTZHH') at time zone 'utc') - + interval '30 days')) + AND p.financing_id = fs.id + AND p.registration_id_end IS NULL + AND p.party_type = 'DI' + AND p.id IN (SELECT * FROM unnest(match_individual_name(:query_last, :query_first, :query_last_quotient, + :query_first_quotient, :query_default_quotient))) + ORDER BY match_type, p.last_name ASC, p.first_name ASC, p.middle_initial ASC, p.birth_date ASC, r.registration_ts ASC +) AS q2 + WHERE q2.match_type = 'EXACT' +""" HISTORICAL_ACCOUNT_ID: str = 'HISTORICAL_SEARCH' HISTORICAL_REF_ID: str = 'HISTORICAL SEARCH' @@ -123,16 +204,21 @@ def get_search_historical_id(search_timestamp: str) -> int: def search_by_serial_type(search_query: SearchRequest, # pylint: disable=too-many-locals search_reg_id: int, search_ts: str) -> SearchRequest: - """Execute a historical search query for a serial number search type.""" - serial_num: str = search_query.search_criteria['criteria']['value'] - current_app.logger.info(f'search serial number={serial_num}') - query = text(SERIAL_NUM_QUERY) if search_query.search_type == SearchRequest.SearchTypes.SERIAL_NUM.value \ - else text(AIRCRAFT_DOT_QUERY) + """Execute a historical search query for a serial number, aircraft, or mhr number search type.""" + search_val: str = search_query.search_criteria['criteria']['value'] + current_app.logger.info(f'search criteria value={search_val}') + query_text: str = SERIAL_NUM_QUERY + if search_query.search_type == SearchRequest.SearchTypes.AIRCRAFT_AIRFRAME_DOT.value: + query_text = AIRCRAFT_DOT_QUERY + elif search_query.search_type == SearchRequest.SearchTypes.MANUFACTURED_HOME_NUM.value: + query_text = MHR_NUM_QUERY + query_text = query_text.replace('CASE WHEN serial_number', 'CASE WHEN mhr_number') + query = text(query_text) rows = None try: result = db.session.execute(query, {'query_value1': search_reg_id, 'query_value2': search_ts.replace('T', ' '), - 'query_value3': serial_num}) + 'query_value3': search_val}) rows = result.fetchall() except Exception as db_exception: # noqa: B902; return nicer error current_app.logger.error('DB search_by_serial_type exception: ' + str(db_exception)) @@ -156,7 +242,7 @@ def search_by_serial_type(search_query: SearchRequest, # pylint: disable=too-ma if value is not None: collateral['model'] = str(value) match_type = str(row[8]) - if search_query.search_type == 'MH': + if search_query.search_type == SearchRequest.SearchTypes.MANUFACTURED_HOME_NUM.value: collateral['manufacturedHomeRegistrationNumber'] = str(row[12]) result_json = { 'baseRegistrationNumber': str(row[7]), @@ -176,7 +262,110 @@ def search_by_serial_type(search_query: SearchRequest, # pylint: disable=too-ma return search_query -def search_by_registration_number(search_query: SearchRequest, # pylint: disable=too-many-locals +def search_by_business_name(search_query: SearchRequest, + search_reg_id: int, + search_ts: str) -> SearchRequest: + """Execute a debtor business name search query.""" + search_val = search_query.search_criteria['criteria']['debtorName']['business'] + current_app.logger.info(f'search criteria value={search_val}') + rows = None + query = text(BUSINESS_NAME_QUERY) + try: + result = db.session.execute(query, {'query_value1': search_reg_id, + 'query_value2': search_ts.replace('T', ' '), + 'query_bus_name': search_val.strip().upper(), + 'query_bus_quotient': + current_app.config.get('SIMILARITY_QUOTIENT_BUSINESS_NAME')}) + rows = result.fetchall() + except Exception as db_exception: # noqa: B902; return nicer error + current_app.logger.error('DB search_by_business_name exception: ' + str(db_exception)) + raise DatabaseException(db_exception) + results_json = [] + if rows is not None: + for row in rows: + registration_type = str(row[0]) + timestamp = row[1] + debtor = { + 'businessName': str(row[2]), + 'partyId': int(row[7]) + } + result_json = { + 'baseRegistrationNumber': str(row[3]), + 'matchType': str(row[4]), + 'createDateTime': model_utils.format_ts(timestamp), + 'registrationType': registration_type, + 'debtor': debtor + } + results_json.append(result_json) + search_query.returned_results_size = len(results_json) + search_query.total_results_size = search_query.returned_results_size + else: + search_query.returned_results_size = 0 + search_query.total_results_size = 0 + search_query.search_response = results_json + current_app.logger.info(f'results size={search_query.returned_results_size}') + return search_query + + +def search_by_individual_name(search_query: SearchRequest, # pylint: disable=too-many-locals; easier to follow + search_reg_id: int, + search_ts: str) -> SearchRequest: + """Execute a debtor individual name search query.""" + last_name = search_query.search_criteria['criteria']['debtorName']['last'] + first_name = search_query.search_criteria['criteria']['debtorName']['first'] + quotient_first = current_app.config.get('SIMILARITY_QUOTIENT_FIRST_NAME') + quotient_last = current_app.config.get('SIMILARITY_QUOTIENT_LAST_NAME') + quotient_default = current_app.config.get('SIMILARITY_QUOTIENT_DEFAULT') + current_app.logger.info(f'search criteria first={first_name} last={last_name}') + rows = None + query = text(INDIVIDUAL_NAME_QUERY) + try: + result = db.session.execute(query, {'query_value1': search_reg_id, + 'query_value2': search_ts.replace('T', ' '), + 'query_last': last_name.strip().upper(), + 'query_first': first_name.strip().upper(), + 'query_last_quotient': quotient_last, + 'query_first_quotient': quotient_first, + 'query_default_quotient': quotient_default}) + rows = result.fetchall() + except Exception as db_exception: # noqa: B902; return nicer error + current_app.logger.error('DB search_by_individual_name exception: ' + str(db_exception)) + raise DatabaseException(db_exception) + results_json = [] + if rows is not None: + for row in rows: + person = { + 'last': str(row[2]), + 'first': str(row[3]) + } + middle = str(row[4]) if row[4] else '' + if middle: + person['middle'] = middle + debtor = { + 'personName': person, + 'partyId': int(row[5]) + } + if row[10]: + debtor['birthDate'] = model_utils.format_ts(row[10]) + result_json = { + 'baseRegistrationNumber': str(row[6]), + 'matchType': str(row[7]), + 'createDateTime': model_utils.format_ts(row[1]), + 'registrationType': str(row[0]), + 'debtor': debtor + } + results_json.append(result_json) + search_query.returned_results_size = len(results_json) + search_query.total_results_size = search_query.returned_results_size + else: + search_query.returned_results_size = 0 + search_query.total_results_size = 0 + search_query.search_response = results_json + current_app.logger.info(f'results size={search_query.returned_results_size}') + return search_query + + +def search_by_registration_number(search_query: SearchRequest, search_reg_id: int, search_ts: str) -> SearchRequest: """Execute a historical search query for a registration number search type.""" @@ -230,15 +419,15 @@ def search(criteria: dict, search_reg_id: int) -> SearchRequest: search_query = search_by_registration_number(search_query, search_reg_id, search_ts) elif search_query.search_type == SearchRequest.SearchTypes.MANUFACTURED_HOME_NUM.value: # Format before searching - search_utils.format_mhr_number(search_query.request_json) - current_app.logger.error('Search by MHR number not implemented.') + search_utils.format_mhr_number(criteria) + search_query = search_by_serial_type(search_query, search_reg_id, search_ts) elif search_query.search_type in (SearchRequest.SearchTypes.SERIAL_NUM.value, SearchRequest.SearchTypes.AIRCRAFT_AIRFRAME_DOT.value): search_query = search_by_serial_type(search_query, search_reg_id, search_ts) elif search_query.search_type == SearchRequest.SearchTypes.BUSINESS_DEBTOR.value: - current_app.logger.error('Search by business name not implemented.') + search_query = search_by_business_name(search_query, search_reg_id, search_ts) else: - current_app.logger.error('Search by individual name not implemented.') + search_query = search_by_individual_name(search_query, search_reg_id, search_ts) search_query.save() return search_query @@ -276,7 +465,7 @@ def create_from_search_query(search_query: SearchRequest, search_reg_id: int) -> search_result.search = search_query query_results = search_query.search_response detail_results = [] - # search_result.search_response = detail_results + search_result.search_response = detail_results for result in query_results: reg_num = result['baseRegistrationNumber'] match_type = result['matchType'] diff --git a/ppr-api/tests/postman/ppr-api-unit.postman_collection.json b/ppr-api/tests/postman/ppr-api-unit.postman_collection.json index 048d2c5d7..1beb62148 100644 --- a/ppr-api/tests/postman/ppr-api-unit.postman_collection.json +++ b/ppr-api/tests/postman/ppr-api-unit.postman_collection.json @@ -3,7 +3,8 @@ "_postman_id": "4c63f6f8-012b-4dde-9d93-c7399080e884", "name": "PPR API Unit Test", "description": "Intended for unit testing of PPR API endpoints in local and develepment environments. To use with a gateway endpoint, an API key is required. A JWT is always required.\n\nThe account_id variable is required if the JWT does not have the staff role.\n", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "10405485" }, "item": [ { @@ -11,6 +12,12 @@ "item": [ { "name": "Get drafts", + "protocolProfileBehavior": { + "disabledSystemHeaders": { + "accept-encoding": true, + "accept": true + } + }, "request": { "method": "GET", "header": [ @@ -31,9 +38,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts", + "raw": "{{base_url_ppr}}/api/v1/drafts", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -70,9 +77,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts", + "raw": "{{base_url_ppr}}/api/v1/drafts", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -101,9 +108,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts", + "raw": "{{base_url_ppr}}/api/v1/drafts", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -146,9 +153,9 @@ "raw": "{\n \"type\": \"FINANCING_STATEMENT\",\n \"financingStatement\": {\n \"type\": \"SA\",\n \"clientReferenceId\": \"A-00000402\",\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"debtors\": [\n {\n \"businessName\": \"Debtor 1 Inc.\",\n \"address\": {\n \"street\": \"721 Debtor Ave\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"A1A 1A1\"\n },\n \"birthDate\": \"1990-06-15\",\n \"emailAddress\": \"dsmith@debtor1.com\"\n }\n ],\n \"vehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ],\n \"generalCollateral\": [],\n \"lifeYears\": 5,\n \"securedParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ]\n }\n}" }, "url": { - "raw": "{{base_url}}/api/v1/drafts", + "raw": "{{base_url_ppr}}/api/v1/drafts", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -182,9 +189,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034001", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034001", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -219,9 +226,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034002", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034002", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -256,9 +263,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034003", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034003", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -302,9 +309,9 @@ "raw": "{\n \"type\": \"FINANCING_STATEMENT\",\n \"financingStatement\": {\n \"type\": \"SA\",\n \"clientReferenceId\": \"A-00000402\",\n \"documentId\": \"D0034001\",\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"securedParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ],\n \"debtors\": [\n {\n \"businessName\": \"Debtor 1 Inc.\",\n \"address\": {\n \"street\": \"721 Debtor Ave\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"A1A 1A1\"\n },\n \"birthDate\": \"1990-06-15\",\n \"emailAddress\": \"dsmith@debtor1.com\"\n }\n ],\n \"vehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ],\n \"generalCollateral\": [],\n \"lifeYears\": 5\n },\n \"createDateTime\": \"2020-02-21T18:56:20Z\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034001", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034001", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -348,9 +355,9 @@ "raw": "{\n \"type\": \"AMENDMENT_STATEMENT\",\n \"amendmentStatement\": {\n \"baseRegistrationNumber\": \"023003B\",\n \"documentId\": \"D0034002\",\n \"description\": \"Amendment to correct spelling mistake in debtor name. Name changed from \\\"Brawn\\\" to \\\"Brown\\\".\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"removeDebtors\": [\n {\n \"businessName\": \"Brawn Window Cleaning Inc.\",\n \"partyId\": 1321065\n }\n ],\n \"addDebtors\": [\n {\n \"businessName\": \"Brown Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"emailAddress\": \"csmith@bwc.com\"\n }\n ]\n },\n \"createDateTime\": \"2020-02-21T18:56:20Z\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034002", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034002", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -394,9 +401,9 @@ "raw": "{\n \"type\": \"CHANGE_STATEMENT\",\n \"changeStatement\": {\n \"baseRegistrationNumber\": \"023010B\",\n \"documentId\": \"D0034003\",\n \"changeType\": \"DT\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"addDebtors\": [\n {\n \"businessName\": \"Brown Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"emailAddress\": \"csmith@bwc.com\"\n }\n ],\n \"deleteDebtors\": [\n {\n \"businessName\": \"Brawn Window Cleaning Inc.\",\n \"partyId\": 1321065\n }\n ]\n },\n \"createDateTime\": \"2020-02-21T18:56:20Z\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034003", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034003", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -426,9 +433,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/drafts/D0034001", + "raw": "{{base_url_ppr}}/api/v1/drafts/D0034001", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -444,10 +451,10 @@ ] }, { - "name": "financing-statements", + "name": "account registrations", "item": [ { - "name": "List Account Financing Statements", + "name": "UI List Account Registrations Default", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -471,8 +478,8 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { @@ -480,29 +487,33 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements?debtorName=My Company Inc", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?fromUI=true&pageNumber=1", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "financing-statements" + "financing-statements", + "registrations" ], "query": [ { - "key": "debtorName", - "value": "My Company Inc", - "description": "Debtor business name" + "key": "fromUI", + "value": "true" + }, + { + "key": "pageNumber", + "value": "1" } ] }, - "description": "List the Financing Statements previously created with the account ID." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "List Account Registrations", + "name": "UI List Account Registrations Sort", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -535,15 +546,33 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/registrations", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?fromUI=true&pageNumber=1&sortCriteriaName=startDateTime&sortDirection=desc", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", "registrations" + ], + "query": [ + { + "key": "fromUI", + "value": "true" + }, + { + "key": "pageNumber", + "value": "1" + }, + { + "key": "sortCriteriaName", + "value": "startDateTime" + }, + { + "key": "sortDirection", + "value": "desc" + } ] }, "description": "Get the list of recent registrations created with the account ID." @@ -551,7 +580,7 @@ "response": [] }, { - "name": "Retrieve an Account Financing Statement", + "name": "UI List Account Registrations Sort, Reg Number", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -575,8 +604,8 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { @@ -584,23 +613,45 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023000B", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?fromUI=true&pageNumber=1&sortCriteriaName=startDateTime&sortDirection=asc®istrationNumber=3020005", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023000B" + "registrations" + ], + "query": [ + { + "key": "fromUI", + "value": "true" + }, + { + "key": "pageNumber", + "value": "1" + }, + { + "key": "sortCriteriaName", + "value": "startDateTime" + }, + { + "key": "sortDirection", + "value": "asc" + }, + { + "key": "registrationNumber", + "value": "3020005" + } ] }, - "description": "Retrieve by registration number a Financing Statement previously created with the account ID." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Retrieve an Account Renewal Statement", + "name": "UI List Account Registrations Date Range", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -633,25 +684,41 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/TEST0002/renewals/TEST00R6", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?fromUI=true&pageNumber=1&startDateTime=2022-02-28T00:00:00-08:00&endDateTime=2022-03-05T00:00:00-08:00", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "TEST0002", - "renewals", - "TEST00R6" + "registrations" + ], + "query": [ + { + "key": "fromUI", + "value": "true" + }, + { + "key": "pageNumber", + "value": "1" + }, + { + "key": "startDateTime", + "value": "2022-02-28T00:00:00-08:00" + }, + { + "key": "endDateTime", + "value": "2022-03-05T00:00:00-08:00" + } ] }, - "description": "Retrieve by registration number a Renewal Statement previously created with the account ID." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Retrieve an Account Amendment Statement", + "name": "UI List Account Registrations Client Reference", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -684,25 +751,37 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/TEST0001/amendments/TEST0007", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?fromUI=true&pageNumber=1&clientReferenceId=T-API-DL-017", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "TEST0001", - "amendments", - "TEST0007" + "registrations" + ], + "query": [ + { + "key": "fromUI", + "value": "true" + }, + { + "key": "pageNumber", + "value": "1" + }, + { + "key": "clientReferenceId", + "value": "T-API-DL-017" + } ] }, - "description": "Retrieve by registration number an Amendment Statement previously created with the account ID." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Retrieve an Account Change Statement", + "name": "API List Account Registrations Default Collapse", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -735,25 +814,29 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/TEST0001/changes/TEST0010", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?collapse=true", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "TEST0001", - "changes", - "TEST0010" + "registrations" + ], + "query": [ + { + "key": "collapse", + "value": "true" + } ] }, - "description": "Retrieve by registration number a Change Statement previously created with the account ID." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Retrieve an Account Discharge Statement", + "name": "API List Account Registrations Client Reference", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -786,27 +869,34 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/TEST0014/discharges/TEST0D14", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?clientReferenceId=T-API-DL-017", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "TEST0014", - "discharges", - "TEST0D14" + "registrations" + ], + "query": [ + { + "key": "clientReferenceId", + "value": "T-API-DL-017" + } ] }, - "description": "Retrieve by registration number a Discharge Statement previously created with the account ID." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Register a Financing Statement", + "name": "API List Account Registrations Reg Number", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -825,33 +915,43 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { "mode": "raw", - "raw": "{\n \"type\": \"SA\",\n \"clientReferenceId\": \"A-00000402\",\n \"documentId\": \"D0034001\",\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"securedParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ],\n \"debtors\": [\n {\n \"businessName\": \"Debtor 1 Inc.\",\n \"address\": {\n \"street\": \"721 Debtor Ave\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"A1A 1A1\"\n },\n \"birthDate\": \"1990-06-15\",\n \"emailAddress\": \"dsmith@debtor1.com\"\n }\n ],\n \"vehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ],\n \"generalCollateral\": [\n {\n \"description\": \"ALL THE DEBTOR'S PRESENT AND AFTER ACQUIRED PERSONAL PROPERTY,INCLUDING BUT NOT RESTRICTED TO MACHINERY, EQUIPMENT, FURNITURE,FIXTURES, INVENTORY AND RECEIVABLES.\",\n \"addedDateTime\": \"2020-02-21T18:38:20Z\"\n }\n ],\n \"lifeYears\": 5,\n \"trustIndenture\": false\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?registrationNumber=3020005", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "financing-statements" + "financing-statements", + "registrations" + ], + "query": [ + { + "key": "registrationNumber", + "value": "3020005" + } ] }, - "description": "Create a Financing Statement example: register security agreement." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Register an Amendment Statement (court order)", + "name": "API List Account Registrations Date Range", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -870,35 +970,47 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023001B\",\n \"description\": \"Court Order debtor removal.\",\n \"changeType\": \"CO\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"courtOrderInformation\": {\n \"courtName\": \"Supreme Court of British Columbia.\",\n \"courtRegistry\": \"KAMLOOPS\",\n \"fileNumber\": \"BC123445\",\n \"orderDate\": \"2020-02-02\",\n \"effectOfOrder\": \"Court Order to remove James Smith as debtor.\"\n },\n \"deleteDebtors\": [\n {\n \"personName\": {\n \"first\": \"James\",\n \"last\": \"Smith\"\n },\n \"partyId\": 1321067\n }\n ]\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023001B/amendments", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/registrations?startDateTime=2022-02-28T00:00:00-08:00&endDateTime=2022-03-05T00:00:00-08:00", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023001B", - "amendments" + "registrations" + ], + "query": [ + { + "key": "startDateTime", + "value": "2022-02-28T00:00:00-08:00" + }, + { + "key": "endDateTime", + "value": "2022-03-05T00:00:00-08:00" + } ] }, - "description": "Create an amendment to a Financing Statement example: register a court order Amendment Statement." + "description": "Get the list of recent registrations created with the account ID." }, "response": [] }, { - "name": "Register an Amendment Statement Secured Parties", + "name": "List Account Financing Statements", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -923,29 +1035,42 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023002B\",\n \"description\": \"Correct secured party address.\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"deleteSecuredParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3720 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"partyId\": 1321095\n }\n ],\n \"addSecuredParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ]\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023002B/amendments", + "raw": "{{base_url_ppr}}/api/v1/financing-statements?debtorName=My Company Inc", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "financing-statements", - "023002B", - "amendments" + "financing-statements" + ], + "query": [ + { + "key": "debtorName", + "value": "My Company Inc", + "description": "Debtor business name" + } ] }, - "description": "Create an amendment to a Financing Statement to correct the Secured Parties example: delete 1 secured party and add 1 secured party." + "description": "List the Financing Statements previously created with the account ID." }, "response": [] - }, + } + ] + }, + { + "name": "financing-statements", + "item": [ { - "name": "Register an Amendment Statement Debtors", + "name": "Retrieve an Account Financing Statement", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -970,29 +1095,31 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023003B\",\n \"description\": \"Correct debtor name.\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteDebtors\": [\n {\n \"businessName\": \"Brawn Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"partyId\": 1321961\n }\n ],\n \"addDebtors\": [\n {\n \"businessName\": \"Brown Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"emailAddress\": \"csmith@bwc.com\"\n }\n ]\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023003B/amendments", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023000B", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023003B", - "amendments" + "023000B" ] }, - "description": "Create an amendment to a Financing Statement to correct the Debtors example: delete 1 debtor and add 1 debtor." + "description": "Retrieve by registration number a Financing Statement previously created with the account ID." }, "response": [] }, { - "name": "Register an Amendment Statement Vehicles", + "name": "Retrieve an Account Financing Statement Current", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -1011,35 +1138,43 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023004B\",\n \"description\": \"Correct vehicle VIN.\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KNADM5A39E6904135\",\n \"year\": 2014,\n \"make\": \"KIA\",\n \"model\": \"RIO\",\n \"vehicleId\": 974124\n }\n ],\n \"addVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ]\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023004B/amendments", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/TEST0001?current=true", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023004B", - "amendments" + "TEST0001" + ], + "query": [ + { + "key": "current", + "value": "true" + } ] }, - "description": "Create an amendment to a Financing Statement to correct the Vehicle Collateral example: delete 1 vehicle and add 1 vehicle." + "description": "Retrieve by registration number the current information on a Financing Statement previously created with the account ID." }, "response": [] }, { - "name": "Register a Change Statement Transfer Debtor", + "name": "Retrieve an Account Renewal Statement", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -1058,35 +1193,39 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023010B\",\n \"documentId\": \"D0034004\",\n \"changeType\": \"DT\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"deleteDebtors\": [\n {\n \"businessName\": \"Brawn Window Cleaning Inc.\",\n \"partyId\": 1321065\n }\n ],\n \"addDebtors\": [\n {\n \"businessName\": \"Brown Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"emailAddress\": \"csmith@bwc.com\"\n }\n ]\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023010B/changes", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/TEST0002/renewals/TEST00R6", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023010B", - "changes" + "TEST0002", + "renewals", + "TEST00R6" ] }, - "description": "Change a Financing Statement example: register a Change Statement to update debtor information." + "description": "Retrieve by registration number a Renewal Statement previously created with the account ID." }, "response": [] }, { - "name": "Register a Change Statement Transfer Secured Party", + "name": "Retrieve an Account Amendment Statement", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -1105,35 +1244,192 @@ }, { "key": "Authorization", - "value": "Bearer {{jwt}}", - "type": "text" + "type": "text", + "value": "Bearer {{jwt}}" } ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023011B\",\n \"changeType\": \"ST\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteSecuredParties\": [\n {\n \"businessName\": \"Secured 1 Ltd\",\n \"address\": {\n \"street\": \"721 Pandora Ave\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 1V2\",\n \"partyId\": 1321061\n }\n }\n ],\n \"addSecuredParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ]\n}" + "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023011B/changes", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/TEST0001/amendments/TEST0007", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023011B", - "changes" + "TEST0001", + "amendments", + "TEST0007" ] }, - "description": "Change a Financing Statement example: register a Change Statement to transfer a secured party. Remove 1 secured party and add 1 secured party." + "description": "Retrieve by registration number an Amendment Statement previously created with the account ID." }, "response": [] }, { - "name": "Register a Change Statement Debtor Release", + "name": "Retrieve an Account Amendment Statement Report", + "protocolProfileBehavior": { + "disableBodyPruning": true, + "disabledSystemHeaders": { + "accept": true + } + }, "request": { - "method": "POST", + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/pdf" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{base_url_dev}}/api/v1/financing-statements/502410N/amendments/502423N", + "host": [ + "{{base_url_dev}}" + ], + "path": [ + "api", + "v1", + "financing-statements", + "502410N", + "amendments", + "502423N" + ] + }, + "description": "Retrieve by registration number an Amendment Statement previously created with the account ID." + }, + "response": [] + }, + { + "name": "Retrieve an Account Change Statement", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{base_url_ppr}}/api/v1/financing-statements/TEST0001/changes/TEST0010", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "financing-statements", + "TEST0001", + "changes", + "TEST0010" + ] + }, + "description": "Retrieve by registration number a Change Statement previously created with the account ID." + }, + "response": [] + }, + { + "name": "Retrieve an Account Discharge Statement", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{base_url_ppr}}/api/v1/financing-statements/TEST0014/discharges/TEST0D14", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "financing-statements", + "TEST0014", + "discharges", + "TEST0D14" + ] + }, + "description": "Retrieve by registration number a Discharge Statement previously created with the account ID." + }, + "response": [] + }, + { + "name": "Register a Financing Statement", + "request": { + "method": "POST", "header": [ { "key": "Accept", @@ -1158,27 +1454,72 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023012B\",\n \"changeType\": \"DR\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteDebtors\": [\n {\n \"businessName\": \"Debtor Enterprises LTD.\",\n \"partyId\": 1321065\n }\n ]\n}" + "raw": "{\n \"type\": \"SA\",\n \"clientReferenceId\": \"A-00000402\",\n \"authorizationReceived\": true,\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"securedParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ],\n \"debtors\": [\n {\n \"businessName\": \"Debtor 1 Inc.\",\n \"address\": {\n \"street\": \"721 Debtor Ave\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"A1A 1A1\"\n },\n \"birthDate\": \"1990-06-15\",\n \"emailAddress\": \"dsmith@debtor1.com\"\n }\n ],\n \"vehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ],\n \"generalCollateral\": [\n {\n \"description\": \"ALL THE DEBTOR'S PRESENT AND AFTER ACQUIRED PERSONAL PROPERTY,INCLUDING BUT NOT RESTRICTED TO MACHINERY, EQUIPMENT, FURNITURE,FIXTURES, INVENTORY AND RECEIVABLES.\",\n \"addedDateTime\": \"2020-02-21T18:38:20Z\"\n }\n ],\n \"lifeYears\": 5,\n \"trustIndenture\": false\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023012B/changes", + "raw": "{{base_url_ppr}}/api/v1/financing-statements", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "financing-statements" + ] + }, + "description": "Create a Financing Statement example: register security agreement." + }, + "response": [] + }, + { + "name": "Register an Amendment Statement (court order)", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{jwt}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"baseRegistrationNumber\": \"023001B\",\n \"authorizationReceived\": true,\n \"description\": \"Court Order debtor removal.\",\n \"changeType\": \"CO\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"courtOrderInformation\": {\n \"courtName\": \"Supreme Court of British Columbia.\",\n \"courtRegistry\": \"KAMLOOPS\",\n \"fileNumber\": \"BC123445\",\n \"orderDate\": \"2020-02-02\",\n \"effectOfOrder\": \"Court Order to remove James Smith as debtor.\"\n },\n \"deleteDebtors\": [\n {\n \"personName\": {\n \"first\": \"James\",\n \"last\": \"Smith\"\n },\n \"partyId\": 1321067\n }\n ]\n}" + }, + "url": { + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023001B/amendments", + "host": [ + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023012B", - "changes" + "023001B", + "amendments" ] }, - "description": "Change a Financing Statement example: register a Change Statement to release 1 debtor." + "description": "Create an amendment to a Financing Statement example: register a court order Amendment Statement." }, "response": [] }, { - "name": "Register a Change Statement Add Collateral", + "name": "Register an Amendment Statement Secured Parties", "request": { "method": "POST", "header": [ @@ -1205,27 +1546,27 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023013B\",\n \"changeType\": \"AC\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"addVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"RDBKK21F81F944350\",\n \"year\": 2018,\n \"make\": \"Honda\",\n \"model\": \"Civic\"\n }\n ]\n}" + "raw": "{\n \"baseRegistrationNumber\": \"023002B\",\n \"authorizationReceived\": true,\n \"description\": \"Correct secured party address.\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n },\n \"deleteSecuredParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3720 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"partyId\": 1321095\n }\n ],\n \"addSecuredParties\": [\n {\n \"businessName\": \"BANK OF BRITISH COLUMBIA\",\n \"address\": {\n \"street\": \"3721 BEACON AVENUE\",\n \"city\": \"SIDNEY\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V7R 1R7\"\n },\n \"emailAddress\": \"asmith@bobc.com\"\n }\n ]\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023013B/changes", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023002B/amendments", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023013B", - "changes" + "023002B", + "amendments" ] }, - "description": "Change a Financing Statement example: register a Change Statement to add 1 vehicle as collateral." + "description": "Create an amendment to a Financing Statement to correct the Secured Parties example: delete 1 secured party and add 1 secured party." }, "response": [] }, { - "name": "Register a Change Statement Substitute Collateral", + "name": "Register an Amendment Statement Debtors", "request": { "method": "POST", "header": [ @@ -1252,27 +1593,27 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023014B\",\n \"changeType\": \"SU\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"2D4FV47V66H472408\",\n \"year\": 2016,\n \"make\": \"DODGE\",\n \"model\": \"MAGNUM\",\n \"vehicleId\": 974567\n }\n ],\n \"addVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ]\n}" + "raw": "{\n \"baseRegistrationNumber\": \"023003B\",\n \"authorizationReceived\": true,\n \"description\": \"Correct debtor name.\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteDebtors\": [\n {\n \"businessName\": \"Brawn Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"partyId\": 1321961\n }\n ],\n \"addDebtors\": [\n {\n \"businessName\": \"Brown Window Cleaning Inc.\",\n \"address\": {\n \"street\": \"1234 Blanshard St\",\n \"city\": \"Victoria\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8S 3J5\"\n },\n \"emailAddress\": \"csmith@bwc.com\"\n }\n ]\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023014B/changes", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023003B/amendments", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023014B", - "changes" + "023003B", + "amendments" ] }, - "description": "Change a Financing Statement example: register a Change Statement to subsitute collateral. Delete 1 vehicle and add 1 vehicle." + "description": "Create an amendment to a Financing Statement to correct the Debtors example: delete 1 debtor and add 1 debtor." }, "response": [] }, { - "name": "Register a Change Statement Partial Discharge", + "name": "Register an Amendment Statement Vehicles", "request": { "method": "POST", "header": [ @@ -1299,22 +1640,22 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023015B\",\n \"changeType\": \"PD\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteGeneralCollateral\": [\n {\n \"description\": \"1985 white Fender Stratocaster Guitar #1234\",\n \"collateralId\": 125000\n }\n ]\n}" + "raw": "{\n \"baseRegistrationNumber\": \"023004B\",\n \"authorizationReceived\": true,\n \"description\": \"Correct vehicle VIN.\",\n \"changeType\": \"AM\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"deleteVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KNADM5A39E6904135\",\n \"year\": 2014,\n \"make\": \"KIA\",\n \"model\": \"RIO\",\n \"vehicleId\": 974124\n }\n ],\n \"addVehicleCollateral\": [\n {\n \"type\": \"MV\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"year\": 2018,\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\"\n }\n ]\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023015B/changes", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023004B/amendments", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", "financing-statements", - "023015B", - "changes" + "023004B", + "amendments" ] }, - "description": "Change a Financing Statement example: register a Change Statement for a partial discharge. Delete 1 general collateral item." + "description": "Create an amendment to a Financing Statement to correct the Vehicle Collateral example: delete 1 vehicle and add 1 vehicle." }, "response": [] }, @@ -1346,12 +1687,12 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023001B\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"expiryDate\": \"2025-12-21\"\n}" + "raw": "{\n \"baseRegistrationNumber\": \"023001B\",\n \"authorizationReceived\": true,\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"lifeYears\": 5\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023001B/renewals", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023001B/renewals", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1393,12 +1734,12 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023020B\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"code\": \"3000001\"\n },\n \"courtOrderInformation\": {\n \"courtName\": \"Supreme Court of British Columbia.\",\n \"courtRegistry\": \"VICTORIA\",\n \"fileNumber\": \"BC123495\",\n \"orderDate\": \"2020-05-22\",\n \"effectOfOrder\": \"Court Order to renew Repairer's Lien.\"\n }\n}" + "raw": "{\n \"baseRegistrationNumber\": \"023020B\",\n \"clientReferenceId\": \"A-00000402\",\n \"authorizationReceived\": true,\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8W 2V8\"\n },\n \"courtOrderInformation\": {\n \"courtName\": \"Supreme Court of British Columbia.\",\n \"courtRegistry\": \"VICTORIA\",\n \"fileNumber\": \"BC123495\",\n \"orderDate\": \"2022-03-10\",\n \"effectOfOrder\": \"Court Order to renew Repairer's Lien.\"\n }\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023020B/renewals?", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023020B/renewals?", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1446,12 +1787,12 @@ ], "body": { "mode": "raw", - "raw": "{\n \"baseRegistrationNumber\": \"023001B\",\n \"clientReferenceId\": \"A-00000402\",\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8V 4V6\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n }\n}" + "raw": "{\n \"baseRegistrationNumber\": \"023001B\",\n \"clientReferenceId\": \"A-00000402\",\n \"authorizationReceived\": true,\n \"baseDebtor\": {\n \"businessName\": \"DEBTOR 1 INC.\"\n },\n \"registeringParty\": {\n \"businessName\": \"ABC SEARCHING COMPANY\",\n \"address\": {\n \"street\": \"222 SUMMER STREET\",\n \"city\": \"VICTORIA\",\n \"region\": \"BC\",\n \"country\": \"CA\",\n \"postalCode\": \"V8V 4V6\"\n },\n \"emailAddress\": \"bsmith@abc-search.com\"\n }\n}" }, "url": { - "raw": "{{base_url}}/api/v1/financing-statements/023001B/discharges", + "raw": "{{base_url_ppr}}/api/v1/financing-statements/023001B/discharges", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1492,9 +1833,9 @@ } ], "url": { - "raw": "{{base_url}}/api/v1/party-codes/3000001", + "raw": "{{base_url_ppr}}/api/v1/party-codes/3000001", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1520,7 +1861,306 @@ { "key": "Account-Id", "type": "text", - "value": "{{account_id}}" + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/party-codes/head-offices/9999", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "party-codes", + "head-offices", + "9999" + ] + }, + "description": "Get party codes belonging to a head office searching by head office code." + }, + "response": [] + }, + { + "name": "Get head office party codes no results", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/party-codes/head-offices/9998", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "party-codes", + "head-offices", + "9998" + ] + }, + "description": "Get party codes belonging to a head office searching by head office code that does not exist, returning no results." + }, + "response": [] + }, + { + "name": "Get head office party codes by name", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/party-codes/head-offices/rbc%20royal%20bank", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "party-codes", + "head-offices", + "rbc%20royal%20bank" + ] + }, + "description": "Get party codes belonging to a head office searching by head office name (exact match, case insensitive)." + }, + "response": [] + }, + { + "name": "Get head office party codes by fuzzy name", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/party-codes/head-offices/rbc?fuzzyNameSearch=true", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "party-codes", + "head-offices", + "rbc" + ], + "query": [ + { + "key": "fuzzyNameSearch", + "value": "true" + } + ] + }, + "description": "Get party codes belonging to a head office searching by head office name (starts with, case insensitive)." + }, + "response": [] + } + ] + }, + { + "name": "user-profile", + "item": [ + { + "name": "Get user profile", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/user-profile", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "user-profile" + ] + }, + "description": "Get user profile based on the request JWT example." + }, + "response": [] + }, + { + "name": "Update user profile", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"defaultDropDowns\": true,\n \"defaultTableFilters\": true,\n \"paymentConfirmationDialog\": false,\n \"selectConfirmationDialog\": false\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/api/v1/user-profile", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "v1", + "user-profile" + ] + }, + "description": "Update user profile UI preferences for a user identified by the JWT example." + }, + "response": [] + }, + { + "name": "Update user registrations table", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"registrationsTable\": {\n \"showColumn4\": false,\n \"showColumn5\": false,\n \"showColumn6\": false,\n \"showColumn1\": true,\n \"showColumn2\": true,\n \"showColumn3\": true\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}/api/v1/user-profile", + "host": [ + "{{base_url}}" + ], + "path": [ + "api", + "v1", + "user-profile" + ] + }, + "description": "Example of updating a user profile UI registrations table preferences for a user identified by the JWT." + }, + "response": [] + } + ] + }, + { + "name": "historical searches", + "item": [ + { + "name": "Search by Registration Number", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" }, { "key": "Authorization", @@ -1528,27 +2168,29 @@ "value": "Bearer {{jwt}}" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"type\": \"REGISTRATION_NUMBER\",\n\t\"criteria\": {\n\t\t\"value\": \"955820M\"\n\t},\n\t\"clientReferenceId\": \"HISTORICAL SEARCH\",\n\t\"accountName\": \"UT HIST SEARCH\",\n\t\"searchDateTime\": \"2022-05-16T06:59:59+00:00\"\n}\n" + }, "url": { - "raw": "{{base_url}}/api/v1/party-codes/head-offices/9999", + "raw": "{{base_url_ppr}}/api/v1/historical-searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "party-codes", - "head-offices", - "9999" + "historical-searches" ] }, - "description": "Get party codes belonging to a head office searching by head office code." + "description": "Search step 1 submit a query example: search by a registration number for a financing statement that expired more than 30 days in the past." }, "response": [] }, { - "name": "Get head office party codes no results", + "name": "Search by Serial Number", "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", @@ -1560,33 +2202,40 @@ "type": "text", "value": "{{account_id}}" }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, { "key": "Authorization", "type": "text", "value": "Bearer {{jwt}}" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"type\": \"SERIAL_NUMBER\",\n\t\"criteria\": {\n\t\t\"value\": \"313-000-A-010099AB\"\n\t},\n\t\"clientReferenceId\": \"HISTORICAL SEARCH\",\n\t\"accountName\": \"UT HIST SEARCH\",\n\t\"searchDateTime\": \"2022-05-16T06:59:59+00:00\"\n}\n" + }, "url": { - "raw": "{{base_url}}/api/v1/party-codes/head-offices/9998", + "raw": "{{base_url_ppr}}/api/v1/historical-searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "party-codes", - "head-offices", - "9998" + "historical-searches" ] }, - "description": "Get party codes belonging to a head office searching by head office code that does not exist, returning no results." + "description": "Search step 1 submit a query example: search by serial number with multiple exact match results." }, "response": [] }, { - "name": "Get head office party codes by name", + "name": "Search by MHR Number", "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", @@ -1599,32 +2248,39 @@ "value": "{{account_id}}" }, { - "key": "Authorization", + "key": "Content-Type", "type": "text", - "value": "Bearer {{jwt}}" + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{jwt}}", + "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"type\": \"MHR_NUMBER\",\n\t\"criteria\": {\n\t\t\"value\": \"106284\"\n\t},\n\t\"clientReferenceId\": \"HISTORICAL SEARCH\",\n\t\"accountName\": \"UT HIST SEARCH\",\n\t\"searchDateTime\": \"2022-01-01T07:59:59+00:00\"\n}\n" + }, "url": { - "raw": "{{base_url}}/api/v1/party-codes/head-offices/rbc%20royal%20bank", + "raw": "{{base_url_ppr}}/api/v1/historical-searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "party-codes", - "head-offices", - "rbc%20royal%20bank" + "historical-searches" ] }, - "description": "Get party codes belonging to a head office searching by head office name (exact match, case insensitive)." + "description": "Search step 1 submit a query example: search by manufactured home registration number." }, "response": [] }, { - "name": "Get head office party codes by fuzzy name", + "name": "Search by Aircraft DOT", "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", @@ -1637,43 +2293,39 @@ "value": "{{account_id}}" }, { - "key": "Authorization", + "key": "Content-Type", "type": "text", - "value": "Bearer {{jwt}}" + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{jwt}}", + "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"type\": \"AIRCRAFT_DOT\",\n\t\"criteria\": {\n\t\t\"value\": \"BB2007\"\n\t},\n\t\"clientReferenceId\": \"HISTORICAL SEARCH\",\n\t\"accountName\": \"UT HIST SEARCH\",\n\t\"searchDateTime\": \"2022-01-16T07:59:59+00:00\"\n}\n" + }, "url": { - "raw": "{{base_url}}/api/v1/party-codes/head-offices/rbc?fuzzyNameSearch=true", + "raw": "{{base_url_ppr}}/api/v1/historical-searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "party-codes", - "head-offices", - "rbc" - ], - "query": [ - { - "key": "fuzzyNameSearch", - "value": "true" - } + "historical-searches" ] }, - "description": "Get party codes belonging to a head office searching by head office name (starts with, case insensitive)." + "description": "Search step 1 submit a query example: search by aircraft DOT with an AC serial type result." }, "response": [] - } - ] - }, - { - "name": "user-profile", - "item": [ + }, { - "name": "Get user profile", + "name": "Search by Debtor Business Name", "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", @@ -1685,31 +2337,40 @@ "type": "text", "value": "{{account_id}}" }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, { "key": "Authorization", "type": "text", "value": "Bearer {{jwt}}" } ], + "body": { + "mode": "raw", + "raw": "{\n \"type\": \"BUSINESS_DEBTOR\",\n \"criteria\": {\n\t \"debtorName\": {\n\t \"business\": \"0996357 B.C. LTD.\"\n\t }\n\t},\n\t\"clientReferenceId\": \"HISTORICAL SEARCH\",\n\t\"accountName\": \"UT HIST SEARCH\",\n\t\"searchDateTime\": \"2022-05-16T06:59:59+00:00\"\n}\n" + }, "url": { - "raw": "{{base_url}}/api/v1/user-profile", + "raw": "{{base_url_ppr}}/api/v1/historical-searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "user-profile" + "historical-searches" ] }, - "description": "Get user profile based on the request JWT example." + "description": "Search step 1 submit a query example: search by debtor business name for a financing statement that was discharged more than 30 days in the past." }, "response": [] }, { - "name": "Update user profile", + "name": "Search by Debtor Individual Name", "request": { - "method": "PATCH", + "method": "POST", "header": [ { "key": "Accept", @@ -1722,35 +2383,56 @@ "value": "{{account_id}}" }, { - "key": "Authorization", + "key": "Content-Type", "type": "text", - "value": "Bearer {{jwt}}" + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{jwt}}", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"defaultDropDowns\": true,\n \"defaultTableFilters\": true,\n \"paymentConfirmationDialog\": false,\n \"selectConfirmationDialog\": false\n}", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\n \"type\": \"INDIVIDUAL_DEBTOR\",\n \"criteria\": {\n \"debtorName\": {\n \"last\": \"BITTNER\",\n \"first\": \"GAIL\"\n }\n },\n\t\"clientReferenceId\": \"HISTORICAL SEARCH\",\n\t\"accountName\": \"UT HIST SEARCH\",\n\t\"searchDateTime\": \"2021-12-16T07:59:59+00:00\"\n}\n" }, "url": { - "raw": "{{base_url}}/api/v1/user-profile", + "raw": "{{base_url_ppr}}/api/v1/historical-searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", "v1", - "user-profile" + "historical-searches" ] }, - "description": "Update user profile UI preferences for a user identified by the JWT example." + "description": "Search step 1 submit a query example: search by debtor individual name." }, "response": [] } + ], + "description": "Search step 1 submit search query.", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } ] }, { @@ -1787,9 +2469,9 @@ "raw": "{\n \"type\": \"REGISTRATION_NUMBER\",\n \"criteria\": {\n \"value\": \"TEST0001\"\n },\n \"clientReferenceId\": \"PT-SQ-RG-1\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1832,9 +2514,9 @@ "raw": "{\n \"type\": \"REGISTRATION_NUMBER\",\n \"criteria\": {\n \"value\": \"TEST0008\"\n },\n \"clientReferenceId\": \"PT-SQ-RG-2\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1877,9 +2559,9 @@ "raw": "{\n \"type\": \"REGISTRATION_NUMBER\",\n \"criteria\": {\n \"value\": \"TEST0007\"\n },\n \"clientReferenceId\": \"PT-SQ-RG-3\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1922,9 +2604,9 @@ "raw": "{\n \"type\": \"REGISTRATION_NUMBER\",\n \"criteria\": {\n \"value\": \"TESTXXXXX\"\n },\n \"clientReferenceId\": \"PT-SQ-RG-4\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -1967,9 +2649,9 @@ "raw": "{\n \"type\": \"REGISTRATION_NUMBER\",\n \"criteria\": {\n \"value\": \"TEST0013\"\n },\n \"clientReferenceId\": \"PT-SQ-RG-5\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2012,9 +2694,9 @@ "raw": "{\n \"type\": \"REGISTRATION_NUMBER\",\n \"criteria\": {\n \"value\": \"TEST0014\"\n },\n \"clientReferenceId\": \"PT-SQ-RG-6\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2057,9 +2739,9 @@ "raw": "{\n \"type\": \"SERIAL_NUMBER\",\n \"criteria\": {\n \"value\": \"KM8J3CA46JU622994\"\n },\n \"clientReferenceId\": \"PT-SQ-SS-1\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2102,9 +2784,9 @@ "raw": "{\n \"type\": \"SERIAL_NUMBER\",\n \"criteria\": {\n \"value\": \"KX8J3CA46JU622994\"\n },\n \"clientReferenceId\": \"PT-SQ-SS-2\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2147,9 +2829,9 @@ "raw": "[\n {\n \"baseRegistrationNumber\": \"TEST0002\",\n \"createDateTime\": \"2021-03-12T01:48:53+00:00\",\n \"matchType\": \"EXACT\",\n \"registrationType\": \"RL\",\n \"vehicleCollateral\": {\n \"make\": \"HYUNDAI\",\n \"model\": \"TUSCON\",\n \"serialNumber\": \"KX8J3CA46JU622994\",\n \"type\": \"MV\",\n \"year\": 2014\n }\n },\n {\n \"baseRegistrationNumber\": \"TEST0003\",\n \"createDateTime\": \"2021-03-12T01:48:53+00:00\",\n \"matchType\": \"EXACT\",\n \"registrationType\": \"RL\",\n \"vehicleCollateral\": {\n \"make\": \"HYUNDAI\",\n \"model\": \"TUSCON\",\n \"serialNumber\": \"KX8J3CA46JU622994\",\n \"type\": \"MV\",\n \"year\": 2014\n }\n },\n {\n \"baseRegistrationNumber\": \"TEST0004\",\n \"createDateTime\": \"2021-03-12T01:48:53+00:00\",\n \"matchType\": \"SIMILAR\",\n \"registrationType\": \"SA\",\n \"vehicleCollateral\": {\n \"make\": \"HONDA\",\n \"model\": \"CIVIC\",\n \"serialNumber\": \"JU622994\",\n \"type\": \"MV\",\n \"year\": 2018\n }\n },\n {\n \"baseRegistrationNumber\": \"TEST0001\",\n \"createDateTime\": \"2021-03-12T01:48:53+00:00\",\n \"matchType\": \"SIMILAR\",\n \"registrationType\": \"SA\",\n \"vehicleCollateral\": {\n \"make\": \"BMW\",\n \"model\": \"Z4\",\n \"serialNumber\": \"JU622994\",\n \"type\": \"MV\",\n \"year\": 2014\n }\n },\n {\n \"baseRegistrationNumber\": \"200519B\",\n \"createDateTime\": \"2021-03-09T22:45:22+00:00\",\n \"matchType\": \"SIMILAR\",\n \"registrationType\": \"SA\",\n \"selected\": false,\n \"vehicleCollateral\": {\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"type\": \"MV\",\n \"year\": 2018\n }\n },\n {\n \"baseRegistrationNumber\": \"TEST0001\",\n \"createDateTime\": \"2021-03-12T01:48:53+00:00\",\n \"matchType\": \"SIMILAR\",\n \"registrationType\": \"SA\",\n \"selected\": false,\n \"vehicleCollateral\": {\n \"make\": \"HYUNDAI\",\n \"model\": \"TUSCON\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"type\": \"MV\",\n \"year\": 2018\n }\n },\n {\n \"baseRegistrationNumber\": \"200520B\",\n \"createDateTime\": \"2021-03-09T22:59:10+00:00\",\n \"matchType\": \"SIMILAR\",\n \"selected\": false,\n \"registrationType\": \"SA\",\n \"vehicleCollateral\": {\n \"make\": \"HYUNDAI\",\n \"model\": \"TUCSON\",\n \"serialNumber\": \"KM8J3CA46JU622994\",\n \"type\": \"MV\",\n \"year\": 2018\n }\n },\n {\n \"baseRegistrationNumber\": \"TEST0005\",\n \"createDateTime\": \"2021-03-12T01:48:54+00:00\",\n \"matchType\": \"SIMILAR\",\n \"registrationType\": \"SA\",\n \"selected\": true,\n \"vehicleCollateral\": {\n \"make\": \"TESLA\",\n \"model\": \"MODEL 3\",\n \"serialNumber\": \"YJ46JU622994\",\n \"type\": \"MV\",\n \"year\": 2018\n }\n }\n]" }, "url": { - "raw": "{{base_url}}/api/v1/searches/1047", + "raw": "{{base_url_ppr}}/api/v1/searches/1047", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2193,9 +2875,9 @@ "raw": "{\n \"type\": \"SERIAL_NUMBER\",\n \"criteria\": {\n \"value\": \"VIN000000\"\n },\n \"clientReferenceId\": \"PT-SQ-SS-3\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2238,9 +2920,9 @@ "raw": "{\n \"type\": \"SERIAL_NUMBER\",\n \"criteria\": {\n \"value\": \"XXXXX999999\"\n },\n \"clientReferenceId\": \"PT-SQ-SS-4\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2283,9 +2965,9 @@ "raw": "{\n \"type\": \"SERIAL_NUMBER\",\n \"criteria\": {\n \"value\": \"ZZZZZ999999\"\n },\n \"clientReferenceId\": \"PT-SQ-SS-5\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2328,9 +3010,9 @@ "raw": "{\n \"type\": \"MHR_NUMBER\",\n \"criteria\": {\n \"value\": \"T200000\"\n },\n \"clientReferenceId\": \"PT-SQ-MH-1\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2373,9 +3055,9 @@ "raw": "{\n \"type\": \"MHR_NUMBER\",\n \"criteria\": {\n \"value\": \"T000000\"\n },\n \"clientReferenceId\": \"PT-SQ-MH-2\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2418,9 +3100,9 @@ "raw": "{\n \"type\": \"MHR_NUMBER\",\n \"criteria\": {\n \"value\": \"T999999\"\n },\n \"clientReferenceId\": \"PT-SQ-MH-3\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2463,9 +3145,9 @@ "raw": "{\n \"type\": \"MHR_NUMBER\",\n \"criteria\": {\n \"value\": \"Z999999\"\n },\n \"clientReferenceId\": \"PT-SQ-MH-4\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2508,9 +3190,9 @@ "raw": "{\n \"type\": \"AIRCRAFT_DOT\",\n \"criteria\": {\n \"value\": \"CFYXW\"\n },\n \"clientReferenceId\": \"PT-SQ-AC-1\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2553,9 +3235,9 @@ "raw": "{\n \"type\": \"AIRCRAFT_DOT\",\n \"criteria\": {\n \"value\": \"AF16031\"\n },\n \"clientReferenceId\": \"PT-SQ-AF-1\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2598,9 +3280,9 @@ "raw": "{\n \"type\": \"AIRCRAFT_DOT\",\n \"criteria\": {\n \"value\": \"XXXXXXX\"\n },\n \"clientReferenceId\": \"PT-SQ-AC-2\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2643,9 +3325,9 @@ "raw": "{\n \"type\": \"AIRCRAFT_DOT\",\n \"criteria\": {\n \"value\": \"XXXXX999999\"\n },\n \"clientReferenceId\": \"PT-SQ-AC-3\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2688,9 +3370,9 @@ "raw": "{\n \"type\": \"AIRCRAFT_DOT\",\n \"criteria\": {\n \"value\": \"ZZZZZ999999\"\n },\n \"clientReferenceId\": \"PT-SQ-AC-4\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2733,9 +3415,9 @@ "raw": "{\n \"type\": \"BUSINESS_DEBTOR\",\n \"criteria\": {\n \"debtorName\": {\n \"business\": \"ZZZZZ99\"\n }\n },\n \"clientReferenceId\": \"T-P-SQ-DB-4\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2778,9 +3460,9 @@ "raw": "{\n \"type\": \"INDIVIDUAL_DEBTOR\",\n \"criteria\": {\n \"debtorName\": {\n \"first\": \"James\",\n \"last\": \"Smith\"\n }\n },\n \"clientReferenceId\": \"A-00000402\",\n \"startDateTime\": \"2020-01-15T00:00:00Z\",\n \"endDateTime\": \"2020-02-28T00:00:00Z\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2823,9 +3505,9 @@ "raw": "{\n \"type\": \"BUSINESS_DEBTOR\",\n \"criteria\": {\n \"debtorName\": {\n \"business\": \"TEST BUS 2 DEBTOR\"\n }\n },\n \"clientReferenceId\": \"T-P-SQ-DB-1\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2868,9 +3550,9 @@ "raw": "{\n \"type\": \"BUSINESS_DEBTOR\",\n \"criteria\": {\n \"debtorName\": {\n \"business\": \"XZXZXZXZ\"\n }\n },\n \"clientReferenceId\": \"T-P-SQ-DB-2\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2913,9 +3595,9 @@ "raw": "{\n \"type\": \"BUSINESS_DEBTOR\",\n \"criteria\": {\n \"debtorName\": {\n \"business\": \"XXXXX99\"\n }\n },\n \"clientReferenceId\": \"T-P-SQ-DB-3\"\n}" }, "url": { - "raw": "{{base_url}}/api/v1/searches", + "raw": "{{base_url_ppr}}/api/v1/searches", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -2984,9 +3666,9 @@ "raw": "[\n {\n \"matchType\": \"EXACT\",\n \"registrationType\": \"SA\",\n \"baseRegistrationNumber\": \"023001B\",\n \"createDateTime\": \"2020-02-21T18:56:20Z\"\n }\n]" }, "url": { - "raw": "{{base_url}}/api/v1/search-results/294371", + "raw": "{{base_url_ppr}}/api/v1/search-results/294371", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -3030,9 +3712,9 @@ "raw": "[\n {\n \"matchType\": \"EXACT\",\n \"baseRegistrationNumber\": \"013739B\",\n \"createDateTime\": \"2020-08-10T18:56:20Z\",\n \"registrationType\": \"SA\"\n },\n {\n \"matchType\": \"SIMILAR\",\n \"baseRegistrationNumber\": \"013600B\",\n \"createDateTime\": \"2020-08-03T10:12:20Z\",\n \"registrationType\": \"SA\"\n },\n {\n \"matchType\": \"SIMILAR\",\n \"baseRegistrationNumber\": \"013699B\",\n \"createDateTime\": \"2020-08-08T10:12:20Z\",\n \"registrationType\": \"SA\"\n }\n]" }, "url": { - "raw": "{{base_url}}/api/v1/search-results/1294376", + "raw": "{{base_url_ppr}}/api/v1/search-results/1294376", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -3079,9 +3761,9 @@ "raw": "[\n {\n \"matchType\": \"EXACT\",\n \"registrationType\": \"SA\",\n \"baseRegistrationNumber\": \"023001B\",\n \"createDateTime\": \"2020-02-21T18:56:20Z\"\n }\n]" }, "url": { - "raw": "{{base_url}}/api/v1/search-results/1294376", + "raw": "{{base_url_ppr}}/api/v1/search-results/1294376", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -3128,9 +3810,9 @@ "raw": "[\n {\n \"matchType\": \"EXACT\",\n \"registrationType\": \"SA\",\n \"baseRegistrationNumber\": \"023001B\",\n \"createDateTime\": \"2020-02-21T18:56:20Z\"\n }\n]" }, "url": { - "raw": "{{base_url}}/api/v1/search-results/1294371", + "raw": "{{base_url_ppr}}/api/v1/search-results/1294371", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -3142,6 +3824,95 @@ "description": "Retrieve (again) details for a previously completed search which contains only exact matches." }, "response": [] + }, + { + "name": "Get Completed Search Details Report", + "protocolProfileBehavior": { + "disabledSystemHeaders": { + "accept": true + } + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + }, + { + "key": "Accept", + "value": "application/pdf", + "type": "text" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/search-results/1194", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "search-results", + "1194" + ] + }, + "description": "Retrieve (again) details for a previously completed search which contains only exact matches." + }, + "response": [] + }, + { + "name": "Get Completed Search Details Test Copy", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Account-Id", + "type": "text", + "value": "{{account_id}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{jwt}}" + } + ], + "url": { + "raw": "{{base_url_ppr}}/api/v1/search-results/1226", + "host": [ + "{{base_url_ppr}}" + ], + "path": [ + "api", + "v1", + "search-results", + "1226" + ] + }, + "description": "Retrieve (again) details for a previously completed search which contains only exact matches." + }, + "response": [] } ], "description": "Search step 2 get financing statement details/history." @@ -3180,9 +3951,9 @@ "raw": "" }, "url": { - "raw": "{{base_url}}/api/v1/search-history", + "raw": "{{base_url_ppr}}/api/v1/search-history", "host": [ - "{{base_url}}" + "{{base_url_ppr}}" ], "path": [ "api", @@ -3233,14 +4004,14 @@ "variable": [ { "key": "account_id", - "value": "PS12345" + "value": "PROVIDE" }, { "key": "base_url_flask", "value": "http://127.0.0.1:5000/" }, { - "key": "base_url", + "key": "base_url_dev", "value": "bcregistry-dev.apigee.net/ppr" }, { @@ -3254,6 +4025,20 @@ { "key": "base_url_mock", "value": "bcregistry-bcregistry-mock.apigee.net" + }, + { + "key": "base_url_ppr", + "value": "{{base_url_dev}}" + }, + { + "key": "apikey", + "value": "PROVIDE", + "type": "string" + }, + { + "key": "jwt", + "value": "PROVIDE", + "type": "string" } ] } \ No newline at end of file diff --git a/ppr-api/tests/unit/api/test_historical_searches.py b/ppr-api/tests/unit/api/test_historical_searches.py index 24ede3aa7..7febc9106 100644 --- a/ppr-api/tests/unit/api/test_historical_searches.py +++ b/ppr-api/tests/unit/api/test_historical_searches.py @@ -34,16 +34,20 @@ AIRCRAFT_DOT_JSON = { 'type': 'AIRCRAFT_DOT', 'criteria': { - 'value': 'CFYXW' + 'value': 'BB2007' }, - 'clientReferenceId': 'T-SQ-AC-1' + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH', + 'searchDateTime': '2022-01-01T07:59:59+00:00' } MHR_NUMBER_JSON = { 'type': 'MHR_NUMBER', 'criteria': { - 'value': '220000' + 'value': '106284' }, - 'clientReferenceId': 'T-SQ-MH-1' + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH', + 'searchDateTime': '2022-01-01T07:59:59+00:00' } REG_NUMBER_JSON = { 'type': 'REGISTRATION_NUMBER', @@ -84,25 +88,33 @@ 'type': 'INDIVIDUAL_DEBTOR', 'criteria': { 'debtorName': { - 'last': 'Debtor', - 'first': 'Test Ind' + 'last': 'BITTNER', + 'first': 'GAIL' } }, - 'clientReferenceId': 'T-SQ-IS-1' + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH', + 'searchDateTime': '2021-12-16T07:59:59+00:00' } BUSINESS_DEBTOR_JSON = { 'type': 'BUSINESS_DEBTOR', 'criteria': { 'debtorName': { - 'business': 'TEST BUS 2 DEBTOR' + 'business': '0996357 B.C. LTD.' } }, - 'clientReferenceId': 'T-SQ-DB-1' + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH', + 'searchDateTime': '2022-05-16T06:59:59+00:00' } # testdata pattern is ({desc} ,{role}, {payload}, {status}) TEST_SEARCH_DATA = [ ('Valid serial number', STAFF_ROLE, SERIAL_NUMBER_JSON, HTTPStatus.CREATED), ('Valid registration number', STAFF_ROLE, REG_NUMBER_JSON, HTTPStatus.CREATED), + ('Valid mhr number', STAFF_ROLE, MHR_NUMBER_JSON, HTTPStatus.CREATED), + ('Valid aircraft DOT number', STAFF_ROLE, AIRCRAFT_DOT_JSON, HTTPStatus.CREATED), + ('Valid business debtor name', STAFF_ROLE, BUSINESS_DEBTOR_JSON, HTTPStatus.CREATED), + ('Valid individual debtor name', STAFF_ROLE, INDIVIDUAL_DEBTOR_JSON, HTTPStatus.CREATED), ('Non-staff role', BCOL_HELP, SERIAL_NUMBER_JSON, HTTPStatus.UNAUTHORIZED), ('Missing account id', STAFF_ROLE, SERIAL_NUMBER_JSON, HTTPStatus.BAD_REQUEST), ('Schema validation error', STAFF_ROLE, INVALID_SCHEMA_JSON, HTTPStatus.BAD_REQUEST), diff --git a/ppr-api/tests/unit/models/test_search_historical.py b/ppr-api/tests/unit/models/test_search_historical.py index 70463c4d6..b9d0e2a46 100644 --- a/ppr-api/tests/unit/models/test_search_historical.py +++ b/ppr-api/tests/unit/models/test_search_historical.py @@ -38,6 +38,45 @@ 'clientReferenceId': 'HISTORICAL SEARCH', 'accountName': 'UT HISTORICAL SEARCH' } +AIRCRAFT_DOT_JSON = { + 'type': 'AIRCRAFT_DOT', + 'criteria': { + 'value': '?' + }, + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH' +} +MHR_NUMBER_JSON = { + 'type': 'MHR_NUMBER', + 'criteria': { + 'value': '?' + }, + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH' +} +BUSINESS_DEBTOR_JSON = { + 'type': 'BUSINESS_DEBTOR', + 'criteria': { + 'debtorName': { + 'business': '0996357 B.C. LTD.' + } + }, + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH', + 'searchDateTime': '2022-05-16T06:59:59+00:00' +} +INDIVIDUAL_DEBTOR_JSON = { + 'type': 'INDIVIDUAL_DEBTOR', + 'criteria': { + 'debtorName': { + 'last': 'BITTNER', + 'first': 'GAIL' + } + }, + 'clientReferenceId': 'HISTORICAL SEARCH', + 'accountName': 'UT HISTORICAL SEARCH', + 'searchDateTime': '2021-12-16T07:59:59+00:00' +} # testdata pattern is ({desc}, {search_ts}) TEST_DATA_HISTORICAL_ID = [ ('Test get search historical id', '2022-09-26T06:59:59+00:00') @@ -50,6 +89,22 @@ TEST_DATA_SEARCH_REG_NUM_QUERY = [ ('Test search historical registration number query', '2022-09-26T06:59:59+00:00', 2389990, '924834N') ] +# testdata pattern is ({desc}, {search_ts}, {search_reg_id}, {criteria}) +TEST_DATA_SEARCH_MHR_NUM_QUERY = [ + ('Test search historical mhr number query', '2022-01-01T07:59:59+00:00', 1847933, '106284') +] +# testdata pattern is ({desc}, {search_ts}, {search_reg_id}, {criteria}) +TEST_DATA_SEARCH_AIRCRAFT_QUERY = [ + ('Test search historical aircraft serial# query', '2022-01-01T07:59:59+00:00', 1847933, 'BB2007') +] +# testdata pattern is ({desc}, {search_ts}, {search_reg_id}, {criteria}) +TEST_DATA_SEARCH_BUS_DEBTOR_QUERY = [ + ('Test search historical business debtor query', 1892928, BUSINESS_DEBTOR_JSON) +] +# testdata pattern is ({desc}, {search_ts}, {search_reg_id}, {criteria}) +TEST_DATA_SEARCH_IND_DEBTOR_QUERY = [ + ('Test search historical individual debtor query', 1821760, INDIVIDUAL_DEBTOR_JSON) +] @pytest.mark.parametrize('desc,search_ts', TEST_DATA_HISTORICAL_ID) @@ -137,3 +192,152 @@ def test_search_reg_num(session, desc, search_ts, reg_id, criteria): report_json = result.json current_app.logger.debug(json.dumps(report_json)) # current_app.logger.debug(report_json) + + +@pytest.mark.parametrize('desc,search_ts,reg_id,criteria', TEST_DATA_SEARCH_MHR_NUM_QUERY) +def test_search_by_mhr_number(session, desc, search_ts, reg_id, criteria): + """Assert that mhr number historical search step 1 works as expected.""" + search_criteria = copy.deepcopy(MHR_NUMBER_JSON) + search_criteria['criteria']['value'] = criteria + search_criteria['searchDateTime'] = search_ts + query: SearchRequest = SearchRequest(search_criteria=search_criteria, + search_ts=model_utils.ts_from_iso_format(search_ts), + account_id=search_historical.HISTORICAL_ACCOUNT_ID, + client_reference_id=search_historical.HISTORICAL_REF_ID) + + query = search_historical.search_by_serial_type(query, reg_id, search_ts) + query_json = query.json + current_app.logger.debug(query_json) + assert query_json.get('searchDateTime') + assert query_json.get('totalResultsSize') >= 0 + assert query_json.get('returnedResultsSize') >= 0 + assert query_json.get('searchQuery') + assert 'searchId' in query_json + if query.returned_results_size > 0: + current_app.logger.debug(json.dumps(query_json)) + + +@pytest.mark.parametrize('desc,search_ts,reg_id,criteria', TEST_DATA_SEARCH_MHR_NUM_QUERY) +def test_search_mhr_num(session, desc, search_ts, reg_id, criteria): + """Assert that historical search by mhr number works as expected.""" + search_criteria = copy.deepcopy(MHR_NUMBER_JSON) + search_criteria['criteria']['value'] = criteria + search_criteria['searchDateTime'] = search_ts + query: SearchRequest = search_historical.search(search_criteria, reg_id) + assert query.id > 0 + if query: + result: SearchResult = search_historical.build_search_results(reg_id, query) + if search_criteria.get('accountName'): + result.account_name = search_criteria.get('accountName') + report_json = result.json + current_app.logger.debug(json.dumps(report_json)) + # current_app.logger.debug(report_json) + + +@pytest.mark.parametrize('desc,search_ts,reg_id,criteria', TEST_DATA_SEARCH_AIRCRAFT_QUERY) +def test_search_by_aircraft_dot(session, desc, search_ts, reg_id, criteria): + """Assert that aircraft DOT historical search step 1 works as expected.""" + search_criteria = copy.deepcopy(AIRCRAFT_DOT_JSON) + search_criteria['criteria']['value'] = criteria + search_criteria['searchDateTime'] = search_ts + query: SearchRequest = SearchRequest(search_criteria=search_criteria, + search_ts=model_utils.ts_from_iso_format(search_ts), + account_id=search_historical.HISTORICAL_ACCOUNT_ID, + client_reference_id=search_historical.HISTORICAL_REF_ID) + + query = search_historical.search_by_serial_type(query, reg_id, search_ts) + query_json = query.json + current_app.logger.debug(query_json) + assert query_json.get('searchDateTime') + assert query_json.get('totalResultsSize') >= 0 + assert query_json.get('returnedResultsSize') >= 0 + assert query_json.get('searchQuery') + assert 'searchId' in query_json + if query.returned_results_size > 0: + current_app.logger.debug(json.dumps(query_json)) + + +@pytest.mark.parametrize('desc,search_ts,reg_id,criteria', TEST_DATA_SEARCH_AIRCRAFT_QUERY) +def test_search_ac_dot(session, desc, search_ts, reg_id, criteria): + """Assert that historical search by aircraft DOT works as expected.""" + search_criteria = copy.deepcopy(AIRCRAFT_DOT_JSON) + search_criteria['criteria']['value'] = criteria + search_criteria['searchDateTime'] = search_ts + query: SearchRequest = search_historical.search(search_criteria, reg_id) + assert query.id > 0 + if query: + result: SearchResult = search_historical.build_search_results(reg_id, query) + if search_criteria.get('accountName'): + result.account_name = search_criteria.get('accountName') + report_json = result.json + current_app.logger.debug(json.dumps(report_json)) + # current_app.logger.debug(report_json) + + +@pytest.mark.parametrize('desc,reg_id,search_criteria', TEST_DATA_SEARCH_BUS_DEBTOR_QUERY) +def test_search_by_business_debtor(session, desc, reg_id, search_criteria): + """Assert that business debtor name historical search step 1 works as expected.""" + search_ts = search_criteria['searchDateTime'] + query: SearchRequest = SearchRequest(search_criteria=search_criteria, + search_ts=model_utils.ts_from_iso_format(search_ts), + account_id=search_historical.HISTORICAL_ACCOUNT_ID, + client_reference_id=search_historical.HISTORICAL_REF_ID) + + query = search_historical.search_by_business_name(query, reg_id, search_ts) + query_json = query.json + current_app.logger.debug(query_json) + assert query_json.get('searchDateTime') + assert query_json.get('totalResultsSize') >= 0 + assert query_json.get('returnedResultsSize') >= 0 + assert query_json.get('searchQuery') + assert 'searchId' in query_json + if query.returned_results_size > 0: + current_app.logger.debug(json.dumps(query_json)) + + +@pytest.mark.parametrize('desc,reg_id,search_criteria', TEST_DATA_SEARCH_BUS_DEBTOR_QUERY) +def test_search_bus_debtor(session, desc, reg_id, search_criteria): + """Assert that historical search by business debtor name works as expected.""" + query: SearchRequest = search_historical.search(search_criteria, reg_id) + assert query.id > 0 + if query: + result: SearchResult = search_historical.build_search_results(reg_id, query) + if search_criteria.get('accountName'): + result.account_name = search_criteria.get('accountName') + report_json = result.json + current_app.logger.debug(json.dumps(report_json)) + # current_app.logger.debug(report_json) + + +@pytest.mark.parametrize('desc,reg_id,search_criteria', TEST_DATA_SEARCH_IND_DEBTOR_QUERY) +def test_search_by_individual_debtor(session, desc, reg_id, search_criteria): + """Assert that individual debtor name historical search step 1 works as expected.""" + search_ts = search_criteria['searchDateTime'] + query: SearchRequest = SearchRequest(search_criteria=search_criteria, + search_ts=model_utils.ts_from_iso_format(search_ts), + account_id=search_historical.HISTORICAL_ACCOUNT_ID, + client_reference_id=search_historical.HISTORICAL_REF_ID) + query = search_historical.search_by_individual_name(query, reg_id, search_ts) + query_json = query.json + current_app.logger.debug(query_json) + assert query_json.get('searchDateTime') + assert query_json.get('totalResultsSize') >= 0 + assert query_json.get('returnedResultsSize') >= 0 + assert query_json.get('searchQuery') + assert 'searchId' in query_json + if query.returned_results_size > 0: + current_app.logger.debug(json.dumps(query_json)) + + +@pytest.mark.parametrize('desc,reg_id,search_criteria', TEST_DATA_SEARCH_IND_DEBTOR_QUERY) +def test_search_ind_debtor(session, desc, reg_id, search_criteria): + """Assert that historical search by individual debtor name works as expected.""" + query: SearchRequest = search_historical.search(search_criteria, reg_id) + assert query.id > 0 + if query: + result: SearchResult = search_historical.build_search_results(reg_id, query) + if search_criteria.get('accountName'): + result.account_name = search_criteria.get('accountName') + report_json = result.json + current_app.logger.debug(json.dumps(report_json)) + # current_app.logger.debug(report_json) diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index 52122e535..84b6be29c 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "2.1.15", + "version": "2.1.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "2.1.15", + "version": "2.1.17", "dependencies": { "@bcrs-shared-components/corp-type-module": "^1.0.7", "@bcrs-shared-components/enums": "^1.0.19", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index e56304a9d..dd09f2433 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "2.1.15", + "version": "2.1.17", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/App.vue b/ppr-ui/src/App.vue index b50c22cab..b89a77a75 100644 --- a/ppr-ui/src/App.vue +++ b/ppr-ui/src/App.vue @@ -73,7 +73,7 @@ import * as Views from '@/views' import { authPprError, authAssetsError, draftDeleteError, historyRegError, loginError, openDocError, paymentErrorReg, paymentErrorSearch, registrationCompleteError, registrationDeleteError, registrationLoadError, - registrationOpenDraftError, registrationSaveDraftError, searchResultsError, unitNoteFilingError + registrationOpenDraftError, registrationSaveDraftError, searchResultsError, unitNoteFilingError, exemptionSaveError } from '@/resources/dialogOptions' import { getFees, @@ -524,6 +524,10 @@ export default defineComponent({ case ErrorCategories.SEARCH: handleErrorSearch(error) break + case ErrorCategories.EXEMPTION_SAVE: + localState.errorOptions = exemptionSaveError + localState.errorDisplay = true + break case ErrorCategories.SEARCH_COMPLETE: // handled in search comp break diff --git a/ppr-ui/src/assets/styles/base.scss b/ppr-ui/src/assets/styles/base.scss index 64e510854..f65838c7f 100644 --- a/ppr-ui/src/assets/styles/base.scss +++ b/ppr-ui/src/assets/styles/base.scss @@ -215,10 +215,24 @@ p { } // Common -ul.list { - margin: 0; - padding: 0; - list-style-type: none; +ol, ul { + li { + color: $gray7; + } + li::marker { + font-weight: bold; + } +} +ul { + list-style-type: disc; + li::marker { + font-size: 0.75rem; + } + .list { + margin: 0; + padding: 0; + list-style-type: none; + } } .list-item { @@ -450,12 +464,16 @@ tr.disabled-text-not-action td, tr.disabled-text-not-first td { color: #2e8540 !important; } +.rounded-all { + border-radius: 4px 4px 4px 4px; +} + .rounded-top { - border-radius: 4px 4px 0px 0px; + border-radius: 4px 4px 0 0; } .rounded-bottom { - border-radius: 0px 0px 4px 4px; + border-radius: 0 0 4px 4px; } .icon-div { @@ -770,11 +788,15 @@ tr.registration-row.draft-registration-row.added-reg-effect td.actions-cell, color: $gray9; } -.exemption-icon { +.icon-small { width: 18px; height: 18px; margin-bottom: -2px; } +.icon-large { + width: 24px; + height: 24px; +} .home-owners-icon { width: 25px; @@ -890,4 +912,29 @@ tr.registration-row.draft-registration-row.added-reg-effect td.actions-cell, .overlap { z-index: 7; +} + +// Contact Type Radio Btns +.person-radio { + width: 47%; + margin-right: 20px !important; + background-color: rgba(0, 0, 0, 0.06); + height: 60px; + padding: 10px; + color: red !important +} +.business-radio { + width: 50%; + background-color: rgba(0, 0, 0, 0.06); + height: 60px; + padding: 10px; + margin-right: 0px !important; +} + +.selected-radio { + border: 1px solid $app-blue; + background-color: white; + ::v-deep .theme--light.v-label:not(.v-label--is-disabled), .theme--light.v-messages { + color: $gray9 !important; + } } \ No newline at end of file diff --git a/ppr-ui/src/assets/styles/layout.scss b/ppr-ui/src/assets/styles/layout.scss index fbe48ac44..ac6b1d6f4 100644 --- a/ppr-ui/src/assets/styles/layout.scss +++ b/ppr-ui/src/assets/styles/layout.scss @@ -77,6 +77,10 @@ } } +.col-3, .col-sm-3 { + max-width: 25%; +} + .column-width-xxl { width: 40%; } diff --git a/ppr-ui/src/assets/styles/overrides.scss b/ppr-ui/src/assets/styles/overrides.scss index 392cd2fa0..9c74949ff 100644 --- a/ppr-ui/src/assets/styles/overrides.scss +++ b/ppr-ui/src/assets/styles/overrides.scss @@ -17,8 +17,7 @@ td { color: $gray7 !important; font-size: 0.875rem !important; min-width: 9rem; - overflow: hidden; - text-overflow: ellipsis; + white-space: nowrap; } // Buttons diff --git a/ppr-ui/src/components/common/AccountInfo.vue b/ppr-ui/src/components/common/AccountInfo.vue index fc7fdca35..7ef0450f8 100644 --- a/ppr-ui/src/components/common/AccountInfo.vue +++ b/ppr-ui/src/components/common/AccountInfo.vue @@ -79,7 +79,7 @@ import { BaseAddress } from '@/composables/address' import { PartyAddressSchema } from '@/schemas' import { defineComponent } from 'vue-demi' import { toDisplayPhone } from '@/utils' -import { AccountInfoIF } from '@/interfaces' // eslint-disable-line no-unused-vars +import { AccountInfoIF, PartyIF } from '@/interfaces' // eslint-disable-line no-unused-vars export default defineComponent({ name: 'AccountInfo', diff --git a/ppr-ui/src/components/common/Attention.vue b/ppr-ui/src/components/common/Attention.vue index f6953a87d..cbb05300c 100644 --- a/ppr-ui/src/components/common/Attention.vue +++ b/ppr-ui/src/components/common/Attention.vue @@ -38,6 +38,7 @@ import { defineComponent, toRefs, computed, reactive, ref, watch } from 'vue-dem import { useInputRules } from '@/composables' import { FormField } from '@/components/common' import { attentionConfigManufacturer, attentionConfig } from '@/resources/attnRefConfigs' +import { AttnRefConfigIF } from '@/interfaces' export default defineComponent({ name: 'Attention', @@ -63,6 +64,10 @@ export default defineComponent({ validate: { type: Boolean, default: false + }, + configOverride: { + type: Object as () => AttnRefConfigIF, + default: () => null } }, setup (props, { emit }) { @@ -71,7 +76,7 @@ export default defineComponent({ const { maxLength } = useInputRules() const localState = reactive({ - config: isRoleManufacturer.value ? attentionConfigManufacturer : attentionConfig, + config: props.configOverride || isRoleManufacturer.value ? attentionConfigManufacturer : attentionConfig, isFormValid: false, setShowErrors: computed((): boolean => props.validate && !localState.isFormValid) }) diff --git a/ppr-ui/src/components/common/ButtonFooter.vue b/ppr-ui/src/components/common/ButtonFooter.vue index ffb6970a9..d0f80ba15 100644 --- a/ppr-ui/src/components/common/ButtonFooter.vue +++ b/ppr-ui/src/components/common/ButtonFooter.vue @@ -248,10 +248,10 @@ export default defineComponent({ // Undetected Duplicate Secured Party API check to be implemented here. // Use secured party dialog with isDuplicate and isReview props to display error if found. - if ([RouteNames.REVIEW_CONFIRM, RouteNames.MHR_REVIEW_CONFIRM, RouteNames.QS_ACCESS_REVIEW_CONFIRM] - .includes(props.currentStepName as RouteNames)) { + if ([RouteNames.REVIEW_CONFIRM, RouteNames.MHR_REVIEW_CONFIRM, RouteNames.QS_ACCESS_REVIEW_CONFIRM, + RouteNames.EXEMPTION_REVIEW].includes(props.currentStepName as RouteNames)) { // -- Intersect here for Submitting MHR Registration -- - if ([RouteNames.MHR_REVIEW_CONFIRM, RouteNames.QS_ACCESS_REVIEW_CONFIRM] + if ([RouteNames.MHR_REVIEW_CONFIRM, RouteNames.QS_ACCESS_REVIEW_CONFIRM, RouteNames.EXEMPTION_REVIEW] .includes(props.currentStepName as RouteNames)) { emit('submit') return diff --git a/ppr-ui/src/components/common/CertifyInformation.vue b/ppr-ui/src/components/common/CertifyInformation.vue index 90e6fc96e..e5eb25d8c 100644 --- a/ppr-ui/src/components/common/CertifyInformation.vue +++ b/ppr-ui/src/components/common/CertifyInformation.vue @@ -28,8 +28,8 @@ - - mdi-account{{ legalName }} + + mdi-account{{ legalName }} {{ item.businessName }} @@ -107,6 +107,7 @@ import { authorizedTableHeaders } from '@/resources' export default defineComponent({ name: 'CertifyInformation', + emits: ['certifyValid'], components: { BaseAddress }, diff --git a/ppr-ui/src/components/common/ContactInformation.vue b/ppr-ui/src/components/common/ContactInformation.vue index 313ad5bfe..2d7ffe042 100644 --- a/ppr-ui/src/components/common/ContactInformation.vue +++ b/ppr-ui/src/components/common/ContactInformation.vue @@ -24,8 +24,8 @@ class="pa-8 pr-6" :class="{ 'border-error-left': showBorderError }" > - - + + - + - + - + - + - + diff --git a/ppr-ui/src/components/common/PartyForm.vue b/ppr-ui/src/components/common/PartyForm.vue index 146d8e69b..892352f7f 100644 --- a/ppr-ui/src/components/common/PartyForm.vue +++ b/ppr-ui/src/components/common/PartyForm.vue @@ -1,10 +1,73 @@ + + + + diff --git a/ppr-ui/src/components/common/index.ts b/ppr-ui/src/components/common/index.ts index 2edb73198..309ebb72a 100644 --- a/ppr-ui/src/components/common/index.ts +++ b/ppr-ui/src/components/common/index.ts @@ -34,3 +34,4 @@ export { default as PartyForm } from './PartyForm.vue' export { default as PartyReview } from './PartyReview.vue' export { default as FormCard } from './FormCard.vue' export { default as OrgNameLookup } from './OrgNameLookup.vue' +export { default as ReviewCard } from './ReviewCard.vue' diff --git a/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue b/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue index b6708d437..087dc4021 100644 --- a/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue +++ b/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue @@ -1063,7 +1063,7 @@ export default defineComponent({ } .owner-info { - min-width: 60rem; + min-width: 50rem; display: flex; } } diff --git a/ppr-ui/src/components/mhrRegistration/ReviewConfirm/YourHomeReview.vue b/ppr-ui/src/components/mhrRegistration/ReviewConfirm/YourHomeReview.vue index 857621ea9..9653a92cf 100644 --- a/ppr-ui/src/components/mhrRegistration/ReviewConfirm/YourHomeReview.vue +++ b/ppr-ui/src/components/mhrRegistration/ReviewConfirm/YourHomeReview.vue @@ -216,7 +216,7 @@ export default defineComponent({ showStepError: computed(() => !getStepValidation(MhrSectVal.YOUR_HOME_VALID)), hasData: computed(() : boolean => { return hasTruthyValue(getMhrRegistrationHomeDescription.value) || - (!isMhrManufacturerRegistration.value && !!getMhrRegistrationOtherInfo.value) + (!isMhrManufacturerRegistration.value && !!getMhrRegistrationOtherInfo.value) }) }) diff --git a/ppr-ui/src/components/mhrTransfers/ConfirmCompletion.vue b/ppr-ui/src/components/mhrTransfers/ConfirmCompletion.vue index d288a4cec..5946ef77b 100644 --- a/ppr-ui/src/components/mhrTransfers/ConfirmCompletion.vue +++ b/ppr-ui/src/components/mhrTransfers/ConfirmCompletion.vue @@ -1,7 +1,7 @@ - exemption-icon + exemption-icon Residential Exemption - exemption-icon + exemption-icon Non-Residential Exemption @@ -482,7 +484,8 @@ import { UITransferTypes, MhApiStatusTypes, MhApiFrozenDocumentTypes, - UnitNoteDocTypes + UnitNoteDocTypes, + HomeLocationTypes } from '@/enums' import { useRegistration } from '@/composables/useRegistration' import { useExemptions, useTransferOwners } from '@/composables' @@ -577,13 +580,13 @@ export default defineComponent({ 'registration you must conduct a search.' } else if (!item.registeringName) { return 'Verification Statements are only available ' + - 'to Secured Parties or the Registering Party of this filing. To ' + - 'view the details of this registration you must conduct a search.' + 'to Secured Parties or the Registering Party of this filing. To ' + + 'view the details of this registration you must conduct a search.' } else { return 'This document PDF is still being generated. Click the ' + - '' + - ' icon to see if your PDF is ready to download.
' + - 'Note: Large documents may take up to 20 minutes to generate.' + '' + + ' icon to see if your PDF is ready to download.
' + + 'Note: Large documents may take up to 20 minutes to generate.' } } @@ -662,9 +665,9 @@ export default defineComponent({ }) } - const openExemption = (action: TableActions, item: MhRegistrationSummaryIF): void => { + const openExemption = (doctType: UnitNoteDocTypes, item: MhRegistrationSummaryIF): void => { emit('action', { - action: action, + action: doctType, mhrInfo: item }) } @@ -902,6 +905,7 @@ export default defineComponent({ hasLockedState, MhApiFrozenDocumentTypes, UnitNoteDocTypes, + HomeLocationTypes, ...toRefs(localState) } } diff --git a/ppr-ui/src/components/tombstone/Tombstone.vue b/ppr-ui/src/components/tombstone/Tombstone.vue index 9418e64f0..7112c619b 100644 --- a/ppr-ui/src/components/tombstone/Tombstone.vue +++ b/ppr-ui/src/components/tombstone/Tombstone.vue @@ -38,7 +38,7 @@ export default defineComponent({ return localState.currentPath.includes('amend') }), displayMhrInformation: computed((): boolean => { - return localState.currentPath.includes('mhr-information') + return localState.currentPath.includes('mhr-information') || localState.currentPath.includes('exemption') }) }) diff --git a/ppr-ui/src/components/tombstone/TombstoneDischarge.vue b/ppr-ui/src/components/tombstone/TombstoneDischarge.vue index 40d77ae65..f28211cff 100644 --- a/ppr-ui/src/components/tombstone/TombstoneDischarge.vue +++ b/ppr-ui/src/components/tombstone/TombstoneDischarge.vue @@ -13,11 +13,12 @@ {{ creationDate }}
- - + + + Registration Status: - + {{ statusType }} @@ -126,5 +127,6 @@ export default defineComponent({ .info-label { color: $gray9 !important; font-weight: bold; + white-space: nowrap; } diff --git a/ppr-ui/src/components/userAccess/ReviewConfirm/Authorization.vue b/ppr-ui/src/components/userAccess/ReviewConfirm/Authorization.vue index cc9a689bb..17f6213d5 100644 --- a/ppr-ui/src/components/userAccess/ReviewConfirm/Authorization.vue +++ b/ppr-ui/src/components/userAccess/ReviewConfirm/Authorization.vue @@ -5,7 +5,7 @@ :class="{'border-error-left': showErrors}" >