integration

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: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargebeeIntegration added in v1.0.38

ChargebeeIntegration contains all Chargebee integration services

type Factory

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

Factory manages different payment integration providers and storage providers

func NewFactory

func NewFactory(
	config *config.Configuration,
	logger *logger.Logger,
	connectionRepo connection.Repository,
	customerRepo customer.Repository,
	subscriptionRepo subscription.Repository,
	invoiceRepo invoice.Repository,
	paymentRepo payment.Repository,
	priceRepo price.Repository,
	entityIntegrationMappingRepo entityintegrationmapping.Repository,
	meterRepo meter.Repository,
	featureRepo feature.Repository,
	encryptionService security.EncryptionService,
) *Factory

NewFactory creates a new integration factory

func (*Factory) GetAvailableProviders

func (f *Factory) GetAvailableProviders(ctx context.Context) ([]IntegrationProvider, error)

GetAvailableProviders returns all available providers for the current environment

func (*Factory) GetChargebeeIntegration added in v1.0.38

func (f *Factory) GetChargebeeIntegration(ctx context.Context) (*ChargebeeIntegration, error)

GetChargebeeIntegration returns a complete Chargebee integration setup

func (*Factory) GetHubSpotIntegration added in v1.0.34

func (f *Factory) GetHubSpotIntegration(ctx context.Context) (*HubSpotIntegration, error)

GetHubSpotIntegration returns a complete HubSpot integration setup

func (*Factory) GetIntegrationByProvider

func (f *Factory) GetIntegrationByProvider(ctx context.Context, providerType types.SecretProvider) (interface{}, error)

GetIntegrationByProvider returns the appropriate integration for the given provider type

func (*Factory) GetNomodIntegration added in v1.0.47

func (f *Factory) GetNomodIntegration(ctx context.Context) (*NomodIntegration, error)

GetNomodIntegration returns a complete Nomod integration setup

func (*Factory) GetQuickBooksIntegration added in v1.0.47

func (f *Factory) GetQuickBooksIntegration(ctx context.Context) (*QuickBooksIntegration, error)

GetQuickBooksIntegration returns a complete QuickBooks integration setup

func (*Factory) GetRazorpayIntegration added in v1.0.38

func (f *Factory) GetRazorpayIntegration(ctx context.Context) (*RazorpayIntegration, error)

GetRazorpayIntegration returns a complete Razorpay integration setup

func (*Factory) GetS3Client added in v1.0.32

func (f *Factory) GetS3Client(ctx context.Context) (*s3.Client, error)

GetS3Client returns the S3 client directly (for backward compatibility) Deprecated: Use GetStorageProvider instead for future-proof code

func (*Factory) GetStorageProvider added in v1.0.32

func (f *Factory) GetStorageProvider(ctx context.Context, connectionID string) (*s3.Client, error)

GetStorageProvider returns an S3 storage client for the given connection Currently only S3 is supported. In the future, Azure Blob Storage, Google Cloud Storage, and other providers can be added by checking the connection's provider type.

func (*Factory) GetStripeIntegration

func (f *Factory) GetStripeIntegration(ctx context.Context) (*StripeIntegration, error)

GetStripeIntegration returns a complete Stripe integration setup

func (*Factory) GetSupportedProviders

func (f *Factory) GetSupportedProviders() []types.SecretProvider

GetSupportedProviders returns all supported integration provider types

func (*Factory) HasProvider

func (f *Factory) HasProvider(providerType types.SecretProvider) bool

HasProvider checks if a provider is supported

type HubSpotIntegration added in v1.0.34

type HubSpotIntegration struct {
	Client         hubspot.HubSpotClient
	CustomerSvc    hubspot.HubSpotCustomerService
	InvoiceSyncSvc *hubspot.InvoiceSyncService
	DealSyncSvc    *hubspot.DealSyncService
	QuoteSyncSvc   *hubspot.QuoteSyncService
	WebhookHandler *hubspotwebhook.Handler
}

