Models
components.payment_gateway.subcomponents.banking_documents.models.helpers ¶
load_all_models ¶
Source code in components/payment_gateway/subcomponents/banking_documents/models/helpers.py
components.payment_gateway.subcomponents.banking_documents.models.sepa_mandate ¶
SepaMandate ¶
Bases: BaseModel
__table_args__
class-attribute
instance-attribute
¶
__table_args__ = (
UniqueConstraint(
"provider",
"external_id",
name="sepa_mandate__unique_external_id_per_provider",
),
{"schema": PAYMENT_GATEWAY_SCHEMA_NAME},
)
account_holder
class-attribute
instance-attribute
¶
account_holder = relationship(
AccountHolder,
foreign_keys=account_holder_id,
back_populates="sepa_mandates",
)
account_holder_id
class-attribute
instance-attribute
¶
bank_transfers
class-attribute
instance-attribute
¶
bank_transfers = relationship(
"BankTransfer",
back_populates="sepa_mandate",
order_by="BankTransfer.created_at.desc()",
uselist=True,
viewonly=True,
)
current_status_log
class-attribute
instance-attribute
¶
current_status_log = relationship(
"SepaMandateStatusLog",
uselist=False,
viewonly=True,
primaryjoin="and_( SepaMandateStatusLog.sepa_mandate_id == SepaMandate.id, SepaMandateStatusLog.created_at == ( select(func.max(SepaMandateStatusLog.created_at)) .where(SepaMandateStatusLog.sepa_mandate_id == SepaMandate.id) .correlate(SepaMandate) .scalar_subquery() ))",
)
debtor_country
class-attribute
instance-attribute
¶
The country of residence of the debtor as specified in the mandate.
debtor_iban
class-attribute
instance-attribute
¶
debtor_iban = mapped_column_with_privacy(
String(34),
nullable=False,
privacy_properties=PrivacyProperties(
other,
NoneOrPrefixRedactedHashed(keep_prefix_length=9),
NoneOrPrefixRedactedHashed(keep_prefix_length=9),
CustomSQL(IBAN_CUSTOM_SQL),
PassThrough(),
),
)
The IBAN the mandate is issued for.
debtor_name
class-attribute
instance-attribute
¶
The name of the debtor as specified in the mandate.
external_id
class-attribute
instance-attribute
¶
ID used by the external payment service provider to identify the SEPA mandate.
provider
class-attribute
instance-attribute
¶
The payment service provider the SEPA mandate is issued for.
sepa_creditor_identifier
class-attribute
instance-attribute
¶
SCI (ICS in French - Identifiant CrΓ©ancier SEPA).
status_history
class-attribute
instance-attribute
¶
status_history = relationship(
"SepaMandateStatusLog",
back_populates="sepa_mandate",
order_by="SepaMandateStatusLog.created_at.desc()",
uselist=True,
viewonly=True,
)
unique_mandate_reference
class-attribute
instance-attribute
¶
Unique mandate reference (known as RUM in French - RΓ©fΓ©rence Unique de Mandat)
validate_provider
class-attribute
instance-attribute
¶
SepaMandateStatusLog ¶
Bases: BaseModel
__repr__ ¶
__table_args__
class-attribute
instance-attribute
¶
sepa_mandate
class-attribute
instance-attribute
¶
sepa_mandate = relationship(
SepaMandate,
foreign_keys=sepa_mandate_id,
back_populates="status_history",
)