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)
- func (s *Stripe) UpdateCustomerEmail(ctx context.Context, customerID, email string) error
- func (s *Stripe) WebhookHandlerFunc(ctx context.Context, jc jobs.Client) httputil.Handler
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) UpdateCustomerEmail(ctx context.Context, customerID, email string) 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) // WebhookHandlerFunc returns a http.HandlerFunc that can be used to handle incoming webhooks from the payment provider. Return nil if you don't want to register any webhook handlers. jobs is used to enqueue jobs for processing the webhook events. WebhookHandlerFunc(ctx context.Context, jobs jobs.Client) httputil.Handler }
type Stripe ¶
type Stripe struct {
// contains filtered or unexported fields
}
func (*Stripe) CreateCustomer ¶
func (*Stripe) DeleteCustomer ¶
func (*Stripe) FindCustomer ¶
func (*Stripe) FindCustomerForOrg ¶
func (*Stripe) GetBillingPortalURL ¶
func (*Stripe) UpdateCustomerEmail ¶ added in v0.49.0
Click to show internal directories.
Click to hide internal directories.