HubSpotIntegration contains all HubSpot integration services

type HubSpotProvider added in v1.0.34

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

HubSpotProvider implements IntegrationProvider for HubSpot

func (*HubSpotProvider) GetProviderType added in v1.0.34

func (p *HubSpotProvider) GetProviderType() types.SecretProvider

GetProviderType returns the provider type

func (*HubSpotProvider) IsAvailable added in v1.0.34

func (p *HubSpotProvider) IsAvailable(ctx context.Context) bool

IsAvailable checks if HubSpot integration is available

type IntegrationProvider

type IntegrationProvider interface {
	GetProviderType() types.SecretProvider
	IsAvailable(ctx context.Context) bool
}

IntegrationProvider defines the interface for all integration providers

type NomodIntegration added in v1.0.47

type NomodIntegration struct {
	Client         nomod.NomodClient
	CustomerSvc    nomod.NomodCustomerService
	PaymentSvc     *nomod.PaymentService
	InvoiceSyncSvc *nomod.InvoiceSyncService
	WebhookHandler *nomodwebhook.Handler
}

NomodIntegration contains all Nomod integration services

type NomodProvider added in v1.0.47

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

NomodProvider implements IntegrationProvider for Nomod

func (*NomodProvider) GetProviderType added in v1.0.47

func (p *NomodProvider) GetProviderType() types.SecretProvider

GetProviderType returns the provider type

func (*NomodProvider) IsAvailable added in v1.0.47

func (p *NomodProvider) IsAvailable(ctx context.Context) bool

IsAvailable checks if Nomod integration is available

type QuickBooksIntegration added in v1.0.47

QuickBooksIntegration contains all QuickBooks integration services

type QuickBooksProvider added in v1.0.47

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

QuickBooksProvider implements IntegrationProvider for QuickBooks

func (*QuickBooksProvider) GetProviderType added in v1.0.47

func (p *QuickBooksProvider) GetProviderType() types.SecretProvider

GetProviderType returns the provider type

func (*QuickBooksProvider) IsAvailable added in v1.0.47

func (p *QuickBooksProvider) IsAvailable(ctx context.Context) bool

IsAvailable checks if QuickBooks integration is available

type RazorpayIntegration added in v1.0.38

type RazorpayIntegration struct {
	Client         razorpay.RazorpayClient
	CustomerSvc    razorpay.RazorpayCustomerService
	PaymentSvc     *razorpay.PaymentService
	InvoiceSyncSvc *razorpay.InvoiceSyncService
	WebhookHandler *razorpaywebhook.Handler
}

RazorpayIntegration contains all Razorpay integration services

type RazorpayProvider added in v1.0.38

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

RazorpayProvider implements IntegrationProvider for Razorpay

func (*RazorpayProvider) GetProviderType added in v1.0.38

func (p *RazorpayProvider) GetProviderType() types.SecretProvider

GetProviderType returns the provider type

func (*RazorpayProvider) IsAvailable added in v1.0.38

func (p *RazorpayProvider) IsAvailable(ctx context.Context) bool

IsAvailable checks if Razorpay integration is available

type StripeIntegration

type StripeIntegration struct {
	Client         *stripe.Client
	CustomerSvc    *stripe.CustomerService
	PaymentSvc     *stripe.PaymentService
	InvoiceSyncSvc *stripe.InvoiceSyncService
	WebhookHandler *webhook.Handler
}

StripeIntegration contains all Stripe integration services

type StripeProvider

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

StripeProvider implements IntegrationProvider for Stripe

func (*StripeProvider) GetProviderType

func (p *StripeProvider) GetProviderType() types.SecretProvider

GetProviderType returns the provider type

func (*StripeProvider) IsAvailable

func (p *StripeProvider) IsAvailable(ctx context.Context) bool

IsAvailable checks if Stripe integration is available

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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