Actions
components.payment_gateway.subcomponents.parties.protected.business_logic.actions.financial_instrument_actions ¶
FinancialInstrumentActions ¶
Actions for financial instrument operations.
Source code in components/payment_gateway/subcomponents/parties/protected/business_logic/actions/financial_instrument_actions.py
create
classmethod
¶
create_iban_account_financial_instrument ¶
create_iban_account_financial_instrument(
session,
/,
*,
legal_entity_id,
iban,
bank_country_code,
bic,
)
Create an IBAN account financial instrument for the given legal entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQLAlchemy session to use for DB operations. |
required |
legal_entity_id
|
LegalEntityId
|
ID of the legal entity owning the financial instrument. |
required |
iban
|
str
|
IBAN of the bank account. |
required |
bank_country_code
|
str
|
Country code of the bank in ISO 3166-1 alpha-2 format. |
required |
bic
|
str | None
|
BIC/SWIFT code of the bank. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FinancialInstrumentId |
FinancialInstrumentId
|
ID of the newly created financial instrument. |
Source code in components/payment_gateway/subcomponents/parties/protected/business_logic/actions/financial_instrument_actions.py
create_null
classmethod
¶
terminate_financial_instrument ¶
Terminate a financial instrument.
The operation is idempotent, i.e. it has no effect on already terminated entities.
Financial instruments in terminal state cannot be modified or used anymore.
Any attempt to use or retrieve a terminated financial instrument will raise a
FinancialInstrumentTerminatedException.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
SQLAlchemy session to use for DB operations. |
required |
id
|
FinancialInstrumentId
|
ID of the financial instrument to terminate. |
required |
Source code in components/payment_gateway/subcomponents/parties/protected/business_logic/actions/financial_instrument_actions.py
components.payment_gateway.subcomponents.parties.protected.business_logic.actions.legal_entity_actions ¶
LegalEntityActions ¶
Actions for legal entity operations.
Source code in components/payment_gateway/subcomponents/parties/protected/business_logic/actions/legal_entity_actions.py
create
classmethod
¶
create_null
classmethod
¶
terminate_legal_entity ¶
Terminate a legal entity.
The operation is idempotent, i.e. it has no effect on already terminated entities.
Legal entities in terminal state cannot be modified or used anymore. Any
attempt to use or retrieve a terminated legal entity will raise a
LegalEntityTerminatedException.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
The session to use for the database operations. |
required |
id
|
LegalEntityId
|
The ID of the legal entity to terminate. |
required |
Source code in components/payment_gateway/subcomponents/parties/protected/business_logic/actions/legal_entity_actions.py
upsert_legal_entity ¶
upsert_legal_entity(
session,
/,
*,
unique_key,
entity_type,
legal_name,
first_name,
last_name,
legal_country_code,
address_street,
address_street_2,
address_city,
address_postal_code,
address_country_code,
address_subdivision_code,
)
Upsert a legal entity.
This is a full upsert operation. All fields must be provided and will override the existing values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
The session to use for the database operations. |
required |
unique_key
|
str
|
The unique key of the legal entity. If a legal entity with the same unique key already exists, it will be updated. Otherwise, a new legal entity will be created. |
required |
entity_type
|
LegalEntityType
|
The type of the legal entity. |
required |
legal_name
|
str
|
The legal name of the legal entity. |
required |
first_name
|
str | None
|
The first name of the legal entity (persons only). |
required |
last_name
|
str | None
|
The last name of the legal entity (persons only). |
required |
legal_country_code
|
str
|
The country code of the legal entity in ISO 3166-1 alpha-2 format. |
required |
address_street
|
str | None
|
The street address of the legal entity. |
required |
address_street_2
|
str | None
|
The street address 2 of the legal entity (apartment, floor, building, etc.). |
required |
address_city
|
str | None
|
The city name of the legal entity. |
required |
address_postal_code
|
str | None
|
The postal/ZIP code of the legal entity. |
required |
address_country_code
|
str
|
The country of the physical address of the legal entity in ISO 3166-1 alpha-2 format. |
required |
address_subdivision_code
|
str | None
|
The state/province/territory code of the legal entity in ISO 3166-2 format (e.g., "CA-ON", "FR-PF", "US-NY"). |
required |