Documentation ¶
Index ¶
- Variables
- func CreateStripeBillingPortalSession(dp *depot.Depot, id uint64) (*stripe.BillingPortalSession, error)
- func CreateStripeCheckoutSession(dp *depot.Depot, id uint64, payload *CreateStripeCheckoutSessionPayload) (*stripe.CheckoutSession, error)
- func Delete(dp *depot.Depot, id uint64, payload *DeletionPayload) error
- func SetGoogleOauthToken(dp *depot.Depot, id uint64, payload *SetGoogleOauthTokenPayload) error
- type CreateStripeCheckoutSessionData
- type CreateStripeCheckoutSessionPayload
- type DeletionPayload
- type Organization
- type SetGoogleOauthTokenPayload
- type UpdatePayload
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotStripeCustomer = errors.New("not Stripe customer")
)
Functions ¶
func CreateStripeCheckoutSession ¶
func CreateStripeCheckoutSession(dp *depot.Depot, id uint64, payload *CreateStripeCheckoutSessionPayload) (*stripe.CheckoutSession, error)
func SetGoogleOauthToken ¶
func SetGoogleOauthToken(dp *depot.Depot, id uint64, payload *SetGoogleOauthTokenPayload) error
Types ¶
type DeletionPayload ¶
type Organization ¶
type Organization struct { CreatedAt time.Time `json:"createdAt"` HasGoogleOauth bool `json:"hasGoogleOauth"` Id uint64 `json:"id"` IsOnTrial bool `json:"isOnTrial"` Name string `json:"name"` Plan *plan.Plan `gorm:"embedded;embeddedPrefix:plan__" json:"plan"` StripeCustomerId *string `json:"stripeCustomerId"` SubscriptionPeriod *model.OrganizationSubscriptionPeriod `json:"subscriptionPeriod"` TrialEndsAt *time.Time `json:"trialEndsAt"` UpdatedAt time.Time `json:"updatedAt"` }
func ClearGoogleAuth ¶
func ClearGoogleAuth(dp *depot.Depot, organizationId uint64) (*Organization, error)
func Update ¶
func Update(dp *depot.Depot, id uint64, payload *UpdatePayload) (*Organization, error)
type SetGoogleOauthTokenPayload ¶
type SetGoogleOauthTokenPayload struct {
Code *string `json:"code"`
}
type UpdatePayload ¶
type UpdatePayload struct {
Name *string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.