recognizer

package
v1.0.0-beta.228 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ledger             ledger.Ledger
	Dependencies       transactions.ResolverDependencies
	Lineage            lineage.Service
	TransactionManager transaction.Creator
}

func (Config) Validate

func (c Config) Validate() error

type NoopService

type NoopService struct{}

NoopService returns zero results for all operations. Useful for tests that don't exercise revenue recognition.

type RecognizeEarningsInput

type RecognizeEarningsInput struct {
	CustomerID customer.CustomerID
	At         time.Time
	Currency   currencyx.Code
}

RecognizeEarningsInput is the input for RecognizeEarnings.

func (RecognizeEarningsInput) Validate

func (i RecognizeEarningsInput) Validate() error

type RecognizeEarningsResult

type RecognizeEarningsResult struct {
	RecognizedAmount alpacadecimal.Decimal
	LedgerGroupID    string
}

RecognizeEarningsResult contains the result of a recognition run.

type Service

type Service interface {
	RecognizeEarnings(ctx context.Context, in RecognizeEarningsInput) (RecognizeEarningsResult, error)
}

func NewService

func NewService(config Config) (Service, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL