router

package
v1.0.0-beta.217 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addon                       addon.Service
	App                         app.Service
	AppStripe                   appstripe.Service
	AppCustomInvoicing          appcustominvoicing.SyncService
	Billing                     billing.Service
	BillingFeatureSwitches      config.BillingFeatureSwitchesConfiguration
	Customer                    customer.Service
	DebugConnector              debug.DebugConnector
	EntitlementConnector        entitlement.Connector
	EntitlementBalanceConnector meteredentitlement.Connector
	ErrorHandler                errorsx.Handler
	FeatureConnector            feature.FeatureConnector
	GrantConnector              credit.GrantConnector
	GrantRepo                   grant.Repo
	IngestHandler               http.Handler
	Logger                      *slog.Logger
	MeterManageService          meter.ManageService
	MeterEventService           meterevent.Service
	NamespaceManager            *namespace.Manager
	Notification                notification.Service
	Plan                        plan.Service
	PlanAddon                   planaddon.Service
	PlanSubscriptionService     plansubscription.PlanSubscriptionService
	PortalCORSEnabled           bool
	Portal                      portal.Service
	ProgressManager             progressmanager.Service
	StreamingConnector          streaming.Connector
	SubscriptionService         subscription.Service
	SubscriptionAddonService    subscriptionaddon.Service
	SubscriptionWorkflowService subscriptionworkflow.Service
	SubjectService              subject.Service
}

func (Config) Validate

func (c Config) Validate() error

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 NewRouter

func NewRouter(config Config) (*Router, error)

func (*Router) AdvanceInvoiceAction

func (a *Router) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Advance the invoice's state to the next status (POST /api/v1/billing/invoices/{invoiceId}/advance)

func (*Router) AppCustomInvoicingDraftSynchronized

func (a *Router) AppCustomInvoicingDraftSynchronized(w http.ResponseWriter, r *http.Request, invoiceId string)

Submit draft synchronization results (POST /api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronized)

func (*Router) AppCustomInvoicingIssuingSynchronized

func (a *Router) AppCustomInvoicingIssuingSynchronized(w http.ResponseWriter, r *http.Request, invoiceId string)

Submit issuing synchronization results (POST /api/v1/apps/custom-invoicing/{invoiceId}/issuing/synchronized)

func (*Router) AppCustomInvoicingUpdatePaymentStatus

func (a *Router) AppCustomInvoicingUpdatePaymentStatus(w http.ResponseWriter, r *http.Request, invoiceId string)

Update payment status (POST /api/v1/apps/custom-invoicing/{invoiceId}/payment/status)

func (*Router) AppStripeWebhook

func (a *Router) AppStripeWebhook(w http.ResponseWriter, r *http.Request, appID string)

Handle app stripe webhook (POST /api/v1/apps/{appId}/stripe/webhook)

func (*Router) ApproveInvoiceAction

func (a *Router) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Send the invoice to the customer (POST /api/v1/billing/invoices/{invoiceId}/approve)

func (*Router) ArchiveAddon

func (a *Router) ArchiveAddon(w http.ResponseWriter, r *http.Request, addonId string)

Archive addon version (POST /api/v1/addons/{addonId}/archive)

func (*Router) ArchivePlan

func (a *Router) ArchivePlan(w http.ResponseWriter, r *http.Request, planId string)

Archive plan version (POST /api/v1/plans/{planId}/archive)

func (*Router) CancelSubscription

func (a *Router) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

(POST /api/v1/subscriptions/{subscriptionId}/cancel)

func (*Router) ChangeSubscription

func (a *Router) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

func (*Router) CreateAddon

func (a *Router) CreateAddon(w http.ResponseWriter, r *http.Request)

Create a addon (POST /api/v1/addons)

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

func (a *Router) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)

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) CreateMeter

func (a *Router) CreateMeter(w http.ResponseWriter, r *http.Request)

POST /api/v1/meters/

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, customerId string)

