Skip to content

Commit

Permalink
Conversion filing - Schema changes (#34)
Browse files Browse the repository at this point in the history
* Conversion schema

* More changes

* Pylint and Flake8 fixes
  • Loading branch information
Lekshmi authored Jun 25, 2020
1 parent f7cf6ef commit e6ee574
Show file tree
Hide file tree
Showing 8 changed files with 417 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/registry_schemas/example_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
CHANGE_OF_NAME,
COMMENT_BUSINESS,
COMMENT_FILING,
CONVERSION,
CONVERSION_FILING_TEMPLATE,
CORP_CHANGE_OF_ADDRESS,
CORRECTION_AR,
CORRECTION_COA,
Expand Down Expand Up @@ -63,5 +65,7 @@
'INCORPORATION_FILING_TEMPLATE',
'SPECIAL_RESOLUTION',
'STUB_FILING',
'VOLUNTARY_DISSOLUTION'
'VOLUNTARY_DISSOLUTION',
'CONVERSION',
'CONVERSION_FILING_TEMPLATE'
]
179 changes: 178 additions & 1 deletion src/registry_schemas/example_data/schema_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Sample data used across many tests."""

# pylint: disable=too-many-lines
import copy


Expand Down Expand Up @@ -913,6 +913,162 @@
}
}


CONVERSION = {
'nameRequest': {
'legalType': 'BC'
},
'offices': {
'registeredOffice': {
'deliveryAddress': {
'streetAddress': 'delivery_address - address line one',
'addressCity': 'delivery_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC'
},
'mailingAddress': {
'streetAddress': 'mailing_address - address line one',
'addressCity': 'mailing_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC',
}
},
'recordsOffice': {
'deliveryAddress': {
'streetAddress': 'delivery_address - address line one',
'addressCity': 'delivery_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC'
},
'mailingAddress': {
'streetAddress': 'mailing_address - address line one',
'addressCity': 'mailing_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC',
}
}
},
'parties': [
{
'officer': {
'id': 1,
'firstName': 'Joe',
'lastName': 'Swanson',
'middleName': 'P',
'email': '[email protected]',
'orgName': '',
'partyType': 'person'
},
'mailingAddress': {
'streetAddress': 'mailing_address - address line one',
'streetAddressAdditional': '',
'addressCity': 'mailing_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC'
},
'deliveryAddress': {
'streetAddress': 'delivery_address - address line one',
'streetAddressAdditional': '',
'addressCity': 'delivery_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC'
},
'roles': [
{
'roleType': 'Completing Party',
'appointmentDate': '2018-01-01'

},
{
'roleType': 'Director',
'appointmentDate': '2018-01-01'

}
]
},
{
'officer': {
'id': 2,
'firstName': '',
'lastName': '',
'middleName': '',
'orgName': 'Xyz Inc.',
'partyType': 'org'
},
'mailingAddress': {
'streetAddress': 'mailing_address - address line one',
'streetAddressAdditional': '',
'addressCity': 'mailing_address city',
'addressCountry': 'CA',
'postalCode': 'H0H0H0',
'addressRegion': 'BC'
},
'roles': [
{
'roleType': 'Incorporator',
'appointmentDate': '2018-01-01'
}
]
}
],
'shareClasses': [
{
'id': 1,
'name': 'Share Class 1',
'priority': 1,
'hasMaximumShares': True,
'maxNumberOfShares': 100,
'hasParValue': True,
'parValue': 10,
'currency': 'CAD',
'hasRightsOrRestrictions': False,
'series': [
{
'id': 1,
'name': 'Share Series 1',
'priority': 1,
'hasMaximumShares': True,
'maxNumberOfShares': 50,
'hasRightsOrRestrictions': False,
},
{
'id': 2,
'name': 'Share Series 2',
'priority': 2,
'hasMaximumShares': True,
'maxNumberOfShares': 100,
'hasRightsOrRestrictions': False,
}
]
},
{
'id': 2,
'name': 'Share Class 2',
'priority': 1,
'hasMaximumShares': False,
'maxNumberOfShares': None,
'hasParValue': False,
'parValue': None,
'currency': None,
'hasRightsOrRestrictions': True,
'series': []
},
],
'contactPoint': {
'email': '[email protected]',
'phone': '123-456-7890'
},
'incorporationAgreement': {
'agreementType': 'sample'
}
}

FILING_TEMPLATE = {
'filing': {
'header': {
Expand Down Expand Up @@ -953,6 +1109,26 @@
}
}

CONVERSION_FILING_TEMPLATE = {
'filing': {
'header': {
'name': 'conversion',
'date': '2020-06-25',
'certifiedBy': 'full name',
'email': '[email protected]',
'filingId': 1
},
'business': {
'foundingDate': '2018-01-01T00:00:00+00:00',
'identifier': 'BC1234567',
'lastLedgerTimestamp': '2019-04-15T20:05:49.068272+00:00',
'legalName': 'legal name - BC1234567',
'legalType': 'BC'
},
'conversion': CONVERSION
}
}


STUB_FILING = {
}
Expand All @@ -977,6 +1153,7 @@
('appointReceiver', STUB_FILING),
('continuedOut', STUB_FILING),
('changeOfDirectors', CHANGE_OF_DIRECTORS_MAILING), # bcorp-specific version of filing
('conversion', CONVERSION)
]


Expand Down
47 changes: 47 additions & 0 deletions src/registry_schemas/schemas/conversion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/conversion",
"required": [
"nameRequest",
"offices",
"parties",
"shareClasses",
"contactPoint"
],
"type": "object",
"title": "Conversion Filing",
"properties": {
"nameRequest": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/name_request"
},
"offices": {
"registeredOffice": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/office"
},
"recordsOffice": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/office"
},
"required": [
"registeredOffice"
]
},
"parties": {
"type": "array",
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/parties#/definitions/party"
}
},
"shareClasses": {
"type": "array",
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/share_class#/definitions/shareClass"
}
},
"contactPoint" : {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/contactPoint"
},
"incorporationAgreement": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/agreementType"
}
}
}
6 changes: 5 additions & 1 deletion src/registry_schemas/schemas/filing.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"voluntaryLiquidation",
"appointReceiver",
"continuedOut",
"correction"
"correction",
"conversion"
]
},
"availableOnPaperOnly": {
Expand Down Expand Up @@ -227,6 +228,9 @@
{
"title": "Placeholder until all filing types are defined.",
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/stub_filing"
},
{
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/conversion"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/registry_schemas/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
Development release segment: .devN
"""

__version__ = '2.5.13' # pylint: disable=invalid-name
__version__ = '2.5.14' # pylint: disable=invalid-name
3 changes: 2 additions & 1 deletion tests/unit/schema_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
('task.json'),
('todo.json'),
('voluntary_dissolution.json'),
('agreement_type.json')
('agreement_type.json'),
('conversion.json')
]
Loading

0 comments on commit e6ee574

Please sign in to comment.