Documentation ¶
Index ¶
- type SubscriptionService
- func (s *SubscriptionService) AddCard(userID int, token string) error
- func (s *SubscriptionService) DeleteCard(userID int) error
- func (s *SubscriptionService) GetCard(userID int) (*stripe.Card, error)
- func (s *SubscriptionService) GetSubscription(customerID string) (*stripe.Sub, error)
- func (s *SubscriptionService) GetTax(cc string) (*latencyAt.VatRate, error)
- func (s *SubscriptionService) HandleEvent(event *stripe.Event) error
- func (s *SubscriptionService) Plans() (map[string]*stripe.Plan, error)
- func (s *SubscriptionService) ProcessPayment(invoice *stripe.Invoice) error
- func (s *SubscriptionService) Subscribe(userID int, planName string) error
- func (s *SubscriptionService) Unsubscribe(userID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SubscriptionService ¶
type SubscriptionService struct { latencyAt.UserService latencyAt.EventService VatRates map[string]float64 }
func NewSubscriptionService ¶
func NewSubscriptionService(us latencyAt.UserService, es latencyAt.EventService, vatRatesFilename string) (*SubscriptionService, error)
func (*SubscriptionService) AddCard ¶
func (s *SubscriptionService) AddCard(userID int, token string) error
func (*SubscriptionService) DeleteCard ¶
func (s *SubscriptionService) DeleteCard(userID int) error
func (*SubscriptionService) GetCard ¶
func (s *SubscriptionService) GetCard(userID int) (*stripe.Card, error)
func (*SubscriptionService) GetSubscription ¶
func (s *SubscriptionService) GetSubscription(customerID string) (*stripe.Sub, error)
func (*SubscriptionService) GetTax ¶
func (s *SubscriptionService) GetTax(cc string) (*latencyAt.VatRate, error)
func (*SubscriptionService) HandleEvent ¶
func (s *SubscriptionService) HandleEvent(event *stripe.Event) error
func (*SubscriptionService) Plans ¶
func (s *SubscriptionService) Plans() (map[string]*stripe.Plan, error)
func (*SubscriptionService) ProcessPayment ¶
func (s *SubscriptionService) ProcessPayment(invoice *stripe.Invoice) error
func (*SubscriptionService) Subscribe ¶
func (s *SubscriptionService) Subscribe(userID int, planName string) error
func (*SubscriptionService) Unsubscribe ¶
func (s *SubscriptionService) Unsubscribe(userID int) error
Click to show internal directories.
Click to hide internal directories.