Documentation
¶
Index ¶
- type PaymentSystemStore
- func (s *PaymentSystemStore) ActiveEntitlement(ctx context.Context, identityID, planCode string) (models.PaymentSubscription, error)
- func (s *PaymentSystemStore) ClaimWebhook(ctx context.Context, event models.PaymentWebhookEvent, lease time.Duration) (string, bool, error)
- func (s *PaymentSystemStore) CleanupWebhookPayloads(ctx context.Context, before time.Time) error
- func (s *PaymentSystemStore) CustomerID(ctx context.Context, provider, identityID string) (string, error)
- func (s *PaymentSystemStore) FinishWebhook(ctx context.Context, provider, eventID, leaseID string, processErr error) error
- func (s *PaymentSystemStore) GetPayment(ctx context.Context, provider, externalID string) (models.PaymentEvent, error)
- func (s *PaymentSystemStore) GetSubscription(ctx context.Context, provider, externalID, identityID string) (models.PaymentSubscription, error)
- func (s *PaymentSystemStore) GetSubscriptionByExternal(ctx context.Context, provider, externalID string) (models.PaymentSubscription, error)
- func (s *PaymentSystemStore) GetWebhook(ctx context.Context, provider, eventID string) (models.PaymentWebhookEvent, error)
- func (s *PaymentSystemStore) HasActiveSubscription(ctx context.Context, identityID string) (bool, error)
- func (s *PaymentSystemStore) ListFailedWebhooks(ctx context.Context, limit, offset int) ([]models.PaymentWebhookEvent, error)
- func (s *PaymentSystemStore) ListPayments(ctx context.Context, identityID string, limit, offset int) ([]models.PaymentEvent, error)
- func (s *PaymentSystemStore) ListSubscriptions(ctx context.Context, identityID string, limit, offset int) ([]models.PaymentSubscription, error)
- func (s *PaymentSystemStore) ListSubscriptionsAfter(ctx context.Context, afterID uint, limit int) ([]models.PaymentSubscription, error)
- func (s *PaymentSystemStore) MarkWebhookForRetry(ctx context.Context, provider, eventID string) error
- func (s *PaymentSystemStore) UpsertPayment(ctx context.Context, payment models.PaymentEvent) error
- func (s *PaymentSystemStore) UpsertSubscription(ctx context.Context, subscription models.PaymentSubscription) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentSystemStore ¶
type PaymentSystemStore struct {
// contains filtered or unexported fields
}
func NewPaymentSystemStore ¶
func NewPaymentSystemStore(db *gorm.DB) *PaymentSystemStore
func (*PaymentSystemStore) ActiveEntitlement ¶ added in v0.3.0
func (s *PaymentSystemStore) ActiveEntitlement(ctx context.Context, identityID, planCode string) (models.PaymentSubscription, error)
func (*PaymentSystemStore) ClaimWebhook ¶ added in v0.3.0
func (s *PaymentSystemStore) ClaimWebhook(ctx context.Context, event models.PaymentWebhookEvent, lease time.Duration) (string, bool, error)
func (*PaymentSystemStore) CleanupWebhookPayloads ¶ added in v0.3.0
func (*PaymentSystemStore) CustomerID ¶
func (*PaymentSystemStore) FinishWebhook ¶
func (*PaymentSystemStore) GetPayment ¶ added in v0.3.0
func (s *PaymentSystemStore) GetPayment(ctx context.Context, provider, externalID string) (models.PaymentEvent, error)
func (*PaymentSystemStore) GetSubscription ¶
func (s *PaymentSystemStore) GetSubscription(ctx context.Context, provider, externalID, identityID string) (models.PaymentSubscription, error)
func (*PaymentSystemStore) GetSubscriptionByExternal ¶ added in v0.3.0
func (s *PaymentSystemStore) GetSubscriptionByExternal(ctx context.Context, provider, externalID string) (models.PaymentSubscription, error)
func (*PaymentSystemStore) GetWebhook ¶ added in v0.3.0
func (s *PaymentSystemStore) GetWebhook(ctx context.Context, provider, eventID string) (models.PaymentWebhookEvent, error)
func (*PaymentSystemStore) HasActiveSubscription ¶
func (*PaymentSystemStore) ListFailedWebhooks ¶ added in v0.3.0
func (s *PaymentSystemStore) ListFailedWebhooks(ctx context.Context, limit, offset int) ([]models.PaymentWebhookEvent, error)
func (*PaymentSystemStore) ListPayments ¶ added in v0.3.0
func (s *PaymentSystemStore) ListPayments(ctx context.Context, identityID string, limit, offset int) ([]models.PaymentEvent, error)
func (*PaymentSystemStore) ListSubscriptions ¶
func (s *PaymentSystemStore) ListSubscriptions(ctx context.Context, identityID string, limit, offset int) ([]models.PaymentSubscription, error)
func (*PaymentSystemStore) ListSubscriptionsAfter ¶ added in v0.3.0
func (s *PaymentSystemStore) ListSubscriptionsAfter(ctx context.Context, afterID uint, limit int) ([]models.PaymentSubscription, error)
func (*PaymentSystemStore) MarkWebhookForRetry ¶ added in v0.3.0
func (s *PaymentSystemStore) MarkWebhookForRetry(ctx context.Context, provider, eventID string) error
func (*PaymentSystemStore) UpsertPayment ¶
func (s *PaymentSystemStore) UpsertPayment(ctx context.Context, payment models.PaymentEvent) error
func (*PaymentSystemStore) UpsertSubscription ¶
func (s *PaymentSystemStore) UpsertSubscription(ctx context.Context, subscription models.PaymentSubscription) error
Click to show internal directories.
Click to hide internal directories.