Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found in provider") ErrInvalidCardToken = errors.New("invalid card token") )
Functions ¶
This section is empty.
Types ¶
type CustomerUpdatePayload ¶
type CustomerUpdatePayload struct { }
type EventProcessor ¶
type Provider ¶
type Provider interface { Name() string SetBaseURL(url string) error CreateCustomer(ctx context.Context, email string, token string) (*Customer, error) GetSubscription(ctx context.Context, cust string, sub string) (*Subscription, error) GetSubscriptions(ctx context.Context, cust string) ([]Subscription, error) CreateSubscription(ctx context.Context, cust string, seats int) (*Subscription, error) UpdateSubscription(ctx context.Context, cust string, sub string, payload SubscriptionUpdatePayload) (*Subscription, error) DeleteSubscription(ctx context.Context, cust string, sub string) error GetEvent(ctx context.Context, eventID string) (*Event, error) }
type Subscription ¶
type Subscription struct { ID string Status SubscriptionStatus }
type SubscriptionStatus ¶
type SubscriptionStatus string
const ( SubscriptionStatusTrialing SubscriptionStatus = "trialing" SubscriptionStatusActive SubscriptionStatus = "active" SubscriptionStatusPastDue SubscriptionStatus = "past_due" SubscriptionStatusCancelled SubscriptionStatus = "cancelled" SubscriptionStatusUnpaid SubscriptionStatus = "unpaid" )
Click to show internal directories.
Click to hide internal directories.