Source: factory.core/ObjPerson.py
South African 13-digit ID number validator and parser.
| Method | Signature | Description |
|---|---|---|
| set_id | set_id(id_number: str = '') -> None |
|
| is_valid | is_valid(id_number: str = '') -> bool |
Return True if the ID number passes the Luhn-based SA check. |
| gender | gender() -> str |
Return 'M' or 'F' based on digits 7–10 of the ID. |
| is_citizen | is_citizen() -> bool |
Return True if the ID indicates SA citizenship. |
| find | find(text: str) -> str |
Extract the first valid SA ID number from a text string. |
| SetId | SetId(Id: str = '') -> None |
|
| IsValid | IsValid(Id: str = '') -> bool |
|
| Gender | Gender() -> str |
|
| Find | Find(String: str) -> str |
Contact person for notifications, runbooks, and escalations.
A person may be an Axion user (User links to sys_user) or an
external contact with no Axion account. All notification channel
fields are stored here so ObjNotify can deliver alerts to any
...
| Method | Signature | Description |
|---|---|---|
| packages_list | packages_list() -> list[str] |
Parsed list of associated package names. |
| companies_list | companies_list() -> list[str] |
Parsed list of associated company names. |
| read | read(person_guid: str) -> bool |
Load a person by PersonGuid. Returns True if found. |
| read_by_identifier | read_by_identifier(identifier: str, package: str | None = None) -> bool |
Load a person by PersonGuid, User, or Name, filtered by package |
| save | save() -> bool |
Insert or update this person. Returns True on success. |
| touch_contact | touch_contact(person_guid: str) -> bool |
Stamp LastContactDate and LastUpdateDate to now. |
| delete | delete(person_guid: str) -> bool |
Soft-delete a person (sets Active = 'N'). |
| list_persons | list_persons(package: str | None = None, active_only: bool = True) -> list[dict[str, Any]] |
Return persons visible to the package. |
| find_by_identifier | find_by_identifier(identifier: str, package: str | None = None) -> dict[str, Any] | None |
Find a person by PersonGuid, User, or Name, filtered by package |
| get_contact | get_contact(identifier: str, channel: str, package: str | None = None) -> str |
Resolve a contact detail for a notification channel. |
| search | search(search_term: str, package: str | None = None) -> list[dict[str, Any]] |
Search active persons by name, nickname, email, role, company, |
| resolve_by_email | resolve_by_email(email: str) -> dict[str, Any] |
Find a person by email address. |
| resolve_by_service | resolve_by_service(provider: str, service_id: str) -> dict[str, Any] |
Find a person by external service ID. |
| resolve_email | resolve_email(provider: str, service_id: str) -> str |
Resolve an external service ID to an email. |
| resolve_person_guid | resolve_person_guid(email: str = '', provider: str = '', service_id: str = '') -> str |
Resolve to a PersonGuid by email or service. |
| link_service | link_service(person_guid: str, provider: str, service_id: str) -> bool |
Link an external service ID to a person. |
Validate and parse a South African ID number.
List contact persons visible to a package.
Show full details for a person.
Add a new contact person.
Stamp LastContactDate and LastUpdateDate to now.
Link an external service ID to a person.
Resolve a person by email or service ID.
Show all active persons, optionally by company.