billing

package
v1.0.0-beta.202 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinimalCreateProfileInputTemplate = billing.CreateProfileInput{
	Name:    "Awesome Profile",
	Default: true,

	WorkflowConfig: billing.WorkflowConfig{
		Collection: billing.CollectionConfig{
			Alignment: billing.AlignmentKindSubscription,
			Interval:  lo.Must(isodate.String("PT2H").Parse()),
		},
		Invoicing: billing.InvoicingConfig{
			AutoAdvance: true,
			DraftPeriod: lo.Must(isodate.String("P1D").Parse()),
			DueAfter:    lo.Must(isodate.String("P1W").Parse()),
		},
		Payment: billing.PaymentConfig{
			CollectionMethod: billing.CollectionMethodChargeAutomatically,
		},
	},

	Supplier: billing.SupplierContact{
		Name: "Awesome Supplier",
		Address: models.Address{
			Country: lo.ToPtr(models.CountryCode("US")),
		},
	},

	Apps: billing.CreateProfileAppsInput{
		Invoicing: billing.AppReference{
			Type: app.AppTypeSandbox,
		},
		Payment: billing.AppReference{
			Type: app.AppTypeSandbox,
		},
		Tax: billing.AppReference{
			Type: app.AppTypeSandbox,
		},
	},
}

Functions

This section is empty.

Types

type BaseSuite

type BaseSuite struct {
	suite.Suite
	*require.Assertions

	TestDB   *testutils.TestDB
	DBClient *db.Client

	BillingAdapter    billing.Adapter
	BillingService    billing.Service
	InvoiceCalculator *invoicecalc.MockableInvoiceCalculator

	FeatureService         feature.FeatureConnector
	FeatureRepo            feature.FeatureRepo
	MeterAdapter           *meteradapter.TestAdapter
	MockStreamingConnector *streamingtestutils.MockStreamingConnector

	CustomerService customer.Service

	AppService app.Service
	SandboxApp *appsandbox.MockableFactory
}

func (*BaseSuite) CreateTestCustomer

func (s *BaseSuite) CreateTestCustomer(ns string, subjectKey string) *customer.Customer

func (*BaseSuite) DebugDumpInvoice

func (s *BaseSuite) DebugDumpInvoice(h string, i billing.Invoice)

func (*BaseSuite) GetUniqueNamespace

func (s *BaseSuite) GetUniqueNamespace(prefix string) string

GetUniqueNamespace returns a unique namespace with the given prefix

func (*BaseSuite) InstallSandboxApp

func (s *BaseSuite) InstallSandboxApp(t *testing.T, ns string) app.App

func (*BaseSuite) SetupSuite

func (s *BaseSuite) SetupSuite()

func (*BaseSuite) TearDownSuite

func (s *BaseSuite) TearDownSuite()

Jump to

Keyboard shortcuts

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