Skip to content

Models

components.payment_gateway.subcomponents.payments.models.helpers

load_all_models

load_all_models()
Source code in components/payment_gateway/subcomponents/payments/models/helpers.py
def load_all_models() -> list[type[DbModel]]:
    from components.payment_gateway.subcomponents.payments.models.payment_request import (
        PaymentRequest,
    )

    return [
        PaymentRequest,
    ]

components.payment_gateway.subcomponents.payments.models.payment_request

PaymentRequest

Bases: ProviderEntityMixin, BaseModel

__table_args__

__table_args__()
Source code in components/payment_gateway/subcomponents/payments/models/payment_request.py
@declared_attr.directive
def __table_args__(cls) -> tuple[Any, ...]:
    return cls._provider_entity_mixin_table_args() + (
        {"schema": PAYMENT_GATEWAY_SCHEMA_NAME},
    )

__tablename__ class-attribute instance-attribute

__tablename__ = 'payment_request'

account class-attribute instance-attribute

account = relationship(Account, foreign_keys=[account_id])

account_id class-attribute instance-attribute

account_id = mapped_column(
    UUID(as_uuid=True),
    ForeignKey(id),
    index=True,
    nullable=False,
)

amount class-attribute instance-attribute

amount = mapped_column(Integer, nullable=True)

Amount of the payment request (in minor units).

bank_transfer class-attribute instance-attribute

bank_transfer = relationship(
    BankTransfer, foreign_keys=[bank_transfer_id]
)

bank_transfer_id class-attribute instance-attribute

bank_transfer_id = mapped_column(
    UUID(as_uuid=True),
    ForeignKey(id),
    index=True,
    nullable=True,
)

currency class-attribute instance-attribute

currency = mapped_column(String(length=3), nullable=True)

Currency of the payment request, represented as a 3-letter ISO 4217 code.

raw class-attribute instance-attribute

raw = mapped_column_with_privacy(
    JSONB(none_as_null=True),
    nullable=True,
    privacy_properties=PrivacyProperties(
        other,
        PassThrough(),
        PassThrough(),
        AlwaysNone(),
        PassThrough(),
    ),
)

Raw data from the payment provider.

reference class-attribute instance-attribute

reference = mapped_column(Text, nullable=True, index=True)

Reference of the payment request.

type class-attribute instance-attribute

type = mapped_column(Text, nullable=False)

Type of payment ex: direct_debit, wire_transfer ...