refactored payment orchestration

This commit is contained in:
Stephan D
2026-02-03 00:40:46 +01:00
parent 05d998e0f7
commit 5e87e2f2f9
184 changed files with 3920 additions and 2219 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/tech/sendico/ledger/storage/model"
pkm "github.com/tech/sendico/pkg/model"
"github.com/tech/sendico/pkg/model/account_role"
"go.mongodb.org/mongo-driver/v2/bson"
)
@@ -38,7 +39,7 @@ type AccountsStore interface {
Create(ctx context.Context, account *pkm.LedgerAccount) error
Get(ctx context.Context, accountRef bson.ObjectID) (*pkm.LedgerAccount, error)
GetByAccountCode(ctx context.Context, orgRef bson.ObjectID, accountCode, currency string) (*pkm.LedgerAccount, error)
GetByRole(ctx context.Context, orgRef bson.ObjectID, currency string, role pkm.AccountRole) (*pkm.LedgerAccount, error)
GetByRole(ctx context.Context, orgRef bson.ObjectID, currency string, role account_role.AccountRole) (*pkm.LedgerAccount, error)
GetSystemAccount(ctx context.Context, purpose pkm.SystemAccountPurpose, currency string) (*pkm.LedgerAccount, error)
GetDefaultSettlement(ctx context.Context, orgRef bson.ObjectID, currency string) (*pkm.LedgerAccount, error)
ListByOrganization(ctx context.Context, orgRef bson.ObjectID, filter *AccountsFilter, limit int, offset int) ([]*pkm.LedgerAccount, error)