This is a Python library for building IVMS data structure.
Project description
Sygna Bridge IVMS Util For Python
Installation
pip install sygna-bridge-ivms-util
Example
from sygna_bridge_ivms_util import ivms
import json
# Originator
# originator name id
org_name_id = ivms.NaturalPersonNameId()
org_name_id.primary_identifier = "Wu"
org_name_id.secondary_identifier = "Xinli"
org_name_id.name_identifier_type = ivms.NaturalPersonNameTypeCode.LEGL
# another name id for originator
org_name_local_id = ivms.LocalNaturalPersonNameId()
org_name_local_id.primary_identifier = "吳"
org_name_local_id.secondary_identifier = "信利"
org_name_local_id.name_identifier_type = ivms.NaturalPersonNameTypeCode.LEGL
# assign two name id to originator name
org_person_name = ivms.NaturalPersonName()
org_person_name.name_identifiers = [org_name_id]
org_person_name.local_name_identifiers = [org_name_local_id]
# originator national id and data
org_person_national_id = ivms.NationalIdentification()
org_person_national_id.national_identifier = "446005"
org_person_national_id.national_identifier_type = ivms.NationalIdentifierTypeCode.RAID
org_person_national_id.registration_authority = "RA000553"
# assign name, national id, country to originator natural person
org_nature_person = ivms.NaturalPerson()
org_nature_person.name = org_person_name
org_nature_person.national_identification = org_person_national_id
org_nature_person.country_of_residence = "TZ"
# assign originator to person object
org_persion = ivms.Person()
org_persion.natural_person = org_nature_person
# assign originator person and account id to originator
originator = ivms.Originator()
originator.originator_persons = [org_persion]
originator.account_numbers = ["1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2"]
# Beneficiary
# beneficiary 1 name id
bene_1_name_id = ivms.LegalPersonNameId()
bene_1_name_id.legal_person_name = "ABC Limited"
bene_1_name_id.legal_person_name_identifier_type = ivms.LegalPersonNameTypeCode.LEGL
# assign beneficiary 1 name with id
bene_1_person_name = ivms.LegalPersonName()
bene_1_person_name.name_identifiers = [bene_1_name_id]
# beneficiary 1 is a legal person
bene_1_legal_person = ivms.LegalPerson()
bene_1_legal_person.name = bene_1_person_name
# assign beneficiary 1 to person object
bene_1_person = ivms.Person()
bene_1_person.legal_person = bene_1_legal_person
# beneficiary 2 name id
bene_2_name_id = ivms.LegalPersonNameId()
bene_2_name_id.legal_person_name = "CBA Trading"
bene_2_name_id.legal_person_name_identifier_type = ivms.LegalPersonNameTypeCode.TRAD
# assign beneficiary 2 name with id
bene_2_person_name = ivms.LegalPersonName()
bene_2_person_name.name_identifiers = [bene_2_name_id]
# beneficiary 2 is a legal person
bene_2_legal_person = ivms.LegalPerson()
bene_2_legal_person.name = bene_2_person_name
# assign beneficiary 2 to person object
bene_2_person = ivms.Person()
bene_2_person.legal_person = bene_2_legal_person
# assign both persons to beneficiary object
beneficiary = ivms.Beneficiary()
beneficiary.beneficiary_persons = [bene_1_person, bene_2_person]
# assign originator and beneficiary data to identity payload
private_info = ivms.IdentityPayload()
private_info.originator = originator
private_info.beneficiary = beneficiary
# pretty print json
print(json.dumps(private_info.to_dict(), indent=2, ensure_ascii=False))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sygna-bridge-ivms-util-0.0.6.tar.gz
.
File metadata
- Download URL: sygna-bridge-ivms-util-0.0.6.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e237529c06892d1df0571de9f5efea9e390e18bc6eafec19dbf4aca8450d633e |
|
MD5 | 86b22c892ffffb8fb657b2733417287c |
|
BLAKE2b-256 | 632b7f64bfe16deaa8a223634121b5a7336cdfe045de9b224a8f263028427f6e |