subscription

package
v1.0.49 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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttemptPaymentActivityInput

type AttemptPaymentActivityInput struct {
	SubscriptionID string   `json:"subscription_id"`
	TenantID       string   `json:"tenant_id"`
	EnvironmentID  string   `json:"environment_id"`
	InvoiceIDs     []string `json:"invoice_ids"`
}

AttemptPaymentActivityInput represents the input for attempting payment

func (*AttemptPaymentActivityInput) Validate

func (i *AttemptPaymentActivityInput) Validate() error

Validate validates the attempt payment activity input

type AttemptPaymentActivityOutput

type AttemptPaymentActivityOutput struct {
	Success bool `json:"success"`
}

AttemptPaymentActivityOutput represents the output for attempting payment

type CalculatePeriodsActivityInput

type CalculatePeriodsActivityInput struct {
	SubscriptionID string    `json:"subscription_id"`
	TenantID       string    `json:"tenant_id"`
	EnvironmentID  string    `json:"environment_id"`
	UserID         string    `json:"user_id"`
	CurrentTime    time.Time `json:"current_time"`
}

CalculatePeriodsActivityInput represents the input for calculating billing periods

func (*CalculatePeriodsActivityInput) Validate

func (i *CalculatePeriodsActivityInput) Validate() error

Validate validates the calculate periods activity input

type CalculatePeriodsActivityOutput

type CalculatePeriodsActivityOutput struct {
	Periods       []dto.Period `json:"periods"`
	ShouldProcess bool         `json:"should_process"`
}

CalculatePeriodsActivityOutput represents the output for calculating billing periods

type CheckDraftSubscriptionActivityInput

type CheckDraftSubscriptionActivityInput struct {
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
	UserID         string `json:"user_id"`
}

func (*CheckDraftSubscriptionActivityInput) Validate

Validate validates the check draft subscription activity input

type CheckDraftSubscriptionActivityOutput

type CheckDraftSubscriptionActivityOutput struct {
	IsDraft bool `json:"is_draft"`
}

type CheckSubscriptionCancellationActivityInput

type CheckSubscriptionCancellationActivityInput struct {
	SubscriptionID string     `json:"subscription_id"`
	TenantID       string     `json:"tenant_id"`
	EnvironmentID  string     `json:"environment_id"`
	UserID         string     `json:"user_id"`
	Period         dto.Period `json:"period"`
}

CheckSubscriptionCancellationActivityInput represents the input for checking subscription cancellation

func (*CheckSubscriptionCancellationActivityInput) Validate

Validate validates the check subscription cancellation activity input

type CheckSubscriptionCancellationActivityOutput

type CheckSubscriptionCancellationActivityOutput struct {
	Success bool `json:"success"`
}

CheckSubscriptionCancellationActivityOutput represents the output for checking subscription cancellation

type CheckSubscriptionPauseStatusActivityInput

type CheckSubscriptionPauseStatusActivityInput struct {
	SubscriptionID string    `json:"subscription_id"`
	TenantID       string    `json:"tenant_id"`
	EnvironmentID  string    `json:"environment_id"`
	CurrentTime    time.Time `json:"current_time"`
}

CheckSubscriptionPauseStatusActivity input

func (*CheckSubscriptionPauseStatusActivityInput) Validate

Validate validates the check subscription pause status activity input

type CheckSubscriptionPauseStatusActivityOutput

type CheckSubscriptionPauseStatusActivityOutput struct {
	ShouldSkipProcessing bool       `json:"should_skip_processing"`
	IsPaused             bool       `json:"is_paused"`
	WasResumed           bool       `json:"was_resumed"`
	UpdatedPeriodEnd     *time.Time `json:"updated_period_end,omitempty"`
	PauseID              *string    `json:"pause_id,omitempty"`
}

CheckSubscriptionPauseStatusActivity output

type CreateInvoicesActivityInput

type CreateInvoicesActivityInput struct {
	SubscriptionID string       `json:"subscription_id"`
	TenantID       string       `json:"tenant_id"`
	EnvironmentID  string       `json:"environment_id"`
	UserID         string       `json:"user_id"`
	Periods        []dto.Period `json:"periods"`
}

CreateInvoicesActivityInput represents the input for creating an invoice for a period

func (*CreateInvoicesActivityInput) Validate

func (i *CreateInvoicesActivityInput) Validate() error

Validate validates the create invoices activity input

type CreateInvoicesActivityOutput

type CreateInvoicesActivityOutput struct {
	InvoiceIDs []string `json:"invoice_ids"`
}

CreateInvoicesActivityOutput represents the output for creating an invoice

type ProcessSubscriptionBillingWorkflowInput

type ProcessSubscriptionBillingWorkflowInput struct {
	SubscriptionID string    `json:"subscription_id"`
	TenantID       string    `json:"tenant_id"`
	UserID         string    `json:"user_id"`
	EnvironmentID  string    `json:"environment_id"`
	PeriodStart    time.Time `json:"period_start"`
	PeriodEnd      time.Time `json:"period_end"`
}

ProcessSubscriptionBillingWorkflowInput represents the input for processing a single subscription billing workflow

func (*ProcessSubscriptionBillingWorkflowInput) Validate

Validate validates the process subscription billing workflow input

type ProcessSubscriptionBillingWorkflowResult

type ProcessSubscriptionBillingWorkflowResult struct {
	Success     bool      `json:"success"`
	Error       *string   `json:"error,omitempty"`
	CompletedAt time.Time `json:"completed_at"`
}

type ScheduleSubscriptionBillingWorkflowInput

type ScheduleSubscriptionBillingWorkflowInput struct {
	BatchSize int `json:"batch_size"`
}

func (*ScheduleSubscriptionBillingWorkflowInput) Validate

Validate validates the schedule subscription billing workflow input

type ScheduleSubscriptionBillingWorkflowResult

type ScheduleSubscriptionBillingWorkflowResult struct {
	SubscriptionIDs []string `json:"subscription_ids"`
}

type SyncInvoiceToExternalVendorActivityInput

type SyncInvoiceToExternalVendorActivityInput struct {
	InvoiceIDs    []string `json:"invoice_ids"`
	TenantID      string   `json:"tenant_id"`
	EnvironmentID string   `json:"environment_id"`
}

SyncInvoiceToExternalVendorActivityInput represents the input for syncing invoice to external vendor

func (*SyncInvoiceToExternalVendorActivityInput) Validate

Validate validates the sync invoice to external vendor activity input

type SyncInvoiceToExternalVendorActivityOutput

type SyncInvoiceToExternalVendorActivityOutput struct {
	Success bool `json:"success"`
}

SyncInvoiceToExternalVendorActivityOutput represents the output for syncing invoice

type UpdateSubscriptionPeriodActivityInput

type UpdateSubscriptionPeriodActivityInput struct {
	SubscriptionID string    `json:"subscription_id"`
	TenantID       string    `json:"tenant_id"`
	EnvironmentID  string    `json:"environment_id"`
	UserID         string    `json:"user_id"`
	PeriodStart    time.Time `json:"period_start"`
	PeriodEnd      time.Time `json:"period_end"`
}

UpdateSubscriptionPeriodActivityInput represents the input for updating subscription period

func (*UpdateSubscriptionPeriodActivityInput) Validate

Validate validates the update subscription period activity input

type UpdateSubscriptionPeriodActivityOutput

type UpdateSubscriptionPeriodActivityOutput struct {
	Success bool `json:"success"`
}

UpdateSubscriptionPeriodActivityOutput represents the output for updating subscription period

Jump to

Keyboard shortcuts

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