Documentation ¶
Index ¶
- type Client
- func (c *Client) CancelSubscription() error
- func (c *Client) ClearPaymentInfo() error
- func (c *Client) CreateCustomer(email string) (string, error)
- func (c *Client) DeleteCustomer() error
- func (c *Client) GetPaymentInfo() (*models.PaymentInfo, error)
- func (c *Client) GetPlanByID(countryCode, planID string) (*models.BillingPlan, error)
- func (c *Client) GetUpcomingInvoice() (*models.UpcomingInvoice, error)
- func (c *Client) ListPlans(countryCode string) ([]*models.BillingPlan, error)
- func (c *Client) SetCurrentTenant(tenant *models.Tenant)
- func (c *Client) SetCurrentUser(user *models.User)
- func (c *Client) Subscribe(planID string) error
- func (c *Client) UpdatePaymentInfo(input *models.CreateEditBillingPaymentInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a billing client wrapper for Stripe
func (*Client) CancelSubscription ¶
CancelSubscription from current tenant on Stripe
func (*Client) ClearPaymentInfo ¶
ClearPaymentInfo removes all payment information from stripe
func (*Client) CreateCustomer ¶
CreateCustomer on Stripe
func (*Client) GetPaymentInfo ¶
func (c *Client) GetPaymentInfo() (*models.PaymentInfo, error)
GetPaymentInfo from a stripe card
func (*Client) GetPlanByID ¶
func (c *Client) GetPlanByID(countryCode, planID string) (*models.BillingPlan, error)
GetPlanByID return a plan by its ID
func (*Client) GetUpcomingInvoice ¶
func (c *Client) GetUpcomingInvoice() (*models.UpcomingInvoice, error)
GetUpcomingInvoice returns the next due invoice for current tenant
func (*Client) ListPlans ¶
func (c *Client) ListPlans(countryCode string) ([]*models.BillingPlan, error)
ListPlans on Stripe
func (*Client) SetCurrentTenant ¶
SetCurrentTenant to current context
func (*Client) SetCurrentUser ¶
SetCurrentUser to current context
func (*Client) UpdatePaymentInfo ¶
func (c *Client) UpdatePaymentInfo(input *models.CreateEditBillingPaymentInfo) error
UpdatePaymentInfo creates or updates customer payment info on Stripe
Click to show internal directories.
Click to hide internal directories.