task_billing_setting

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate(input types.TaskBillingInput, groupRatio float64) (*types.TaskBillingResult, error)

func GetRateCardsCopy

func GetRateCardsCopy() map[string]RateCard

func HasRateCard

func HasRateCard(models ...string) bool

func ValidateRateCardsJSON

func ValidateRateCardsJSON(raw string) error

Types

type RateCard

type RateCard struct {
	Vendor          string            `json:"vendor,omitempty"`
	Unit            string            `json:"unit,omitempty"`
	QuantityField   string            `json:"quantity_field,omitempty"`
	DefaultQuantity float64           `json:"default_quantity,omitempty"`
	Strict          bool              `json:"strict"`
	Defaults        map[string]string `json:"defaults,omitempty"`
	Rows            []RateCardRow     `json:"rows"`
}

func GetRateCardCopy

func GetRateCardCopy(models ...string) (*RateCard, string)

type RateCardRow

type RateCardRow struct {
	ID        string            `json:"id,omitempty"`
	Match     map[string]string `json:"match"`
	UnitPrice float64           `json:"unit_price"`
}

type TaskBillingSetting

type TaskBillingSetting struct {
	RateCards map[string]RateCard `json:"rate_cards"`
}

Jump to

Keyboard shortcuts

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