subs

package
v0.0.0-...-5dca426 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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