customerbalance

package
v1.37.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 5 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.Model[CustomerBalance]

	CustomerId string        `json:"customerId"`
	Currency   currency.Type `json:"currency" orm:"default:usd"`
	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) 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