MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / ToBalance

Method ToBalance

api/model/model.go:213–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211}
212
213func (b *CreateBalance) ToBalance() model.Balance {
214 allocationStrategy := b.AllocationStrategy
215 if allocationStrategy == "" {
216 allocationStrategy = "FIFO"
217 }
218 return model.Balance{LedgerID: b.LedgerId, IdentityID: b.IdentityId, Currency: b.Currency, MetaData: b.MetaData, CurrencyMultiplier: b.Precision, TrackFundLineage: b.TrackFundLineage, AllocationStrategy: allocationStrategy}
219}
220
221func (b *CreateBalanceMonitor) ToBalanceMonitor() model.BalanceMonitor {
222 return model.BalanceMonitor{BalanceID: b.BalanceId, Condition: model.AlertCondition{

Callers 2

CreateBalanceMethod · 0.95
TestToBalanceFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestToBalanceFunction · 0.76