Documentation
¶
Index ¶
- type Config
- type IngestHandler
- type Router
- func (a *Router) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
- func (a *Router) AppStripeWebhook(w http.ResponseWriter, r *http.Request, appID string)
- func (a *Router) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
- func (a *Router) ArchivePlan(w http.ResponseWriter, r *http.Request, planId string)
- func (a *Router) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
- func (a *Router) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
- func (a *Router) CreateBillingProfile(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreateCustomer(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)
- func (a *Router) CreateFeature(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreateNotificationRule(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreatePendingInvoiceLine(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreatePlan(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreatePortalToken(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreateStripeCheckoutSession(w http.ResponseWriter, r *http.Request)
- func (a *Router) CreateSubscription(w http.ResponseWriter, r *http.Request)
- func (a *Router) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string)
- func (a *Router) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
- func (a *Router) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerID string)
- func (a *Router) DeleteCustomerAppData(w http.ResponseWriter, r *http.Request, customerID string, appID string)
- func (a *Router) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId string)
- func (a *Router) DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)
- func (a *Router) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)
- func (a *Router) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)
- func (a *Router) DeletePlan(w http.ResponseWriter, r *http.Request, planId string)
- func (a *Router) EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
- func (a *Router) GetApp(w http.ResponseWriter, r *http.Request, appID string)
- func (a *Router) GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, ...)
- func (a *Router) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
- func (a *Router) GetCustomer(w http.ResponseWriter, r *http.Request, customerID string)
- func (a *Router) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerId string, featureKey string, ...)
- func (a *Router) GetDebugMetrics(w http.ResponseWriter, r *http.Request)
- func (a *Router) GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId string)
- func (a *Router) GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) GetFeature(w http.ResponseWriter, r *http.Request, featureId string)
- func (a *Router) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, ...)
- func (a *Router) GetMarketplaceListing(w http.ResponseWriter, r *http.Request, appType api.AppType)
- func (a *Router) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)
- func (a *Router) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)
- func (a *Router) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventID string)
- func (a *Router) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)
- func (a *Router) GetPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string, ...)
- func (a *Router) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string, ...)
- func (a *Router) IngestEvents(w http.ResponseWriter, r *http.Request)
- func (a *Router) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)
- func (a *Router) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request)
- func (a *Router) ListApps(w http.ResponseWriter, r *http.Request, params api.ListAppsParams)
- func (a *Router) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, ...)
- func (a *Router) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params api.ListBillingProfilesParams)
- func (a *Router) ListCurrencies(w http.ResponseWriter, r *http.Request)
- func (a *Router) ListCustomerAppData(w http.ResponseWriter, r *http.Request, customerID string, ...)
- func (a *Router) ListCustomers(w http.ResponseWriter, r *http.Request, params api.ListCustomersParams)
- func (a *Router) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) ListEntitlements(w http.ResponseWriter, r *http.Request, params api.ListEntitlementsParams)
- func (a *Router) ListEvents(w http.ResponseWriter, r *http.Request, params api.ListEventsParams)
- func (a *Router) ListFeatures(w http.ResponseWriter, r *http.Request, params api.ListFeaturesParams)
- func (a *Router) ListGrants(w http.ResponseWriter, r *http.Request, params api.ListGrantsParams)
- func (a *Router) ListInvoices(w http.ResponseWriter, r *http.Request, params api.ListInvoicesParams)
- func (a *Router) ListMarketplaceListings(w http.ResponseWriter, r *http.Request, ...)
- func (a *Router) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIDOrSlug string)
- func (a *Router) ListMeters(w http.ResponseWriter, r *http.Request)
- func (a *Router) ListNotificationChannels(w http.ResponseWriter, r *http.Request, ...)
- func (a *Router) ListNotificationEvents(w http.ResponseWriter, r *http.Request, ...)
- func (a *Router) ListNotificationRules(w http.ResponseWriter, r *http.Request, params api.ListNotificationRulesParams)
- func (a *Router) ListPlans(w http.ResponseWriter, r *http.Request, params api.ListPlansParams)
- func (a *Router) ListPortalTokens(w http.ResponseWriter, r *http.Request, params api.ListPortalTokensParams)
- func (a *Router) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) MarketplaceAppAPIKeyInstall(w http.ResponseWriter, r *http.Request, appType api.AppType)
- func (a *Router) MarketplaceOAuth2InstallAuthorize(w http.ResponseWriter, r *http.Request, appType api.AppType, ...)
- func (a *Router) MarketplaceOAuth2InstallGetURL(w http.ResponseWriter, r *http.Request, appType api.AppType)
- func (a *Router) MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
- func (a *Router) NextPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string)
- func (a *Router) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) PublishPlan(w http.ResponseWriter, r *http.Request, planId string)
- func (a *Router) QueryMeter(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, ...)
- func (a *Router) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, ...)
- func (a *Router) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, invoiceId string)
- func (a *Router) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
- func (a *Router) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, ...)
- func (a *Router) RetryInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
- func (a *Router) SimulateInvoice(w http.ResponseWriter, r *http.Request, customerId string)
- func (a *Router) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)
- func (a *Router) UninstallApp(w http.ResponseWriter, r *http.Request, appID string)
- func (a *Router) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId string)
- func (a *Router) UpdateApp(w http.ResponseWriter, r *http.Request, appID string)
- func (a *Router) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string)
- func (a *Router) UpdateCustomer(w http.ResponseWriter, r *http.Request, customerID string)
- func (a *Router) UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)
- func (a *Router) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)
- func (a *Router) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)
- func (a *Router) UpdatePlan(w http.ResponseWriter, r *http.Request, planId string)
- func (a *Router) UpdateStripeAPIKey(w http.ResponseWriter, r *http.Request, appID string)
- func (a *Router) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
- func (a *Router) UpsertCustomerAppData(w http.ResponseWriter, r *http.Request, customerID string)
- func (a *Router) VoidGrant(w http.ResponseWriter, r *http.Request, grantId string)
- func (a *Router) VoidInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
NamespaceManager *namespace.Manager
StreamingConnector streaming.Connector
IngestHandler http.Handler
PortalCORSEnabled bool
Portal portal.Service
ErrorHandler errorsx.Handler
Logger *slog.Logger
// deps
App app.Service
AppStripe appstripe.Service
Customer customer.Service
Billing billing.Service
MeterService meter.Service
Plan plan.Service
SubscriptionService subscription.Service
SubscriptionWorkflowService subscription.WorkflowService
PlanSubscriptionService plansubscription.PlanSubscriptionService
DebugConnector debug.DebugConnector
FeatureConnector feature.FeatureConnector
EntitlementConnector entitlement.Connector
EntitlementBalanceConnector meteredentitlement.Connector
GrantConnector credit.GrantConnector
GrantRepo grant.Repo
Notification notification.Service
// FIXME: implement generic module management, loading, etc...
BillingEnabled bool
ProductCatalogEnabled bool
AppsEnabled bool
}
type IngestHandler ¶
type IngestHandler interface {
ServeHTTP(w http.ResponseWriter, r *http.Request, namespace string)
}
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) AdvanceInvoiceAction ¶
Advance the invoice's state to the next status (POST /api/v1/billing/invoices/{invoiceId}/advance)
func (*Router) AppStripeWebhook ¶
Handle app stripe webhook (POST /api/v1/apps/{appId}/stripe/webhook)
func (*Router) ApproveInvoiceAction ¶
Send the invoice to the customer (POST /api/v1/billing/invoices/{invoiceId}/approve)
func (*Router) ArchivePlan ¶
Archive plan version (POST /api/v1/plans/{planId}/archive)
func (*Router) CancelSubscription ¶
(POST /api/v1/subscriptions/{subscriptionId}/cancel)
func (*Router) ChangeSubscription ¶
func (*Router) CreateBillingProfile ¶
func (a *Router) CreateBillingProfile(w http.ResponseWriter, r *http.Request)
Create a new billing profile (POST /api/v1/billing/profile)
func (*Router) CreateCustomer ¶
func (a *Router) CreateCustomer(w http.ResponseWriter, r *http.Request)
Create a customer (POST /api/v1/customer/customers)
func (*Router) CreateEntitlement ¶
Create entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements)
func (*Router) CreateFeature ¶
func (a *Router) CreateFeature(w http.ResponseWriter, r *http.Request)
Create feature (POST /api/v1/features)
func (*Router) CreateGrant ¶
func (a *Router) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)
Create grant (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/grants)
func (*Router) CreateNotificationChannel ¶
func (a *Router) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
Create a notification channel (POST /api/v1/notification/channels)
func (*Router) CreateNotificationRule ¶
func (a *Router) CreateNotificationRule(w http.ResponseWriter, r *http.Request)
Create a notification rule (POST /api/v1/notification/rules)
func (*Router) CreatePendingInvoiceLine ¶
func (a *Router) CreatePendingInvoiceLine(w http.ResponseWriter, r *http.Request)
Create a new line item (POST /api/v1/billing/invoices/lines)
func (*Router) CreatePlan ¶
func (a *Router) CreatePlan(w http.ResponseWriter, r *http.Request)
Create a plan (POST /api/v1/plans)
func (*Router) CreatePortalToken ¶
func (a *Router) CreatePortalToken(w http.ResponseWriter, r *http.Request)
POST /api/v1/portal/tokens
func (*Router) CreateStripeCheckoutSession ¶
func (a *Router) CreateStripeCheckoutSession(w http.ResponseWriter, r *http.Request)
Handle create app stripe checkout session (POST /api/v1/stripe/checkout/sessions)
func (*Router) CreateSubscription ¶
func (a *Router) CreateSubscription(w http.ResponseWriter, r *http.Request)
(POST /api/v1/subscriptions)
func (*Router) DeleteBillingProfile ¶
Archive a billing profile (DELETE /api/v1/billing/profile/{id})
func (*Router) DeleteBillingProfileCustomerOverride ¶
func (a *Router) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
Delete a customer override (DELETE /api/v1/billing/customer/{customerId})
func (*Router) DeleteCustomer ¶
Delete a customer (DELETE /api/v1/customer/customers/{customerId})
func (*Router) DeleteCustomerAppData ¶
func (a *Router) DeleteCustomerAppData(w http.ResponseWriter, r *http.Request, customerID string, appID string)
Delete customer app data (DELETE /api/v1/customer/customers/{customerId}/apps/{appId})
func (*Router) DeleteEntitlement ¶
func (a *Router) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)
Delete entitlement (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
func (*Router) DeleteFeature ¶
Delete feature (DELETE /api/v1/features/{featureId})
func (*Router) DeleteInvoice ¶
Delete an invoice (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId})
func (*Router) DeleteNotificationChannel ¶
func (a *Router) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)
Delete a notification channel (DELETE /api/v1/notification/channels/{channelId})
func (*Router) DeleteNotificationRule ¶
Delete a notification rule (DELETE /api/v1/notification/rules/{ruleId})
func (*Router) DeletePlan ¶
Delete plan (DELETE /api/v1/plans/{planId})
func (*Router) EditSubscription ¶
(PATCH /api/v1/subscriptions/{subscriptionId})
func (*Router) GetBillingProfile ¶
func (a *Router) GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params api.GetBillingProfileParams)
Get a billing profile by ID (GET /api/v1/billing/profile/{id})
func (*Router) GetBillingProfileCustomerOverride ¶
func (a *Router) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
Get a customer override (GET /api/v1/billing/customer/{customerId})
func (*Router) GetCustomer ¶
Get customer (GET /api/v1/customer/customers/{customerId})
func (*Router) GetCustomerEntitlementValue ¶
func (a *Router) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerId string, featureKey string, params api.GetCustomerEntitlementValueParams)
Get entitlement value (GET /api/v1/customers/{customerId}/entitlements/{featureKey}/value)
func (*Router) GetDebugMetrics ¶
func (a *Router) GetDebugMetrics(w http.ResponseWriter, r *http.Request)
Get debug metrics (GET /api/v1/debug/metrics)
func (*Router) GetEntitlement ¶
func (a *Router) GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)
Get entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
func (*Router) GetEntitlementById ¶
Get an entitlement (GET /api/v1/entitlements/{entitlementId})
func (*Router) GetEntitlementHistory ¶
func (a *Router) GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string, params api.GetEntitlementHistoryParams)
Get the balance history of a specific entitlement. (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history)
func (*Router) GetEntitlementValue ¶
func (a *Router) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params api.GetEntitlementValueParams)
Get the value of a specific entitlement. (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value)
func (*Router) GetFeature ¶
Get feature (GET /api/v1/features/{featureId})
func (*Router) GetInvoice ¶
func (a *Router) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, params api.GetInvoiceParams)
Get an invoice (GET /api/v1/billing/invoices/{invoiceId})
func (*Router) GetMarketplaceListing ¶
Get a marketplace listing (GET /api/v1/marketplace/listings/{appType})
func (*Router) GetNotificationChannel ¶
Get notification channel (GET /api/v1/notification/channels/{channelId})
func (*Router) GetNotificationEvent ¶
Get notification event (GET /api/v1/notification/events/{eventId})
func (*Router) GetNotificationRule ¶
Get notification rule (GET /api/v1/notification/rules/{ruleId})
func (*Router) GetPlan ¶
func (a *Router) GetPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string, params api.GetPlanParams)
Get plan (GET /api/v1/plans/{planId})
func (*Router) GetSubscription ¶
func (a *Router) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string, params api.GetSubscriptionParams)
(GET /api/v1/subscriptions/{subscriptionId})
func (*Router) IngestEvents ¶
func (a *Router) IngestEvents(w http.ResponseWriter, r *http.Request)
func (*Router) InvalidatePortalTokens ¶
func (a *Router) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)
POST /api/v1/portal/tokens/invalidate
func (*Router) InvoicePendingLinesAction ¶
func (a *Router) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request)
Invoice a customer based on the pending line items (POST /api/v1/billing/invoices/{customerId}/invoice)
func (*Router) ListApps ¶
func (a *Router) ListApps(w http.ResponseWriter, r *http.Request, params api.ListAppsParams)
Handle to list apps (GET /api/v1/apps)
func (*Router) ListBillingProfileCustomerOverrides ¶
func (a *Router) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params api.ListBillingProfileCustomerOverridesParams)
List customer overrides (GET /api/v1/billing/customer)
func (*Router) ListBillingProfiles ¶
func (a *Router) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params api.ListBillingProfilesParams)
(GET /api/v1/billing/profile)
func (*Router) ListCurrencies ¶
func (a *Router) ListCurrencies(w http.ResponseWriter, r *http.Request)
List supported currencies (GET /api/v1/info/currencies)
func (*Router) ListCustomerAppData ¶
func (a *Router) ListCustomerAppData(w http.ResponseWriter, r *http.Request, customerID string, params api.ListCustomerAppDataParams)
List customer apps (GET /api/v1/customer/customers/{customerId}/apps)
func (*Router) ListCustomers ¶
func (a *Router) ListCustomers(w http.ResponseWriter, r *http.Request, params api.ListCustomersParams)
List customers (GET /api/v1/customer/customers)
func (*Router) ListEntitlementGrants ¶
func (a *Router) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params api.ListEntitlementGrantsParams)
List grants for an entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants)
func (*Router) ListEntitlements ¶
func (a *Router) ListEntitlements(w http.ResponseWriter, r *http.Request, params api.ListEntitlementsParams)
List entitlements (GET /api/v1/entitlements)
func (*Router) ListEvents ¶
func (a *Router) ListEvents(w http.ResponseWriter, r *http.Request, params api.ListEventsParams)
func (*Router) ListFeatures ¶
func (a *Router) ListFeatures(w http.ResponseWriter, r *http.Request, params api.ListFeaturesParams)
List features (GET /api/v1/features)
func (*Router) ListGrants ¶
func (a *Router) ListGrants(w http.ResponseWriter, r *http.Request, params api.ListGrantsParams)
List grants (GET /api/v1/grants)
func (*Router) ListInvoices ¶
func (a *Router) ListInvoices(w http.ResponseWriter, r *http.Request, params api.ListInvoicesParams)
List invoices (GET /api/v1/billing/invoices)
func (*Router) ListMarketplaceListings ¶
func (a *Router) ListMarketplaceListings(w http.ResponseWriter, r *http.Request, params api.ListMarketplaceListingsParams)
List marketplace listings (GET /api/v1/marketplace/listings)
func (*Router) ListMeterSubjects ¶
GET /api/v1/meters/{meterIdOrSlug}/subjects
func (*Router) ListMeters ¶
func (a *Router) ListMeters(w http.ResponseWriter, r *http.Request)
GET /api/v1/meters
func (*Router) ListNotificationChannels ¶
func (a *Router) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params api.ListNotificationChannelsParams)
List notification channels (GET /api/v1/notification/channels)
func (*Router) ListNotificationEvents ¶
func (a *Router) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params api.ListNotificationEventsParams)
List notification evens (GET /api/v1/notification/events)
func (*Router) ListNotificationRules ¶
func (a *Router) ListNotificationRules(w http.ResponseWriter, r *http.Request, params api.ListNotificationRulesParams)
List notification rules (GET /api/v1/notification/rules)
func (*Router) ListPlans ¶
func (a *Router) ListPlans(w http.ResponseWriter, r *http.Request, params api.ListPlansParams)
List plans (GET /api/v1/plans)
func (*Router) ListPortalTokens ¶
func (a *Router) ListPortalTokens(w http.ResponseWriter, r *http.Request, params api.ListPortalTokensParams)
GET /api/v1/portal/tokens
func (*Router) ListSubjectEntitlements ¶
func (a *Router) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, params api.ListSubjectEntitlementsParams)
List entitlements (GET /api/v1/subjects/{subjectIdOrKey}/entitlements)
func (*Router) MarketplaceAppAPIKeyInstall ¶
func (a *Router) MarketplaceAppAPIKeyInstall(w http.ResponseWriter, r *http.Request, appType api.AppType)
Install a marketplace app by API key (POST /api/v1/marketplace/install/apikey)
func (*Router) MarketplaceOAuth2InstallAuthorize ¶
func (a *Router) MarketplaceOAuth2InstallAuthorize(w http.ResponseWriter, r *http.Request, appType api.AppType, params api.MarketplaceOAuth2InstallAuthorizeParams)
Authorize the installation of a marketplace app by OAuth2 (// (GET /api/v1/marketplace/install/oauth2/authorize))
func (*Router) MarketplaceOAuth2InstallGetURL ¶
func (a *Router) MarketplaceOAuth2InstallGetURL(w http.ResponseWriter, r *http.Request, appType api.AppType)
Get the URL to install a marketplace app by OAuth2 (GET /api/v1/marketplace/install/oauth2)
func (*Router) MigrateSubscription ¶
(POST /api/v1/subscriptions/{subscriptionId}/migrate)
func (*Router) OverrideEntitlement ¶
func (a *Router) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)
Override an entitlement (PUT /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override)
func (*Router) PublishPlan ¶
Publish plan (POST /api/v1/plans/{planId}/publish)
func (*Router) QueryMeter ¶
func (a *Router) QueryMeter(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, params api.QueryMeterParams)
GET /api/v1/meters/{meterIdOrSlug}/query
func (*Router) QueryPortalMeter ¶
func (a *Router) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, params api.QueryPortalMeterParams)
TODO: migrate to http handler GET /api/v1/portal/meters/{meterSlug}/query
func (*Router) RecalculateInvoiceTaxAction ¶
func (a *Router) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, invoiceId string)
Recalculate an invoice's tax amounts (POST /api/v1/billing/invoices/{invoiceId}/tax/recalculate)
func (*Router) ReceiveSvixOperationalEvent ¶
func (a *Router) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
Receive Svix operational events (POST /api/v1/notification/webhook/svix)
func (*Router) ResetEntitlementUsage ¶
func (a *Router) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)
Reset entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset)
func (*Router) RetryInvoiceAction ¶
Retry a failed synchronization step of the invoice (POST /api/v1/billing/invoices/{invoiceId}/retry)
func (*Router) SimulateInvoice ¶
Simulate an invoice for a customer (POST /api/v1/billing/customers/{customerId}/invoices/simulate)
func (*Router) TestNotificationRule ¶
Test notification rule (POST /api/v1/notification/rules/{ruleId}/test)
func (*Router) UninstallApp ¶
Uninstall an app by id (DELETE /api/v1/apps/{id})
func (*Router) UnscheduleCancelation ¶
func (a *Router) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId string)
(POST /api/v1/subscriptions/{subscriptionId}/unschedule-cancelation)
func (*Router) UpdateBillingProfile ¶
Update a billing profile (PUT /api/v1/billing/profile/{id})
func (*Router) UpdateCustomer ¶
Update customer (PUT /api/v1/customer/customers/{customerId})
func (*Router) UpdateInvoice ¶
Update an invoice (PUT /api/v1/billing/invoices/{invoiceId})
func (*Router) UpdateNotificationChannel ¶
func (a *Router) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)
Update notification channel (PUT /api/v1/notification/channels/{channelId})
func (*Router) UpdateNotificationRule ¶
Update a notification rule (PUT /api/v1/notification/rules/{ruleId})
func (*Router) UpdatePlan ¶
Update a plan (PUT /api/v1/plans/{planId})
func (*Router) UpdateStripeAPIKey ¶
Handle update stripe api key (POST /api/v1/apps/{id}/stripe/api-key)
func (*Router) UpsertBillingProfileCustomerOverride ¶
func (a *Router) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
Create/update a customer override (POST /api/v1/billing/customer/{customerId})
func (*Router) UpsertCustomerAppData ¶
Upsert customer app data (PUT /api/v1/customer/customers/{customerId}/apps/{appId})
func (*Router) VoidInvoiceAction ¶
Void an invoice (POST /api/v1/billing/invoices/{invoiceId}/void)