lineengine

package
v1.0.0-beta.233 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 22 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
	RatingService                rating.Service
	FeatureMeterResolver         *billingfeaturemeterservice.Resolver
	StreamingConnector           streaming.Connector
	MaxParallelQuantitySnapshots int
}

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) AreLinesBillableAsOf

func (*Engine) BuildStandardInvoiceLines

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

func (*Engine) BuildStandardLinesForGatheringPreview

func (e *Engine) BuildStandardLinesForGatheringPreview(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) OnCollectionCompleted

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

func (*Engine) OnInvoiceFinalizing

func (e *Engine) OnInvoiceFinalizing(_ context.Context, input billing.OnInvoiceFinalizingInput) (billing.StandardLines, error)

func (*Engine) OnInvoiceIssued

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

func (*Engine) OnMutableStandardLinesDeletedBySystem

func (e *Engine) OnMutableStandardLinesDeletedBySystem(_ 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

func (*Engine) SnapshotLineQuantities

func (e *Engine) SnapshotLineQuantities(ctx context.Context, invoice billing.StandardInvoice, lines billing.StandardLines) error

func (*Engine) SnapshotLineQuantity

func (e *Engine) SnapshotLineQuantity(ctx context.Context, input SnapshotLineQuantityInput) (*billing.StandardLine, error)

func (*Engine) ValidateMutableInvoiceLineEditViaAPI

func (e *Engine) ValidateMutableInvoiceLineEditViaAPI(_ context.Context, input billing.OnMutableInvoiceUpdateInput) error

type SnapshotLineQuantityInput

type SnapshotLineQuantityInput struct {
	Invoice *billing.StandardInvoice
	Line    *billing.StandardLine
}

func (SnapshotLineQuantityInput) Validate

func (i SnapshotLineQuantityInput) Validate() 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