payload

package
v1.1.59 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertPayloadBuilder added in v1.0.32

type AlertPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*AlertPayloadBuilder) BuildPayload added in v1.0.32

func (b *AlertPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

BuildPayload for alert webhooks - fetches entities based on what IDs are provided

type CommunicationPayloadBuilder added in v1.0.21

type CommunicationPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*CommunicationPayloadBuilder) BuildPayload added in v1.0.21

func (b *CommunicationPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

BuildPayload builds the webhook payload for communication events

type CreditNotePayloadBuilder added in v1.0.27

type CreditNotePayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*CreditNotePayloadBuilder) BuildPayload added in v1.0.27

func (b *CreditNotePayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

type CustomerPayloadBuilder added in v1.0.13

type CustomerPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*CustomerPayloadBuilder) BuildPayload added in v1.0.13

func (b *CustomerPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

type EntitlementPayloadBuilder added in v1.0.19

type EntitlementPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*EntitlementPayloadBuilder) BuildPayload added in v1.0.19

func (b *EntitlementPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

type FeaturePayloadBuilder added in v1.0.19

type FeaturePayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*FeaturePayloadBuilder) BuildPayload added in v1.0.19

func (b *FeaturePayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

type InvoicePayloadBuilder

type InvoicePayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*InvoicePayloadBuilder) BuildPayload

func (b *InvoicePayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

BuildPayload builds the webhook payload for invoice events

type PayloadBuilder

type PayloadBuilder interface {
	BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)
}

PayloadBuilder interface for building event-specific payloads

func NewAlertPayloadBuilder added in v1.0.32

func NewAlertPayloadBuilder(services *Services) PayloadBuilder

func NewCommunicationPayloadBuilder added in v1.0.21

func NewCommunicationPayloadBuilder(services *Services) PayloadBuilder

func NewCreditNotePayloadBuilder added in v1.0.27

func NewCreditNotePayloadBuilder(services *Services) PayloadBuilder

func NewCustomerPayloadBuilder added in v1.0.13

func NewCustomerPayloadBuilder(services *Services) PayloadBuilder

func NewEntitlementPayloadBuilder added in v1.0.19

func NewEntitlementPayloadBuilder(services *Services) PayloadBuilder

func NewFeaturePayloadBuilder added in v1.0.19

func NewFeaturePayloadBuilder(services *Services) PayloadBuilder

func NewInvoicePayloadBuilder

func NewInvoicePayloadBuilder(services *Services) PayloadBuilder

func NewPaymentPayloadBuilder added in v1.0.19

func NewPaymentPayloadBuilder(services *Services) PayloadBuilder

func NewSubscriptionPayloadBuilder added in v1.0.13

func NewSubscriptionPayloadBuilder(services *Services) PayloadBuilder

func NewTransactionPayloadBuilder added in v1.0.13

func NewTransactionPayloadBuilder(services *Services) PayloadBuilder

func NewWalletPayloadBuilder added in v1.0.13

func NewWalletPayloadBuilder(services *Services) PayloadBuilder

type PayloadBuilderFactory

type PayloadBuilderFactory interface {
	GetBuilder(eventType string) (PayloadBuilder, error)
}

PayloadBuilderFactory interface for getting event-specific payload builders

func NewPayloadBuilderFactory

func NewPayloadBuilderFactory(services *Services) PayloadBuilderFactory

NewPayloadBuilderFactory creates a new factory with registered builders

type PaymentPayloadBuilder added in v1.0.19

type PaymentPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (*PaymentPayloadBuilder) BuildPayload added in v1.0.19

func (b *PaymentPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

type Services

type Services struct {
	InvoiceService      service.InvoiceService
	PlanService         service.PlanService
	PriceService        service.PriceService
	EntitlementService  service.EntitlementService
	FeatureService      service.FeatureService
	SubscriptionService service.SubscriptionService
	WalletService       service.WalletService
	CustomerService     service.CustomerService
	PaymentService      service.PaymentService
	Sentry              *sentry.Service
	CreditNoteService   service.CreditNoteService
}

Services container for all services needed by payload builders

func NewServices

func NewServices(
	invoiceService service.InvoiceService,
	planService service.PlanService,
	priceService service.PriceService,
	entitlementService service.EntitlementService,
	featureService service.FeatureService,
	subscriptionService service.SubscriptionService,
	walletService service.WalletService,
	customerService service.CustomerService,
	paymentService service.PaymentService,
	sentry *sentry.Service,
	creditNoteService service.CreditNoteService,
) *Services

NewServices creates a new Services container

type SubscriptionPayloadBuilder added in v1.0.13

type SubscriptionPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (SubscriptionPayloadBuilder) BuildPayload added in v1.0.13

func (b SubscriptionPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

type TransactionPayloadBuilder added in v1.0.13

type TransactionPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (TransactionPayloadBuilder) BuildPayload added in v1.0.13

func (b TransactionPayloadBuilder) BuildPayload(
	ctx context.Context,
	eventType string,
	data json.RawMessage,
) (json.RawMessage, error)

type WalletPayloadBuilder added in v1.0.13

type WalletPayloadBuilder struct {
	// contains filtered or unexported fields
}

func (WalletPayloadBuilder) BuildPayload added in v1.0.13

func (b WalletPayloadBuilder) BuildPayload(ctx context.Context, eventType string, data json.RawMessage) (json.RawMessage, error)

Jump to

Keyboard shortcuts

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