Create a new line item (POST /api/v1/billing/customers/{customerId}/pending-lines)

func (*Router) CreatePlan

func (a *Router) CreatePlan(w http.ResponseWriter, r *http.Request)

Create a plan (POST /api/v1/plans)

func (*Router) CreatePlanAddon

func (a *Router) CreatePlanAddon(w http.ResponseWriter, r *http.Request, planId string)

Create new add-on assignment for plan (POST /api/v1/plans/{planId}/addons)

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) CreateSubscriptionAddon

func (a *Router) CreateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId string)

Create a subscription addon (POST /api/v1/subscriptions/{subscriptionId}/addons)

func (*Router) DeleteAddon

func (a *Router) DeleteAddon(w http.ResponseWriter, r *http.Request, addonId string)

Delete addon (DELETE /api/v1/addons/{addonId})

func (*Router) DeleteBillingProfile

func (a *Router) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string)

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

func (a *Router) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerIDOrKey string)

Delete a customer (DELETE /api/v1/customer/customers/{customerId})

func (*Router) DeleteCustomerAppData

func (a *Router) DeleteCustomerAppData(w http.ResponseWriter, r *http.Request, customerIDOrKey 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

func (a *Router) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId string)

Delete feature (DELETE /api/v1/features/{featureId})

func (*Router) DeleteInvoice

func (a *Router) DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)

Delete an invoice (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId})

func (*Router) DeleteMeter

func (a *Router) DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)

DELETE /api/v1/meters/{meterIdOrSlug}

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

func (a *Router) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)

Delete a notification rule (DELETE /api/v1/notification/rules/{ruleId})

func (*Router) DeletePlan

func (a *Router) DeletePlan(w http.ResponseWriter, r *http.Request, planId string)

Delete plan (DELETE /api/v1/plans/{planId})

func (*Router) DeletePlanAddon

func (a *Router) DeletePlanAddon(w http.ResponseWriter, r *http.Request, planId string, planAddonId string)

Delete add-on assignment for plan (DELETE /api/v1/plans/{planId}/addons/{planAddonId})

func (*Router) DeleteSubject

func (a *Router) DeleteSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)

DELETE /api/v1/subjects/{subjectIdOrKey}

func (*Router) DeleteSubscription

func (a *Router) DeleteSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

(DELETE /api/v1/subscriptions/{subscriptionId})

func (*Router) EditSubscription

func (a *Router) EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

(PATCH /api/v1/subscriptions/{subscriptionId})

func (*Router) GetAddon

func (a *Router) GetAddon(w http.ResponseWriter, r *http.Request, addonId string, params api.GetAddonParams)

Get addon (GET /api/v1/addons/{addonId})

func (*Router) GetApp

func (a *Router) GetApp(w http.ResponseWriter, r *http.Request, appID string)

Handle to get app by id (GET /api/v1/apps/{appId})

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, params api.GetBillingProfileCustomerOverrideParams)

Get a customer override (GET /api/v1/billing/customer/{customerId})

func (*Router) GetCustomer

func (a *Router) GetCustomer(w http.ResponseWriter, r *http.Request, customerIDOrKey string, params api.GetCustomerParams)

Get customer (GET /api/v1/customer/customers/{customerId})

func (*Router) GetCustomerAccess

func (a *Router) GetCustomerAccess(w http.ResponseWriter, r *http.Request, customerIdOrKey string)

Get customer access (GET /api/v1/customers/{customerId}/access)

func (*Router) GetCustomerEntitlementValue

func (a *Router) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerIdOrKey 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

func (a *Router) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId string)

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

func (a *Router) GetFeature(w http.ResponseWriter, r *http.Request, featureId string)

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

func (a *Router) GetMarketplaceListing(w http.ResponseWriter, r *http.Request, appType api.AppType)

Get a marketplace listing (GET /api/v1/marketplace/listings/{appType})

func (*Router) GetMeter

