Models

ExtendedDemographic

class q2_cores.Symitar.models.extended_demographic.AccountStatus[source]

Bases: object

ACTIVE = 'Active'
CLOSED = 'Closed'
class q2_cores.Symitar.models.extended_demographic.RecordType[source]

Bases: object

DOMESTIC = 'Domestic'
INTERNATIONAL = 'International'
class q2_cores.Symitar.models.extended_demographic.AddressRec(address_1, address_2, city, state, zipcode, address_type, country, country_code)[source]

Bases: Address

AddressRec(address_1: Optional[str], address_2: Optional[str], city: Optional[str], state: Optional[str], zipcode: Optional[str], address_type: Optional[str], country: Optional[str], country_code: Optional[str])

address_1: Optional[str]
address_2: Optional[str]
city: Optional[str]
state: Optional[str]
zipcode: Optional[str]
address_type: Optional[str]
country: Optional[str]
country_code: Optional[str]
class q2_cores.Symitar.models.extended_demographic.Other(home_phone, mobile_phone, work_phone, work_phone_extension, phone_type, alternative_email, email)[source]

Bases: object

Other(home_phone: str, mobile_phone: Optional[str], work_phone: Optional[str], work_phone_extension: Optional[str], phone_type: str, alternative_email: Optional[str], email: str)

home_phone: str
mobile_phone: Optional[str]
work_phone: Optional[str]
work_phone_extension: Optional[str]
phone_type: str
alternative_email: Optional[str]
email: str
class q2_cores.Symitar.models.extended_demographic.Account(memo_mode, account_type, account_number, account_close_date)[source]

Bases: object

Account(memo_mode: str, account_type: str, account_number: str, account_close_date: str)

memo_mode: str
account_type: str
account_number: str
account_close_date: str
class q2_cores.Symitar.models.extended_demographic.DemographicInfoExt(full_name, first_name, last_name, middle_name, mothers_maiden_name, date_of_birth, ssn, is_primary, primary_cif, account_type, account_close_date, drivers_license, core_specific, address_records, other_records)[source]

Bases: object

DemographicInfoExt(full_name: str, first_name: str, last_name: str, middle_name: Optional[str], mothers_maiden_name: Optional[str], date_of_birth: str, ssn: str, is_primary: str, primary_cif: str, account_type: str, account_close_date: str, drivers_license: str, core_specific: dict, address_records: q2_cores.Symitar.models.extended_demographic.AddressRec, other_records: q2_cores.Symitar.models.extended_demographic.Other)

full_name: str
first_name: str
last_name: str
middle_name: Optional[str]
mothers_maiden_name: Optional[str]
date_of_birth: str
ssn: str
is_primary: str
primary_cif: str
account_type: str
account_close_date: str
drivers_license: str
core_specific: dict
address_records: AddressRec
other_records: Other
q2_cores.Symitar.models.extended_demographic.get_account_status(account_close_date)[source]

Message

class q2_cores.Symitar.models.message.SymConnectMessage(raw, guid, message_type, status, payload=None, fields=None, error_number=None, error_message=None)[source]

Bases: object

Data structure of a SymConnect message

has_error()[source]

Evaluates if the response is considered an error

has_warning()[source]

Evaluates if the response has a warning code

class q2_cores.Symitar.models.message.SymXchangeMessage(raw, element, message_type)[source]

Bases: object

Data structure of a SymXchangeResponse message

Initialize a SymXchangeMessage object

Parameters:
  • raw (str) – The raw xml message (str)

  • element (Any) – The xml element as a lxml object

  • message_type (SymXchangeMessageType) – The SymXchange message type

property status: MessageStatus
property status_code: int | None[source]
property status_message: int | None[source]
property raw_message_type: str | None[source]
property message_type: SymXchangeMessageType
property element: Any
has_error()[source]

Evaluates if the response is considered an error

has_warning()[source]

Evaluates if the response has a warning code

xml_unescape(data)[source]

Unescape &, ', ", <, and > in a string of data.

Return type:

str

class q2_cores.Symitar.models.message.PowerOnMessage(raw, element, unescape)[source]

Bases: SymXchangeMessage

Data structure of a PowerOnResponse message

Initialize a SymXchangeMessage object

Parameters:
  • raw (str) – The raw xml message (str)

  • element (Any) – The xml element as a lxml object

  • message_type – The SymXchange message type

property user_defined_chr_parameters: List[str][source]

Returns the user defined character parameters

property user_defined_num_parameters: List[int][source]

Returns a list of user defined numeric parameters

property message_id: str[source]

Unique Message ID assigned during the request

property rg_state: str[source]

RGState value from the PowerOnResponse

property payload: str | None[source]

Returns the string within the <RGLines> node

MessageStatus

enum q2_cores.Symitar.models.message_status.MessageStatus(value)[source]

Bases: Enum

Enum of a SymConnect message status

Valid values are as follows:

Success = <MessageStatus.Success: 0>
Warning = <MessageStatus.Warning: 1>
Error = <MessageStatus.Error: 2>

MessageType

enum q2_cores.Symitar.models.message_type.MessageType(value)[source]

Bases: Enum

Enum for the different types of messages that can be received from Symitar SymConnect.

Valid values are as follows:

IQ = <MessageType.IQ: 'IQ'>
RSIQ = <MessageType.RSIQ: 'RSIQ'>
RG = <MessageType.RG: 'RG'>
RSRG = <MessageType.RSRG: 'RSRG'>
FM = <MessageType.FM: 'FM'>
RSFM = <MessageType.RSFM: 'RSFM'>
TR = <MessageType.TR: 'TR'>
RSTR = <MessageType.RSTR: 'RSTR'>
AD = <MessageType.AD: 'AD'>
RSAD = <MessageType.RSAD: 'RSAD'>
HANDSHAKE = <MessageType.HANDSHAKE: 'HANDSHAKE'>
RSHANDSHAKE = <MessageType.RSHANDSHAKE: 'RSHANDSHAKE'>
RSWHAT = <MessageType.RSWHAT: 'RSWHAT'>
enum q2_cores.Symitar.models.message_type.SymXchangeMessageType(value)[source]

Bases: Enum

Enum for the different types of messages that can be received from Symitar SymXchange.

Valid values are as follows:

POWERON = <SymXchangeMessageType.POWERON: '{http://www.symxchange.generated.symitar.com/poweron}executePowerOnResponse'>
GENERIC = <SymXchangeMessageType.GENERIC: ''>

OpenAccount

class q2_cores.Symitar.models.open_account_models.SymitarSubAccountDetails(share_id, share_desc, apy, maturity_date, div_rate, opening_amount)[source]

Bases: BaseSubAccountDetails

Parser

q2_cores.Symitar.models.parser.parse(message, unescape=True)[source]

Parse a Symitar message into a SymConnectMessage or a SymXchangeMessage object.

Parameters:
  • message (str) – The message to parse

  • unescape (bool) – Whether to unescape (xml) the message payload. Only relevant for SymXchange PowerOn message types.

Return type:

Union[SymConnectMessage, Type[SymXchangeMessage]]