lineengine

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: 11 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 {
	SplitLineGroupAdapter SplitLineGroupAdapter
	QuantitySnapshotter   QuantitySnapshotter
	RatingService         rating.Service
}

func (Config) Validate

func (c Config) Validate() error

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Engine, error)

func (*Engine) BuildStandardInvoiceLines

func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)

func (*Engine) CalculateLines

func (e *Engine) CalculateLines(input billing.CalculateLinesInput) (billing.StandardLines, error)

func (*Engine) GetLineEngineType

func (e *Engine) GetLineEngineType() billing.LineEngineType

func (*Engine) IsLineBillableAsOf

func (e *Engine) IsLineBillableAsOf(_ context.Context, input billing.IsLineBillableAsOfInput) (bool, error)

func (*Engine) OnCollectionCompleted

func (e *Engine) OnCollectionCompleted(ctx context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error)

func (*Engine) OnInvoiceIssued

func (e *Engine) OnInvoiceIssued(_ context.Context, _ billing.OnInvoiceIssuedInput) error

func (*Engine) OnMutableStandardLinesDeleted

func (e *Engine) OnMutableStandardLinesDeleted(_ context.Context, _ billing.OnMutableStandardLinesDeletedInput) error

func (*Engine) OnPaymentAuthorized

func (e *Engine) OnPaymentAuthorized(_ context.Context, _ billing.OnPaymentAuthorizedInput) error

func (*Engine) OnPaymentSettled

func (e *Engine) OnPaymentSettled(_ context.Context, _ billing.OnPaymentSettledInput) error

func (*Engine) OnStandardInvoiceCreated

func (e *Engine) OnStandardInvoiceCreated(_ context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error)

func (*Engine) OnUnsupportedCreditNote

func (e *Engine) OnUnsupportedCreditNote(_ context.Context, _ billing.OnUnsupportedCreditNoteInput) error

func (*Engine) ResolveSplitLineGroupHeaders

func (e *Engine) ResolveSplitLineGroupHeaders(ctx context.Context, ns string, lines billing.StandardLines) error

type QuantitySnapshotter

type QuantitySnapshotter interface {
	SnapshotLineQuantities(ctx context.Context, invoice billing.StandardInvoice, lines billing.StandardLines) error
}

type SplitLineGroupAdapter

type SplitLineGroupAdapter interface {
	CreateSplitLineGroup(ctx context.Context, input billing.CreateSplitLineGroupAdapterInput) (billing.SplitLineGroup, error)
	GetSplitLineGroupHeaders(ctx context.Context, input billing.GetSplitLineGroupHeadersInput) (billing.SplitLineGroupHeaders, error)
}

Jump to

Keyboard shortcuts

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