func (a *Router) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)

GET /api/v1/meters/{meterIdOrSlug}

func (*Router) GetNotificationChannel

func (a *Router) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)

Get notification channel (GET /api/v1/notification/channels/{channelId})

func (*Router) GetNotificationEvent

func (a *Router) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventID string)

Get notification event (GET /api/v1/notification/events/{eventId})

func (*Router) GetNotificationRule

func (a *Router) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)

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) GetPlanAddon

func (a *Router) GetPlanAddon(w http.ResponseWriter, r *http.Request, planId string, planAddonId string)

Get add-on assignment for plan (GET /api/v1/plans/{planId}/addons/{planAddonId})

func (*Router) GetProgress

func (a *Router) GetProgress(w http.ResponseWriter, r *http.Request, progressID string)

Get progress (GET /api/v1/info/progress/{progress_id})

func (*Router) GetSubject

func (a *Router) GetSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)

GET /api/v1/subjects/{subjectIdOrKey}

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) GetSubscriptionAddon

func (a *Router) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId string, subscriptionAddonId string)

Get subscription addon (GET /api/v1/subscriptions/{subscriptionId}/addons/{subscriptionAddonId})

func (*Router) IngestEvents

func (a *Router) IngestEvents(w http.ResponseWriter, r *http.Request)

POST /api/v1/events

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) ListAddons

func (a *Router) ListAddons(w http.ResponseWriter, r *http.Request, params api.ListAddonsParams)

List addons (GET /api/v1/addons)

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, customerIdOrKey string, params api.ListCustomerAppDataParams)

List customer apps (GET /api/v1/customer/customers/{customerId}/apps)

func (*Router) ListCustomerSubscriptions

func (a *Router) ListCustomerSubscriptions(w http.ResponseWriter, r *http.Request, customerIDOrKey string, params api.ListCustomerSubscriptionsParams)

List customer subscriptions (GET /api/v1/customer/customers/{customerId}/subscriptions)

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)

GET /api/v1/events

func (*Router) ListEventsV2

func (a *Router) ListEventsV2(w http.ResponseWriter, r *http.Request, params api.ListEventsV2Params)

GET /api/v2/events

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

func (a *Router) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIDOrSlug string)

GET /api/v1/meters/{meterIdOrSlug}/subjects

func (*Router) ListMeters

func (a *Router) ListMeters(w http.ResponseWriter, r *http.Request, params api.ListMetersParams)

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) ListPlanAddons

func (a *Router) ListPlanAddons(w http.ResponseWriter, r *http.Request, planId string, params api.ListPlanAddonsParams)

List all available add-ons for plan (GET /api/v1/plans/{planId}/addons)

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) ListSubjects

func (a *Router) ListSubjects(w http.ResponseWriter, r *http.Request)

GET /api/v1/subjects

func (*Router) ListSubscriptionAddons

func (a *Router) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request, subscriptionId string)

List subscription addons (GET /api/v1/subscriptions/{subscriptionId}/addons)

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) MarketplaceAppInstall

func (a *Router) MarketplaceAppInstall(w http.ResponseWriter, r *http.Request, appType api.AppType)

Install app (POST /api/v1/marketplace/listings/{type}/install)

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

func (a *Router) MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

(POST /api/v1/subscriptions/{subscriptionId}/migrate)

func (*Router) NextPlan

func (a *Router) NextPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string)

New draft plan (POST /api/v1/plans/{planIdOrKey}/next)

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) PublishAddon

func (a *Router) PublishAddon(w http.ResponseWriter, r *http.Request, addonId string)

Publish addon (POST /api/v1/addons/{addonId}/publish)

func (*Router) PublishPlan

func (a *Router) PublishPlan(w http.ResponseWriter, r *http.Request, planId string)

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) QueryMeterPost

func (a *Router) QueryMeterPost(w http.ResponseWriter, r *http.Request, meterIDOrSlug string)

