Documentation ¶
Index ¶
- type Customer
- type Provider
- type Stripe
- func (s *Stripe) CreateCustomer(ctx context.Context, organization *database.Organization) (*Customer, error)
- func (s *Stripe) DeleteCustomer(ctx context.Context, customerID string) error
- func (s *Stripe) FindCustomer(ctx context.Context, customerID string) (*Customer, error)
- func (s *Stripe) FindCustomerForOrg(ctx context.Context, organization *database.Organization) (*Customer, error)
- func (s *Stripe) GetBillingPortalURL(ctx context.Context, customerID, returnURL string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface { CreateCustomer(ctx context.Context, organization *database.Organization) (*Customer, error) FindCustomer(ctx context.Context, customerID string) (*Customer, error) // FindCustomerForOrg Use with caution - This should only be used if we don't have payment customer ID in the org and we want to check if the customer already exists. Use FindCustomer instead if payment customer ID is available. // Stripe implementation for this is not optimal and list all customers around org creation time to find this customer. FindCustomerForOrg(ctx context.Context, organization *database.Organization) (*Customer, error) DeleteCustomer(ctx context.Context, customerID string) error // GetBillingPortalURL returns the payment portal URL to collect payment information from the customer. GetBillingPortalURL(ctx context.Context, customerID, returnURL string) (string, error) }
type Stripe ¶
type Stripe struct{}
func (*Stripe) CreateCustomer ¶
func (*Stripe) DeleteCustomer ¶
func (*Stripe) FindCustomer ¶
func (*Stripe) FindCustomerForOrg ¶
Click to show internal directories.
Click to hide internal directories.