billingworkeradvance

package
v1.0.0-beta.189 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoAdvancer

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

func NewAdvancer

func NewAdvancer(config Config) (*AutoAdvancer, error)

func (*AutoAdvancer) AdvanceInvoice

func (a *AutoAdvancer) AdvanceInvoice(ctx context.Context, id billing.InvoiceID) (billing.Invoice, error)

func (*AutoAdvancer) All

func (a *AutoAdvancer) All(ctx context.Context, namespaces []string, batchSize int) error

All runs auto-advance for all eligible invoices

func (*AutoAdvancer) ListInvoicesPendingAutoAdvance

func (a *AutoAdvancer) ListInvoicesPendingAutoAdvance(ctx context.Context, namespaces []string, ids []string) ([]billing.Invoice, error)

ListInvoicesPendingAutoAdvance lists invoices that are due to be auto-advanced

func (*AutoAdvancer) ListInvoicesToAdvance

func (a *AutoAdvancer) ListInvoicesToAdvance(ctx context.Context, namespace []string, ids []string) ([]billing.Invoice, error)

func (*AutoAdvancer) ListStuckInvoicesNeedingAdvance

func (a *AutoAdvancer) ListStuckInvoicesNeedingAdvance(ctx context.Context, namespaces []string, ids []string) ([]billing.Invoice, error)

ListStuckInvoicesNeedingAdvance lists invoices that are stuck in some advancable state (this is a fail-safe mechanism)

type Config

type Config struct {
	BillingService billing.Service
	Logger         *slog.Logger
}

Jump to

Keyboard shortcuts

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