BankInfo¶
- class en16931.BankInfo(account=None, iban=None, bic=None, mandate_reference_identifier=None)¶
BankInfo class.
Stores relevant banking information of
Entity
to specify the needed information when the payment means of the invoice involves a Bank.You can initialize a BankInfo instance with all needed attributes:
>>> b = BankInfo(account="1234567321", bic="AAAABBCCDDD", ... mandate_reference_identifier="123")
Or build it, step by step:
>>> b = BankInfo() >>> b.account = "1234567321" >>> b.bic = "AAAABBCCDDD" >>> b.mandate_reference_identifier = "123"
For the bank information to be complete it has to contain the IBAN number, or the bank account and the BIC. The mandate reference identifier is used in the context of debit payments.
>>> b.is_valid() True
- __init__(account=None, iban=None, bic=None, mandate_reference_identifier=None)¶
Initialize the Bank Information for an Entity.
- Parameters:
account (string (optional)) – The bank account number.
bic (string (optional)) – The Bank Identification Code of the account.
iban (string (optional)) – The International Bank Account Number (IBAN)
mandate_reference_identifier (string (optional)) – The Mandate Reference Identifier
Notes
For the bank information to be complete it has to contain the IBAN number, or the bank account and the BIC. The mandate reference identifier is used in the context of debit payments.
- __weakref__¶
list of weak references to the object (if defined)
- property account¶
Bank account number
- Parameters:
account (string) – The bank account number.
Notes
No validation of the bank account number is performed.
- Type:
Property
- property bic¶
The Bank Identification Code
Also known as SWIFT code.
- Parameters:
bic (string) – The Bank Identification Code of the account.
- Raises:
ValueError – If the BIC code is not valid.
Notes
A BIC code has either 8 or 11 characters without dashes and spaces.
- Type:
Property
- has_mandate_reference()¶
Returns True if it has a mandate reference identifier.
This is necessary for debit payments.
- property iban¶
The International Bank Account Number (IBAN)
- Parameters:
iban (string) – The International Bank Account Number (IBAN)
Notes
No validation of the IBAN is performed.
- Type:
Property
- is_valid()¶
Returns True if the information is complete.
A valid bank information for an
Entity
must have a bank account and a BIC or an IBAN.
- property mandate_reference_identifier¶
The Mandate Reference Identifier
The Mandate Reference Identifier is necessary for debit payments.
- Parameters:
mandate_reference_identifier (string) – The Mandate Reference Identifier
- Type:
Property