customerbalance

package
v1.35.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type CustomerBalance

type CustomerBalance struct {
	mixin.BaseModel

	CustomerId string        `json:"customerId"`
	Currency   currency.Type `json:"currency"`
	Balance    int64         `json:"balance"` // cents, positive = credit
}

CustomerBalance tracks a customer's stored-value balance per currency. Positive balance = credit available to settle invoices.

func New

func (*CustomerBalance) Defaults

func (cb *CustomerBalance) Defaults()

func (*CustomerBalance) Init

func (cb *CustomerBalance) Init(db *datastore.Datastore)

func (CustomerBalance) Kind

func (cb CustomerBalance) Kind() string

func (*CustomerBalance) Load

func (cb *CustomerBalance) Load(ps []datastore.Property) (err error)

func (*CustomerBalance) Save

func (cb *CustomerBalance) Save() (ps []datastore.Property, err error)

func (*CustomerBalance) Validator

func (cb *CustomerBalance) Validator() *val.Validator

Jump to

Keyboard shortcuts

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