sepa_sctinst package¶
Submodules¶
sepa_sctinst.schema_validation module¶
- class sepa_sctinst.schema_validation.SchemaValidation¶
Bases:
objectA class to validate SCTInst messages
This object provide a schema validation method
- validate(data: str, payment_conf: sepa_sctinst.MessageConfiguration)¶
XSD Validation for SCTInst messages where data is a XML message as string, payment_conf is an sepa_sctinst.MessageConfiguration wich provide the schema to use for validation
Return: A dict with isValid key and error_messages key if isValid = False
sepa_sctinst.sct_inst_c2b module¶
- class sepa_sctinst.sct_inst_c2b.GroupHeader(message_identification: str, creation_datetime: datetime.datetime, init_party_name: str)¶
Bases:
objectA class to represent a group header in C2B SCTInst message Set of characteristics shared by all individual transactions included in the message.
- creation_datetime: datetime.datetime¶
Date and time at which the message was created.
- init_party_name: str¶
Name by which a party is known and which is usually used to identify that party.
- message_identification: str¶
Message Identification assigned by the instructing party, and sent to the next party in the chain to unambiguously identify the message.
- class sepa_sctinst.sct_inst_c2b.PaymentInformation(payment_id: str, batch_booking: bool, requ_exe_date: datetime.date)¶
Bases:
objectA class to represent a payment information in C2B SCTInst message
- batch_booking: bool¶
Identifies whether a single entry per individual transaction or a batch entry for the sum of the amounts of all transactions within the group of a message is requested.
- payment_id: str¶
Unique identification, as assigned by a sending party, to unambiguously identify the payment information group within the message.
- requ_exe_date: datetime.date¶
Date at which the initiating party requests the clearing agent to process the payment.
- class sepa_sctinst.sct_inst_c2b.SCTInstC2B(group_header: sepa_sctinst.sct_inst_c2b.GroupHeader, originator: sepa_sctinst.sct_inst_common.Participant, payment_information: sepa_sctinst.sct_inst_c2b.PaymentInformation, transactions: list)¶
Bases:
objectA class to represent a SCTInst C2B message
- add_transaction(transaction)¶
- group_header: sepa_sctinst.sct_inst_c2b.GroupHeader¶
sepa_sctinst.sct_inst_c2b.GroupHeader object shared by all individual transactions included in the message.
- originator: sepa_sctinst.sct_inst_common.Participant¶
Originator sepa_sctinst.sct_inst_c2b.Participant object that initiates the payment.
- payment_information: sepa_sctinst.sct_inst_c2b.PaymentInformation¶
sepa_sctinst.sct_inst_c2b.PaymentInformation object shared characteristics that applies to the debit side of the payment transactions.
- static random(nb_txs)¶
Generate random SCTInstC2B object
- Returns:
SCTInstC2B: SCTInstC2B object with random value
- sum_amounts()¶
- to_xml()¶
Generate message as XML Document Returns a string as XML dcoument
- transactions: list¶
List of all sepa_sctinst.sct_inst_c2b.Transaction
- xml_header(root_fito)¶
- xml_payment_information(root_fito)¶
- xml_transaction(root_fito, transaction)¶
- class sepa_sctinst.sct_inst_c2b.Transaction(beneficiary: sepa_sctinst.sct_inst_common.Participant, amount: float, end_to_end_id: str, remittance_information: str)¶
Bases:
objectA class to represent a transaction in C2B SCTInst message
- amount: float¶
The amount of the SCT Inst in Euro
- beneficiary: sepa_sctinst.sct_inst_common.Participant¶
Beneficiary informations as sepa_sctinst.sct_inst_c2b.Participant
- end_to_end_id: str¶
Unique identification assigned by the initiating party to unumbiguously identify the transaction.
- remittance_information: str¶
Information supplied to enable the matching of an entry with the items that the transfer is intended to settle, such as commercial invoices in an accounts’ receivable system.
sepa_sctinst.sct_inst_common module¶
- class sepa_sctinst.sct_inst_common.Participant(bic: str, iban: str, name: str)¶
Bases:
objectA class to represent a participant in interbank SCTInst message
- bic: str¶
The BIC code of the participant Bank
- iban: str¶
The IBAN of the account
- name: str¶
The name of the account
- static to_xml(payment, transaction_node: _elementtree.SubElement, transaction, stakeholder: str)¶
sepa_sctinst.sct_inst_interbank module¶
- class sepa_sctinst.sct_inst_interbank.GroupHeader(message_identification: str, creation_datetime: datetime.datetime, interbank_sttlmt_date: datetime.date, sttlmt_method: str)¶
Bases:
objectA class to represent the group header in interbank SCTInst message
Set of characteristics shared by all individual transactions included in the message.
- creation_datetime: datetime.datetime¶
Date and time at which the message was created.
- interbank_sttlmt_date: datetime.date¶
Date on which the amount of money ceases to be available to the agent that owes it and when the amount of money becomes available to the agent to which it is due.
- message_identification: str¶
Message Identification assigned by the instructing party, and sent to the next party in the chain to unambiguously identify the message.
- sttlmt_method: str¶
Method used to settle the (batch of) payment instructions.Only CLRG, INGA and INDA are allowed
- class sepa_sctinst.sct_inst_interbank.SCTInst(group_header: sepa_sctinst.sct_inst_interbank.GroupHeader, originator: sepa_sctinst.sct_inst_common.Participant, transaction: sepa_sctinst.sct_inst_interbank.Transaction)¶
Bases:
objectA class to represent a SCTInst interbank message
- group_header: sepa_sctinst.sct_inst_interbank.GroupHeader¶
sepa_sctinst.sct_inst.GroupHeader object shared by all individual transactions included in the message.
- originator: sepa_sctinst.sct_inst_common.Participant¶
Originator sepa_sctinst.sct_inst.Participant object that initiates the payment.
- static random()¶
Generate random SCTInst object
Returns sepa_sctinst.sct_inst.SCTInst object with random value
- to_xml()¶
Generate message as XML Document Returns a string as XML dcoument
- transaction: sepa_sctinst.sct_inst_interbank.Transaction¶
sepa_sctinst.sct_inst.Transaction object give information about the transaction.
- xml_header(root_fito)¶
- xml_transaction(root_fito)¶
- class sepa_sctinst.sct_inst_interbank.Transaction(beneficiary: sepa_sctinst.sct_inst_common.Participant, amount: float, end_to_end_id: str, tx_id: str, acceptance_datetime: datetime.datetime, reference: str, remittance_information: str)¶
Bases:
objectA class to represent a transaction in interbank SCTInst message
- acceptance_datetime: datetime.datetime¶
Point in time when the payment order from the initiating party meets the processing conditions of the account servicing agent.
- amount: float¶
The amount of the SCT Inst in Euro
- beneficiary: sepa_sctinst.sct_inst_common.Participant¶
Beneficiary informations as sepa_sctinst.sct_inst.Participant
- end_to_end_id: str¶
Original End To End Identification. Unique identification, as assigned by the original initiating party
- reference: str¶
Reference information provided by the creditor to allow the identification of the underlying documents.
- remittance_information: str¶
Remittance information
- tx_id: str¶
Original Transaction Identification. Unique identification, as assigned by the original first instructing agent
Module contents¶
- class sepa_sctinst.Message¶
Bases:
objectAll sepa_sctinst.MessageConfiguration objects available on the SCTInst scheme (Interbank and C2B)
- NEGATIVE_STATUS = <sepa_sctinst.MessageConfiguration object>¶
- POSITIVE_STATUS = <sepa_sctinst.MessageConfiguration object>¶
- RECALL = <sepa_sctinst.MessageConfiguration object>¶
- RECALL_NEG = <sepa_sctinst.MessageConfiguration object>¶
- RECALL_POS = <sepa_sctinst.MessageConfiguration object>¶
- RECALL_STATUS_INV = <sepa_sctinst.MessageConfiguration object>¶
- RFRO = <sepa_sctinst.MessageConfiguration object>¶
- RFRO_NEG = <sepa_sctinst.MessageConfiguration object>¶
- RFRO_POS = <sepa_sctinst.MessageConfiguration object>¶
- RFRO_STATUS_INV = <sepa_sctinst.MessageConfiguration object>¶
- SCTINST = <sepa_sctinst.MessageConfiguration object>¶
- SCTINST_C2B = <sepa_sctinst.MessageConfiguration object>¶
- SCTINST_C2B_BACK = <sepa_sctinst.MessageConfiguration object>¶
- SCTINST_C2B_STATUS = <sepa_sctinst.MessageConfiguration object>¶
- SCTINST_STATUS_INV = <sepa_sctinst.MessageConfiguration object>¶
- class sepa_sctinst.MessageConfiguration(code: str, xsd_filepath: str, xmlns: str)¶
Bases:
objectA class to describe message configuration.
A message configuration object provide all characteristics needed to validate a xml message.
- static autodetect(data)¶
Return the sepa_sctinst.MessageConfiguration object associated to the data parameter by matching with the xmlns attribute
- code: str¶
Code is a mnemonic value for a specific message
- xmlns: str¶
XML namespace
- xsd_filepath: str¶
Relative path to the XSD file