29 lines
1.0 KiB
Go
29 lines
1.0 KiB
Go
package quotation
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/tech/sendico/payments/storage/model"
|
|
sharedv1 "github.com/tech/sendico/pkg/proto/payments/shared/v1"
|
|
)
|
|
|
|
// RouteStore exposes routing definitions for plan construction.
|
|
type RouteStore interface {
|
|
List(ctx context.Context, filter *model.PaymentRouteFilter) (*model.PaymentRouteList, error)
|
|
}
|
|
|
|
// PlanTemplateStore exposes orchestration plan templates for plan construction.
|
|
type PlanTemplateStore interface {
|
|
List(ctx context.Context, filter *model.PaymentPlanTemplateFilter) (*model.PaymentPlanTemplateList, error)
|
|
}
|
|
|
|
// GatewayRegistry exposes gateway instances for capability-based selection.
|
|
type GatewayRegistry interface {
|
|
List(ctx context.Context) ([]*model.GatewayInstanceDescriptor, error)
|
|
}
|
|
|
|
// PlanBuilder constructs ordered payment plans from intents, quotes, and routing policy.
|
|
type PlanBuilder interface {
|
|
Build(ctx context.Context, payment *model.Payment, quote *sharedv1.PaymentQuote, routes RouteStore, templates PlanTemplateStore, gateways GatewayRegistry) (*model.PaymentPlan, error)
|
|
}
|