handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Billing

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

func New

func New(svc *service.Service) *Billing

func (*Billing) ChargeCard

func (b *Billing) ChargeCard(ctx context.Context, request *billing.ChargeCardRequest, response *billing.ChargeCardResponse) error

func (*Billing) CreateCheckoutSession

func (b *Billing) CreateCheckoutSession(ctx context.Context, request *billing.CreateCheckoutSessionRequest, response *billing.CreateCheckoutSessionResponse) error

func (*Billing) DeleteCard

func (b *Billing) DeleteCard(ctx context.Context, request *billing.DeleteCardRequest, response *billing.DeleteCardResponse) error

func (*Billing) GetPayment

func (b *Billing) GetPayment(ctx context.Context, request *billing.GetPaymentRequest, response *billing.GetPaymentResponse) error

func (*Billing) ListCards

func (b *Billing) ListCards(ctx context.Context, request *billing.ListCardsRequest, response *billing.ListCardsResponse) error

func (*Billing) ListPayments

func (b *Billing) ListPayments(ctx context.Context, request *billing.ListPaymentsRequest, response *billing.ListPaymentsResponse) error

func (*Billing) ReadAccount

func (b *Billing) ReadAccount(ctx context.Context, request *billing.ReadAccountRequest, response *billing.ReadAccountResponse) error

func (*Billing) SetupCard

func (b *Billing) SetupCard(ctx context.Context, request *billing.SetupCardRequest, response *billing.SetupCardResponse) error

func (*Billing) SubscribeTier

func (b *Billing) SubscribeTier(ctx context.Context, request *billing.SubscribeTierRequest, response *billing.SubscribeTierResponse) error

SubscribeTier sets up a user/team to be subscribed to a tier.

type BillingAccount

type BillingAccount struct {
	ID      string
	Admins  []string // a billing account can have multiple admins, but an admin can only admin one account
	PriceID string   // ID of the Stripe price for the subscription tier, "free" or  "price_198234aksjfh"
	SubID   string   // Stripe subscription ID "sub_1o283yklajdfn"
}

BillingAccount is the entity that owns the subscription, etc

type Tier

type Tier struct {
	ID        string
	Name      string
	PriceDesc string // human readable string to describe the price $25/month or $45 per user / month
	Price     int64  // price in base units
	Currency  string // currency
}

Jump to

Keyboard shortcuts

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