TG settlement service
This commit is contained in:
@@ -26,6 +26,10 @@ var (
|
||||
ErrRouteNotFound = storageError("payments.orchestrator.storage: route not found")
|
||||
// ErrDuplicateRoute signals that a route already exists for the same transition.
|
||||
ErrDuplicateRoute = storageError("payments.orchestrator.storage: duplicate route")
|
||||
// ErrPlanTemplateNotFound signals that a plan template record does not exist.
|
||||
ErrPlanTemplateNotFound = storageError("payments.orchestrator.storage: plan template not found")
|
||||
// ErrDuplicatePlanTemplate signals that a plan template already exists for the same transition.
|
||||
ErrDuplicatePlanTemplate = storageError("payments.orchestrator.storage: duplicate plan template")
|
||||
)
|
||||
|
||||
// Repository exposes persistence primitives for the orchestrator domain.
|
||||
@@ -34,6 +38,7 @@ type Repository interface {
|
||||
Payments() PaymentsStore
|
||||
Quotes() QuotesStore
|
||||
Routes() RoutesStore
|
||||
PlanTemplates() PlanTemplatesStore
|
||||
}
|
||||
|
||||
// PaymentsStore manages payment lifecycle state.
|
||||
@@ -59,3 +64,11 @@ type RoutesStore interface {
|
||||
GetByID(ctx context.Context, id primitive.ObjectID) (*model.PaymentRoute, error)
|
||||
List(ctx context.Context, filter *model.PaymentRouteFilter) (*model.PaymentRouteList, error)
|
||||
}
|
||||
|
||||
// PlanTemplatesStore manages orchestration plan templates.
|
||||
type PlanTemplatesStore interface {
|
||||
Create(ctx context.Context, template *model.PaymentPlanTemplate) error
|
||||
Update(ctx context.Context, template *model.PaymentPlanTemplate) error
|
||||
GetByID(ctx context.Context, id primitive.ObjectID) (*model.PaymentPlanTemplate, error)
|
||||
List(ctx context.Context, filter *model.PaymentPlanTemplateFilter) (*model.PaymentPlanTemplateList, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user