Orchestrator refactoring + planned amounts
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/tech/sendico/payments/quotation/internal/shared"
|
||||
"github.com/tech/sendico/payments/storage/model"
|
||||
"github.com/tech/sendico/pkg/merrors"
|
||||
paymenttypes "github.com/tech/sendico/pkg/payments/types"
|
||||
@@ -23,10 +24,7 @@ type moneyGetter interface {
|
||||
}
|
||||
|
||||
func cloneMoney(input *paymenttypes.Money) *paymenttypes.Money {
|
||||
if input == nil {
|
||||
return nil
|
||||
}
|
||||
return &paymenttypes.Money{Currency: input.GetCurrency(), Amount: input.GetAmount()}
|
||||
return shared.CloneModelMoneyRaw(input)
|
||||
}
|
||||
|
||||
func cloneStringList(values []string) []string {
|
||||
@@ -100,10 +98,7 @@ func protoMoney(m *paymenttypes.Money) *moneyv1.Money {
|
||||
}
|
||||
|
||||
func cloneProtoMoney(input *moneyv1.Money) *moneyv1.Money {
|
||||
if input == nil {
|
||||
return nil
|
||||
}
|
||||
return &moneyv1.Money{Currency: input.GetCurrency(), Amount: input.GetAmount()}
|
||||
return shared.CloneProtoMoneyRaw(input)
|
||||
}
|
||||
|
||||
func decimalFromProto(value *moneyv1.Decimal) *paymenttypes.Decimal {
|
||||
|
||||
Reference in New Issue
Block a user