subscription

package
v1.0.53 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Workflow name - must match the function name
	WorkflowProcessSubscriptionBilling = "ProcessSubscriptionBillingWorkflow"
	// Activity names - must match the registered method names
	ActivityCheckDraftSubscription = "CheckDraftSubscriptionActivity"
	ActivityCheckPause             = "CheckPauseActivity"
	ActivityCalculatePeriods       = "CalculatePeriodsActivity"
	ActivityCreateDraftInvoices    = "CreateDraftInvoicesActivity"
	ActivityUpdateCurrentPeriod    = "UpdateCurrentPeriodActivity"
	ActivityCheckCancellation      = "CheckCancellationActivity"
	// Activity from invoice package
	ActivityTriggerInvoiceWorkflow = "TriggerInvoiceWorkflowActivity"
)
View Source
const (
	// Workflow name - must match the function name
	WorkflowScheduleSubscriptionBilling = "ScheduleSubscriptionBillingWorkflow"
	// Activity names - must match the registered method names
	ActivityScheduleBilling = "ScheduleBillingActivity"
)

Variables

This section is empty.

Functions

func ProcessSubscriptionBillingWorkflow

ProcessSubscriptionBillingWorkflow processes a subscription billing workflow This workflow orchestrates the subscription billing period processing: 1. Check if subscription is draft 2. Calculate billing periods up to current time 3. For each period (except the last), create draft invoice 4. Check for cancellation 5. Update subscription to new current period 6. Trigger invoice workflows for processing (fire-and-forget)

func ScheduleSubscriptionBillingWorkflow

ScheduleSubscriptionBillingWorkflow schedules subscription billing workflows

Types

This section is empty.

Jump to

Keyboard shortcuts

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