plan

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnoreFieldMismatch = datastore.IgnoreFieldMismatch

Functions

func Query

Types

type Plan

type Plan struct {
	mixin.Model[Plan]

	// Unique human readable id
	Slug string `json:"slug"`
	// Internal id
	SKU string `json:"sku"`

	// Human readable name
	Name        string `json:"name"`
	Description string `json:"description"`

	Price           currency.Cents `json:"price"`
	Currency        currency.Type  `json:"currency"`
	Interval        Interval       `json:"interval"`
	IntervalCount   int            `json:"intervalCount"`
	TrialPeriodDays int            `json:"trialPeriodDays"`

	Metadata  Map    `json:"metadata" datastore:"-"`
	Metadata_ string `json:"-" datastore:"-"`

	Ref refs.EcommerceRef `json:"ref,omitempty"`
}

func Fake

func Fake(db *datastore.Datastore) *Plan

func New

func New(db *datastore.Datastore) *Plan

func (*Plan) Load

func (p *Plan) Load(ps []datastore.Property) (err error)

func (*Plan) Save

func (p *Plan) Save() (ps []datastore.Property, err error)

func (*Plan) Validator

func (p *Plan) Validator() *val.Validator

Jump to

Keyboard shortcuts

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