Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coinage ¶
type Coinage interface { NewRoaster(*models.RoasterRequest) (*models.Roaster, error) Roaster(uuid.UUID) (*models.Roaster, error) DeleteRoaster(uuid.UUID) error Plans(uuid.UUID) ([]*models.Plan, error) NewPlan(uuid.UUID, *models.PlanRequest) (*models.Plan, error) Plan(uuid.UUID, uuid.UUID) (*models.Plan, error) DeletePlan(uuid.UUID, uuid.UUID) error AddOrUpdateCustomer(*models.CustomerRequest) (*models.Customer, error) Customers(int, int) ([]*models.Customer, error) Customer(uuid.UUID) (*models.Customer, error) NewSubscription(uuid.UUID, *models.SubscribeRequest) error DeleteSubscription(uuid.UUID, string) error DeleteCustomer(uuid.UUID) error }
Coinage wraps all API calls to the coinage service
func NewCoinage ¶
NewCoinage initializes and returns a Coinage gateway pointing at the host and
port provided
type Stripe ¶
type Stripe interface { NewCustomer(token, userID string) (string, error) GetCustomer(id string) (*stripe.Customer, error) DeleteCustomer(id string) error AddSource(id, token string) (*stripe.Customer, error) NewAccount(user *tmodels.User, roaster *tmodels.Roaster) (*stripe.Account, error) NewPlan(secret string, item *item.Item, freq models.Frequency) (*stripe.Plan, error) GetPlan(secret, pid string) (*stripe.Plan, error) ApplicationFee() float64 FeePercent() float64 Subscribe(roaster *models.Roaster, id, planID string, quantity uint64) (string, *stripe.Sub, error) }
Stripe wraps the stripe-go api for coinage use
Click to show internal directories.
Click to hide internal directories.