POST /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) 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) RestoreSubscription

func (a *Router) RestoreSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

(POST /api/v1/subscriptions/{subscriptionId}/restore)

func (*Router) RetryInvoiceAction

func (a *Router) RetryInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Retry a failed synchronization step of the invoice (POST /api/v1/billing/invoices/{invoiceId}/retry)

func (*Router) SimulateInvoice

func (a *Router) SimulateInvoice(w http.ResponseWriter, r *http.Request, customerId string)

Simulate an invoice for a customer (POST /api/v1/billing/customers/{customerId}/invoices/simulate)

func (*Router) SnapshotQuantitiesInvoiceAction

func (a *Router) SnapshotQuantitiesInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Snapshot quantities for usage based line items (POST /api/v1/billing/invoices/{invoiceId}/snapshot-quantities)

func (*Router) TestNotificationRule

func (a *Router) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)

Test notification rule (POST /api/v1/notification/rules/{ruleId}/test)

func (*Router) UninstallApp

func (a *Router) UninstallApp(w http.ResponseWriter, r *http.Request, appID string)

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) UpdateAddon

func (a *Router) UpdateAddon(w http.ResponseWriter, r *http.Request, addonId string)

Update a addon (PUT /api/v1/addons/{addonId})

func (*Router) UpdateApp

func (a *Router) UpdateApp(w http.ResponseWriter, r *http.Request, appID string)

Handle to update an app (PUT /api/v1/apps/{appId})

func (*Router) UpdateBillingProfile

func (a *Router) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string)

Update a billing profile (PUT /api/v1/billing/profile/{id})

func (*Router) UpdateCustomer

func (a *Router) UpdateCustomer(w http.ResponseWriter, r *http.Request, customerIDOrKey string)

Update customer (PUT /api/v1/customer/customers/{customerId})

func (*Router) UpdateInvoice

func (a *Router) UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)

Update an invoice (PUT /api/v1/billing/invoices/{invoiceId})

func (*Router) UpdateMeter

func (a *Router) UpdateMeter(w http.ResponseWriter, r *http.Request, meterID string)

PUT /api/v1/meters/{meterIdOrSlug}

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

func (a *Router) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)

Update a notification rule (PUT /api/v1/notification/rules/{ruleId})

func (*Router) UpdatePlan

func (a *Router) UpdatePlan(w http.ResponseWriter, r *http.Request, planId string)

Update a plan (PUT /api/v1/plans/{planId})

func (*Router) UpdatePlanAddon

func (a *Router) UpdatePlanAddon(w http.ResponseWriter, r *http.Request, planId string, planAddonId string)

Update add-on assignment for plan (PUT /api/v1/plans/{planId}/addons/{planAddonId})

func (*Router) UpdateStripeAPIKey

func (a *Router) UpdateStripeAPIKey(w http.ResponseWriter, r *http.Request, appID string)

Handle update stripe api key (POST /api/v1/apps/{id}/stripe/api-key)

func (*Router) UpdateSubscriptionAddon

func (a *Router) UpdateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId string, subscriptionAddonId string)

Update a subscription addon (PATCH /api/v1/subscriptions/{subscriptionId}/addons/{subscriptionAddonId})

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

func (a *Router) UpsertCustomerAppData(w http.ResponseWriter, r *http.Request, customerIDOrKey string)

Upsert customer app data (PUT /api/v1/customer/customers/{customerId}/apps/{appId})

func (*Router) UpsertSubject

func (a *Router) UpsertSubject(w http.ResponseWriter, r *http.Request)

POST /api/v1/subjects

func (*Router) VoidGrant

func (a *Router) VoidGrant(w http.ResponseWriter, r *http.Request, grantId string)

Delete a grant (DELETE /api/v1/grants/{grantId})

func (*Router) VoidInvoiceAction

func (a *Router) VoidInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Void an invoice (POST /api/v1/billing/invoices/{invoiceId}/void)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL