components.payment_gateway.public.accounts ¶
This module defines the public API for the accounts subcomponent.
Only business logic is exposed here. Basic entities and enums are exposed in separate modules to avoid loading the entire subcomponent with its models and dependencies when they are not needed.
Classes¶
AccountHolderLogic ¶
This class is the public interface to the account holder logic.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/account_holders.py
Attributes¶
Functions¶
create
classmethod
¶
create_null
classmethod
¶
Null factory
declare_account_holder ¶
Declare an account holder.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/account_holders.py
get_account_holder ¶
Get an account holder entity from its ID.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/account_holders.py
get_account_holder_id_by_external_id ¶
Get an account holder entity from its external ID.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/account_holders.py
terminate_account_holder ¶
Terminate an account holder.
Account holders in terminal state cannot be modified or used anymore.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/account_holders.py
update_account_holder_legal_name ¶
Update the legal name of an account holder.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/account_holders.py
AccountHolderNotFoundException ¶
Bases: PaymentAccountException
Exception raised when trying to use a non-existing Account Holder.
AccountHolderTerminatedException ¶
Bases: PaymentAccountException
Exception raised when trying to use a terminated Account Holder.
AccountLogic ¶
This class is the public interface to the account logic.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
Attributes¶
Functions¶
activate_account ¶
Activate an account.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
create
classmethod
¶
create_account ¶
Create an account for an account holder.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
deactivate_account ¶
Deactivate an account.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
get_account ¶
Get an account entity from its ID.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
get_account_id_by_external_id ¶
Find an account using its external id.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
get_account_ids_for_account_holder ¶
Get all the account IDs for an account holder.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
get_accounts_for_account_holder ¶
Get all the accounts for an account holder.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
terminate_account ¶
Terminate an account.
Accounts in terminal state cannot be modified or used anymore.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
update_account ¶
Update the account description and reference
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/accounts.py
AccountNotFoundException ¶
Bases: PaymentAccountException
Exception raised when trying to use a non-existing Account.
AccountTerminatedException ¶
Bases: PaymentAccountException
Exception raised when trying to use a terminated Account.
InvalidAccountStatusTransitionException ¶
Bases: PaymentAccountException, ValueError
Exception raised when attempting an invalid Account status transition.
PaymentAccountException ¶
Bases: PaymentGatewayException
Base class for all Account exceptions.
SepaBeneficiaryLogic ¶
This class is the public interface to the SEPA beneficiaries logic.
Functions¶
create_sepa_beneficiary ¶
create_sepa_beneficiary(
session,
/,
account_id,
provider,
external_id,
issued_at,
name,
iban,
status=SepaBeneficiaryStatus.enabled,
)
Create a new SEPA beneficiary on the given account.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/sepa_beneficiaries.py
get_sepa_beneficiary ¶
Get a SEPA beneficiary entity from its ID.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/sepa_beneficiaries.py
get_sepa_beneficiary_by_external_id ¶
Find a SEPA beneficiary by its external ID.
Source code in components/payment_gateway/subcomponents/accounts/protected/business_logic/sepa_beneficiaries.py
set_sepa_beneficiary_status ¶
Update the status of the given SEPA beneficiary.