29 lines
852 B
Go
29 lines
852 B
Go
package quotation
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/tech/sendico/payments/quotation/internal/service/plan"
|
|
"github.com/tech/sendico/payments/storage/model"
|
|
"github.com/tech/sendico/pkg/mlogger"
|
|
)
|
|
|
|
func railFromEndpoint(endpoint model.PaymentEndpoint, attrs map[string]string, isSource bool) (model.Rail, string, error) {
|
|
return plan.RailFromEndpoint(endpoint, attrs, isSource)
|
|
}
|
|
|
|
func resolveRouteNetwork(attrs map[string]string, sourceNetwork, destNetwork string) (string, error) {
|
|
return plan.ResolveRouteNetwork(attrs, sourceNetwork, destNetwork)
|
|
}
|
|
|
|
func selectPlanTemplate(
|
|
ctx context.Context,
|
|
logger mlogger.Logger,
|
|
templates plan.PlanTemplateStore,
|
|
sourceRail model.Rail,
|
|
destRail model.Rail,
|
|
network string,
|
|
) (*model.PaymentPlanTemplate, error) {
|
|
return plan.SelectTemplate(ctx, logger, templates, sourceRail, destRail, network)
|
|
}
|