Routers
AccountTransferRouter ¶
Bases: ABC
Router for the account transfer processor to route the account transfers (a.k.a. Adyen's "internalTransfer") to the appropriate entities
Note: the source or the destination account must be a known account to the Payment Gateway
route
abstractmethod
¶
Route an account transfer to the appropriate entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
direction
|
TransferDirection
|
The transfer direction |
required |
reference
|
str
|
The transfer reference; this is mostly used for tracking and reconciliation |
required |
account_id
|
AccountId
|
The ID of the account involved in the transfer |
required |
effective_date
|
datetime
|
The effective date at which the transfer occurred |
required |
Returns:
| Type | Description |
|---|---|
AccountTransferRoutingResult
|
The entities with which the transfer should be associated. |
Source code in components/payment_gateway/subcomponents/transfers/protected/routers.py
AccountTransferRoutingResult
dataclass
¶
BankTransferRouter ¶
Bases: ABC
Router for the bank transfer processor to route the bank transfers (a.k.a. Adyen's "bankTransfer") to the appropriate entities
route
abstractmethod
¶
Route a bank transfer to the appropriate entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
direction
|
TransferDirection
|
The transfer direction |
required |
account_id
|
AccountId
|
The ID of the account involved in the transfer |
required |
effective_date
|
datetime
|
The effective date at which the transfer occurred |
required |
Returns:
| Type | Description |
|---|---|
BankTransferRoutingResult
|
The entities with which the transfer should be associated. |
Source code in components/payment_gateway/subcomponents/transfers/protected/routers.py
BankTransferRoutingResult
dataclass
¶
Result of the bank transfer routing.
CardTransferRouter ¶
Bases: ABC
Router for the card transfer processor to route the card transfers (a.k.a. Adyen's "payment") to the appropriate entities
route
abstractmethod
¶
Route a card transfer to the appropriate entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
card_id
|
CardId
|
The ID of the card involved in the transfer |
required |
merchant_info
|
MerchantInfo
|
Info about the merchant involved in the transfer |
required |
effective_date
|
datetime
|
The effective date at which the transfer occurred |
required |
transfer_status
|
str
|
The status of the transfer |
required |
transfer_external_id
|
str
|
The external ID of the transfer |
required |
Returns:
| Type | Description |
|---|---|
CardTransferRoutingResult
|
The entities with which the transfer should be associated. |
Source code in components/payment_gateway/subcomponents/transfers/protected/routers.py
CardTransferRoutingResult
dataclass
¶
CardTransferRoutingResult(
transfer_history_id,
ledger_id=None,
expense_category_ids=None,
line_of_credit_ids=None,
)
Result of the card transfer routing.
expense_category_ids
class-attribute
instance-attribute
¶
Expense Category IDs the transfer should match.
Can be None if the transfer does not belong to any Expense Category, which
can happen for declined or refused transfer.
ledger_id
class-attribute
instance-attribute
¶
Ledger ID the transfer should affect.
Can be None if the transfer does not affect a Ledger, or if the Transfer
History is not associated with a Ledger.
line_of_credit_ids
class-attribute
instance-attribute
¶
Line of Credit IDs the transfer should affect.
Can be None if the transfer does not match any Line of Credit, which can
happen for unknown cards or unsupported Expense Categories.
transfer_history_id
instance-attribute
¶
Transfer History ID the transfer should belong to.