Documentation
¶
Index ¶
- type AddonHandler
- func (h *AddonHandler) CreateAddon(c *gin.Context)
- func (h *AddonHandler) DeleteAddon(c *gin.Context)
- func (h *AddonHandler) GetAddon(c *gin.Context)
- func (h *AddonHandler) GetAddonByLookupKey(c *gin.Context)
- func (h *AddonHandler) GetAddonEntitlements(c *gin.Context)
- func (h *AddonHandler) GetAddons(c *gin.Context)
- func (h *AddonHandler) ListAddonsByFilter(c *gin.Context)
- func (h *AddonHandler) UpdateAddon(c *gin.Context)
- type AlertLogsHandler
- type AuthHandler
- type ConnectionHandler
- func (h *ConnectionHandler) CreateConnection(c *gin.Context)
- func (h *ConnectionHandler) DeleteConnection(c *gin.Context)
- func (h *ConnectionHandler) GetConnection(c *gin.Context)
- func (h *ConnectionHandler) GetConnections(c *gin.Context)
- func (h *ConnectionHandler) ListConnectionsByFilter(c *gin.Context)
- func (h *ConnectionHandler) UpdateConnection(c *gin.Context)
- type CostsheetHandler
- func (h *CostsheetHandler) CreateCostsheet(c *gin.Context)
- func (h *CostsheetHandler) DeleteCostsheet(c *gin.Context)
- func (h *CostsheetHandler) GetActiveCostsheetForTenant(c *gin.Context)
- func (h *CostsheetHandler) GetCostsheet(c *gin.Context)
- func (h *CostsheetHandler) ListCostsheetByFilter(c *gin.Context)
- func (h *CostsheetHandler) UpdateCostsheet(c *gin.Context)
- type CouponHandler
- type CreditGrantHandler
- func (h *CreditGrantHandler) CreateCreditGrant(c *gin.Context)
- func (h *CreditGrantHandler) DeleteCreditGrant(c *gin.Context)
- func (h *CreditGrantHandler) GetCreditGrant(c *gin.Context)
- func (h *CreditGrantHandler) ListCreditGrants(c *gin.Context)
- func (h *CreditGrantHandler) UpdateCreditGrant(c *gin.Context)
- type CreditNoteHandler
- func (h *CreditNoteHandler) CreateCreditNote(c *gin.Context)
- func (h *CreditNoteHandler) FinalizeCreditNote(c *gin.Context)
- func (h *CreditNoteHandler) GetCreditNote(c *gin.Context)
- func (h *CreditNoteHandler) ListCreditNotes(c *gin.Context)
- func (h *CreditNoteHandler) VoidCreditNote(c *gin.Context)
- type CustomerHandler
- func (h *CustomerHandler) CreateCustomer(c *gin.Context)
- func (h *CustomerHandler) DeleteCustomer(c *gin.Context)
- func (h *CustomerHandler) GetCustomer(c *gin.Context)
- func (h *CustomerHandler) GetCustomerByLookupKey(c *gin.Context)
- func (h *CustomerHandler) GetCustomerEntitlements(c *gin.Context)
- func (h *CustomerHandler) GetCustomerUsageSummary(c *gin.Context)
- func (h *CustomerHandler) GetCustomers(c *gin.Context)
- func (h *CustomerHandler) GetUpcomingCreditGrantApplications(c *gin.Context)
- func (h *CustomerHandler) ListCustomersByFilter(c *gin.Context)
- func (h *CustomerHandler) UpdateCustomer(c *gin.Context)
- type CustomerPortalHandler
- func (h *CustomerPortalHandler) CreateSession(c *gin.Context)
- func (h *CustomerPortalHandler) GetAnalytics(c *gin.Context)
- func (h *CustomerPortalHandler) GetCostAnalytics(c *gin.Context)
- func (h *CustomerPortalHandler) GetCustomer(c *gin.Context)
- func (h *CustomerPortalHandler) GetInvoice(c *gin.Context)
- func (h *CustomerPortalHandler) GetInvoicePDF(c *gin.Context)
- func (h *CustomerPortalHandler) GetInvoices(c *gin.Context)
- func (h *CustomerPortalHandler) GetSubscription(c *gin.Context)
- func (h *CustomerPortalHandler) GetSubscriptions(c *gin.Context)
- func (h *CustomerPortalHandler) GetUsageSummary(c *gin.Context)
- func (h *CustomerPortalHandler) GetWallet(c *gin.Context)
- func (h *CustomerPortalHandler) GetWalletTransactions(c *gin.Context)
- func (h *CustomerPortalHandler) GetWallets(c *gin.Context)
- func (h *CustomerPortalHandler) UpdateCustomer(c *gin.Context)
- type EntitlementHandler
- func (h *EntitlementHandler) CreateBulkEntitlement(c *gin.Context)
- func (h *EntitlementHandler) CreateEntitlement(c *gin.Context)
- func (h *EntitlementHandler) DeleteEntitlement(c *gin.Context)
- func (h *EntitlementHandler) GetEntitlement(c *gin.Context)
- func (h *EntitlementHandler) ListEntitlements(c *gin.Context)
- func (h *EntitlementHandler) ListEntitlementsByFilter(c *gin.Context)
- func (h *EntitlementHandler) UpdateEntitlement(c *gin.Context)
- type EntityIntegrationMappingHandler
- func (h *EntityIntegrationMappingHandler) CreateEntityIntegrationMapping(c *gin.Context)
- func (h *EntityIntegrationMappingHandler) DeleteEntityIntegrationMapping(c *gin.Context)
- func (h *EntityIntegrationMappingHandler) GetEntityIntegrationMapping(c *gin.Context)
- func (h *EntityIntegrationMappingHandler) ListEntityIntegrationMappings(c *gin.Context)
- type EnvironmentHandler
- type EventsHandler
- func (h *EventsHandler) BulkIngestEvent(c *gin.Context)
- func (h *EventsHandler) GetEvents(c *gin.Context)
- func (h *EventsHandler) GetHuggingFaceBillingData(c *gin.Context)
- func (h *EventsHandler) GetMonitoringData(c *gin.Context)
- func (h *EventsHandler) GetUsage(c *gin.Context)
- func (h *EventsHandler) GetUsageAnalytics(c *gin.Context)
- func (h *EventsHandler) GetUsageAnalyticsV2(c *gin.Context)
- func (h *EventsHandler) GetUsageByMeter(c *gin.Context)
- func (h *EventsHandler) IngestEvent(c *gin.Context)
- func (h *EventsHandler) QueryEvents(c *gin.Context)
- type FeatureHandler
- func (h *FeatureHandler) CreateFeature(c *gin.Context)
- func (h *FeatureHandler) DeleteFeature(c *gin.Context)
- func (h *FeatureHandler) GetFeature(c *gin.Context)
- func (h *FeatureHandler) ListFeatures(c *gin.Context)
- func (h *FeatureHandler) ListFeaturesByFilter(c *gin.Context)
- func (h *FeatureHandler) UpdateFeature(c *gin.Context)
- type GroupHandler
- type HealthHandler
- type InvoiceHandler
- func (h *InvoiceHandler) AttemptPayment(c *gin.Context)
- func (h *InvoiceHandler) CreateOneOffInvoice(c *gin.Context)
- func (h *InvoiceHandler) FinalizeInvoice(c *gin.Context)
- func (h *InvoiceHandler) GetCustomerInvoiceSummary(c *gin.Context)
- func (h *InvoiceHandler) GetInvoice(c *gin.Context)
- func (h *InvoiceHandler) GetInvoicePDF(c *gin.Context)
- func (h *InvoiceHandler) GetPreviewInvoice(c *gin.Context)
- func (h *InvoiceHandler) ListInvoices(c *gin.Context)
- func (h *InvoiceHandler) ListInvoicesByFilter(c *gin.Context)
- func (h *InvoiceHandler) RecalculateInvoice(c *gin.Context)
- func (h *InvoiceHandler) TriggerCommunication(c *gin.Context)
- func (h *InvoiceHandler) UpdateInvoice(c *gin.Context)
- func (h *InvoiceHandler) UpdatePaymentStatus(c *gin.Context)
- func (h *InvoiceHandler) VoidInvoice(c *gin.Context)
- type MeterHandler
- func (h *MeterHandler) CreateMeter(c *gin.Context)
- func (h *MeterHandler) DeleteMeter(c *gin.Context)
- func (h *MeterHandler) DisableMeter(c *gin.Context)
- func (h *MeterHandler) GetAllMeters(c *gin.Context)
- func (h *MeterHandler) GetMeter(c *gin.Context)
- func (h *MeterHandler) UpdateMeter(c *gin.Context)
- type OAuthHandler
- type OnboardingHandler
- type PaymentHandler
- func (h *PaymentHandler) CreatePayment(c *gin.Context)
- func (h *PaymentHandler) DeletePayment(c *gin.Context)
- func (h *PaymentHandler) GetPayment(c *gin.Context)
- func (h *PaymentHandler) ListPayments(c *gin.Context)
- func (h *PaymentHandler) ProcessPayment(c *gin.Context)
- func (h *PaymentHandler) UpdatePayment(c *gin.Context)
- type PlanHandler
- func (h *PlanHandler) CreatePlan(c *gin.Context)
- func (h *PlanHandler) DeletePlan(c *gin.Context)
- func (h *PlanHandler) GetPlan(c *gin.Context)
- func (h *PlanHandler) GetPlanCreditGrants(c *gin.Context)
- func (h *PlanHandler) GetPlanEntitlements(c *gin.Context)
- func (h *PlanHandler) GetPlans(c *gin.Context)
- func (h *PlanHandler) ListPlansByFilter(c *gin.Context)
- func (h *PlanHandler) SyncPlanPrices(c *gin.Context)
- func (h *PlanHandler) UpdatePlan(c *gin.Context)
- type PriceHandler
- func (h *PriceHandler) CreateBulkPrice(c *gin.Context)
- func (h *PriceHandler) CreatePrice(c *gin.Context)
- func (h *PriceHandler) DeletePrice(c *gin.Context)
- func (h *PriceHandler) GetPrice(c *gin.Context)
- func (h *PriceHandler) GetPrices(c *gin.Context)
- func (h *PriceHandler) UpdatePrice(c *gin.Context)
- type PriceUnitHandler
- func (h *PriceUnitHandler) CreatePriceUnit(c *gin.Context)
- func (h *PriceUnitHandler) DeletePriceUnit(c *gin.Context)
- func (h *PriceUnitHandler) GetPriceUnit(c *gin.Context)
- func (h *PriceUnitHandler) GetPriceUnitByCode(c *gin.Context)
- func (h *PriceUnitHandler) ListPriceUnits(c *gin.Context)
- func (h *PriceUnitHandler) ListPriceUnitsByFilter(c *gin.Context)
- func (h *PriceUnitHandler) UpdatePriceUnit(c *gin.Context)
- type RBACHandler
- type RevenueAnalyticsHandler
- type ScheduledTaskHandler
- func (h *ScheduledTaskHandler) CreateScheduledTask(c *gin.Context)
- func (h *ScheduledTaskHandler) DeleteScheduledTask(c *gin.Context)
- func (h *ScheduledTaskHandler) GetScheduledTask(c *gin.Context)
- func (h *ScheduledTaskHandler) ListScheduledTasks(c *gin.Context)
- func (h *ScheduledTaskHandler) ScheduleUpdateBillingPeriod(c *gin.Context)
- func (h *ScheduledTaskHandler) TriggerForceRun(c *gin.Context)
- func (h *ScheduledTaskHandler) UpdateScheduledTask(c *gin.Context)
- type SecretHandler
- func (h *SecretHandler) CreateAPIKey(c *gin.Context)
- func (h *SecretHandler) CreateIntegration(c *gin.Context)
- func (h *SecretHandler) DeleteAPIKey(c *gin.Context)
- func (h *SecretHandler) DeleteIntegration(c *gin.Context)
- func (h *SecretHandler) GetIntegration(c *gin.Context)
- func (h *SecretHandler) ListAPIKeys(c *gin.Context)
- func (h *SecretHandler) ListLinkedIntegrations(c *gin.Context)
- type SettingsHandler
- type SetupIntentHandler
- type SubscriptionChangeHandler
- type SubscriptionHandler
- func (h *SubscriptionHandler) ActivateDraftSubscription(c *gin.Context)
- func (h *SubscriptionHandler) AddAddonToSubscription(c *gin.Context)
- func (h *SubscriptionHandler) CancelSubscription(c *gin.Context)
- func (h *SubscriptionHandler) CreateSubscription(c *gin.Context)
- func (h *SubscriptionHandler) DeleteSubscriptionLineItem(c *gin.Context)
- func (h *SubscriptionHandler) GetActiveAddonAssociations(c *gin.Context)
- func (h *SubscriptionHandler) GetSubscription(c *gin.Context)
- func (h *SubscriptionHandler) GetSubscriptionEntitlements(c *gin.Context)
- func (h *SubscriptionHandler) GetSubscriptions(c *gin.Context)
- func (h *SubscriptionHandler) GetUpcomingCreditGrantApplications(c *gin.Context)
- func (h *SubscriptionHandler) GetUsageBySubscription(c *gin.Context)
- func (h *SubscriptionHandler) ListSubscriptionsByFilter(c *gin.Context)
- func (h *SubscriptionHandler) RemoveAddonToSubscription(c *gin.Context)
- func (h *SubscriptionHandler) UpdateSubscriptionLineItem(c *gin.Context)
- type SubscriptionPauseHandler
- type TaskHandler
- type TaxHandler
- func (h *TaxHandler) CreateTaxAssociation(c *gin.Context)
- func (h *TaxHandler) CreateTaxRate(c *gin.Context)
- func (h *TaxHandler) DeleteTaxAssociation(c *gin.Context)
- func (h *TaxHandler) DeleteTaxRate(c *gin.Context)
- func (h *TaxHandler) GetTaxAssociation(c *gin.Context)
- func (h *TaxHandler) GetTaxRate(c *gin.Context)
- func (h *TaxHandler) ListTaxAssociations(c *gin.Context)
- func (h *TaxHandler) ListTaxRates(c *gin.Context)
- func (h *TaxHandler) UpdateTaxAssociation(c *gin.Context)
- func (h *TaxHandler) UpdateTaxRate(c *gin.Context)
- type TenantHandler
- type UserHandler
- type WalletHandler
- func (h *WalletHandler) CreateWallet(c *gin.Context)
- func (h *WalletHandler) GetCustomerWallets(c *gin.Context)
- func (h *WalletHandler) GetWalletBalance(c *gin.Context)
- func (h *WalletHandler) GetWalletBalanceV2(c *gin.Context)
- func (h *WalletHandler) GetWalletByID(c *gin.Context)
- func (h *WalletHandler) GetWalletTransactions(c *gin.Context)
- func (h *WalletHandler) GetWalletsByCustomerID(c *gin.Context)
- func (h *WalletHandler) ListWalletTransactionsByFilter(c *gin.Context)
- func (h *WalletHandler) ListWallets(c *gin.Context)
- func (h *WalletHandler) ListWalletsByFilter(c *gin.Context)
- func (h *WalletHandler) ManualBalanceDebit(c *gin.Context)
- func (h *WalletHandler) TerminateWallet(c *gin.Context)
- func (h *WalletHandler) TopUpWallet(c *gin.Context)
- func (h *WalletHandler) UpdateWallet(c *gin.Context)
- type WebhookHandler
- func (h *WebhookHandler) GetDashboardURL(c *gin.Context)
- func (h *WebhookHandler) HandleChargebeeWebhook(c *gin.Context)
- func (h *WebhookHandler) HandleHubSpotWebhook(c *gin.Context)
- func (h *WebhookHandler) HandleNomodWebhook(c *gin.Context)
- func (h *WebhookHandler) HandleQuickBooksWebhook(c *gin.Context)
- func (h *WebhookHandler) HandleRazorpayWebhook(c *gin.Context)
- func (h *WebhookHandler) HandleStripeWebhook(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddonHandler ¶ added in v1.0.21
type AddonHandler struct {
// contains filtered or unexported fields
}
func NewAddonHandler ¶ added in v1.0.21
func NewAddonHandler(service service.AddonService, entitlementService service.EntitlementService, log *logger.Logger) *AddonHandler
func (*AddonHandler) CreateAddon ¶ added in v1.0.21
func (h *AddonHandler) CreateAddon(c *gin.Context)
@Summary Create addon @Description Create a new addon @Tags Addons @Accept json @Produce json @Security ApiKeyAuth @Param addon body dto.CreateAddonRequest true "Addon Request" @Success 201 {object} dto.CreateAddonResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons [post]
func (*AddonHandler) DeleteAddon ¶ added in v1.0.21
func (h *AddonHandler) DeleteAddon(c *gin.Context)
@Summary Delete addon @Description Delete an addon @Tags Addons @Produce json @Security ApiKeyAuth @Param id path string true "Addon ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons/{id} [delete]
func (*AddonHandler) GetAddon ¶ added in v1.0.21
func (h *AddonHandler) GetAddon(c *gin.Context)
@Summary Get addon @Description Get an addon by ID @Tags Addons @Produce json @Security ApiKeyAuth @Param id path string true "Addon ID" @Success 200 {object} dto.AddonResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons/{id} [get]
func (*AddonHandler) GetAddonByLookupKey ¶ added in v1.0.21
func (h *AddonHandler) GetAddonByLookupKey(c *gin.Context)
@Summary Get addon by lookup key @Description Get an addon by lookup key @Tags Addons @Produce json @Security ApiKeyAuth @Param lookup_key path string true "Addon Lookup Key" @Success 200 {object} dto.AddonResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons/lookup/{lookup_key} [get]
func (*AddonHandler) GetAddonEntitlements ¶ added in v1.0.35
func (h *AddonHandler) GetAddonEntitlements(c *gin.Context)
@Summary Get addon entitlements @Description Get all entitlements for an addon @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Addon ID" @Success 200 {object} dto.ListEntitlementsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons/{id}/entitlements [get]
func (*AddonHandler) GetAddons ¶ added in v1.0.21
func (h *AddonHandler) GetAddons(c *gin.Context)
@Summary List addons @Description Get addons with optional filtering @Tags Addons @Produce json @Security ApiKeyAuth @Param filter query types.AddonFilter false "Filter" @Success 200 {object} dto.ListAddonsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons [get]
func (*AddonHandler) ListAddonsByFilter ¶ added in v1.0.21
func (h *AddonHandler) ListAddonsByFilter(c *gin.Context)
@Summary List addons by filter @Description List addons by filter @Tags Addons @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.AddonFilter true "Filter" @Success 200 {object} dto.ListAddonsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons/search [post]
func (*AddonHandler) UpdateAddon ¶ added in v1.0.21
func (h *AddonHandler) UpdateAddon(c *gin.Context)
@Summary Update addon @Description Update an existing addon @Tags Addons @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Addon ID" @Param addon body dto.UpdateAddonRequest true "Update Addon Request" @Success 200 {object} dto.AddonResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /addons/{id} [put]
type AlertLogsHandler ¶ added in v1.0.35
type AlertLogsHandler struct {
// contains filtered or unexported fields
}
func NewAlertLogsHandler ¶ added in v1.0.35
func NewAlertLogsHandler( alertLogsService service.AlertLogsService, customerService service.CustomerService, walletService service.WalletService, featureService service.FeatureService, log *logger.Logger, ) *AlertLogsHandler
func (*AlertLogsHandler) ListAlertLogsByFilter ¶ added in v1.0.35
func (h *AlertLogsHandler) ListAlertLogsByFilter(c *gin.Context)
ListAlertLogsByFilter godoc @Summary List alert logs by filter @Description List alert logs by filter with optional expand for customer, wallet, and feature @Tags Alert Logs @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.AlertLogFilter true "Filter" @Success 200 {object} dto.ListAlertLogsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /alert/search [post]
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(cfg *config.Configuration, authService service.AuthService, logger *logger.Logger) *AuthHandler
func (*AuthHandler) Login ¶
func (h *AuthHandler) Login(c *gin.Context)
@Summary Login @Description Login a user @Tags Auth @Accept json @Produce json @Param login body dto.LoginRequest true "Login request" @Success 200 {object} dto.AuthResponse @Failure 400 {object} ierr.ErrorResponse @Router /auth/login [post]
func (*AuthHandler) SignUp ¶
func (h *AuthHandler) SignUp(c *gin.Context)
@Summary Sign up @Description Sign up a new user @Tags Auth @Accept json @Produce json @Param signup body dto.SignUpRequest true "Sign up request" @Success 200 {object} dto.AuthResponse @Failure 400 {object} ierr.ErrorResponse @Router /auth/signup [post]
type ConnectionHandler ¶ added in v1.0.21
type ConnectionHandler struct {
// contains filtered or unexported fields
}
func NewConnectionHandler ¶ added in v1.0.21
func NewConnectionHandler( service service.ConnectionService, log *logger.Logger, ) *ConnectionHandler
func (*ConnectionHandler) CreateConnection ¶ added in v1.0.21
func (h *ConnectionHandler) CreateConnection(c *gin.Context)
func (*ConnectionHandler) DeleteConnection ¶ added in v1.0.21
func (h *ConnectionHandler) DeleteConnection(c *gin.Context)
@Summary Delete a connection @Description Delete a connection by ID @Tags Connections @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Connection ID" @Success 204 @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /connections/{id} [delete]
func (*ConnectionHandler) GetConnection ¶ added in v1.0.21
func (h *ConnectionHandler) GetConnection(c *gin.Context)
@Summary Get a connection @Description Get a connection by ID @Tags Connections @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Connection ID" @Success 200 {object} dto.ConnectionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /connections/{id} [get]
func (*ConnectionHandler) GetConnections ¶ added in v1.0.21
func (h *ConnectionHandler) GetConnections(c *gin.Context)
@Summary Get connections @Description Get a list of connections @Tags Connections @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.ConnectionFilter false "Filter" @Success 200 {object} dto.ListConnectionsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /connections [get]
func (*ConnectionHandler) ListConnectionsByFilter ¶ added in v1.0.21
func (h *ConnectionHandler) ListConnectionsByFilter(c *gin.Context)
@Summary List connections by filter @Description List connections by filter @Tags Connections @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.ConnectionFilter true "Filter" @Success 200 {object} dto.ListConnectionsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /connections/search [post]
func (*ConnectionHandler) UpdateConnection ¶ added in v1.0.21
func (h *ConnectionHandler) UpdateConnection(c *gin.Context)
@Summary Update a connection @Description Update a connection by ID @Tags Connections @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Connection ID" @Param connection body dto.UpdateConnectionRequest true "Connection" @Success 200 {object} dto.ConnectionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /connections/{id} [put]
type CostsheetHandler ¶ added in v1.0.33
type CostsheetHandler struct {
// contains filtered or unexported fields
}
CostsheetHandler handles HTTP requests for costsheet operations.
func NewCostsheetHandler ¶ added in v1.0.33
func NewCostsheetHandler(service service.CostsheetService, log *logger.Logger) *CostsheetHandler
NewCostsheetHandler creates a new instance of CostsheetHandler.
func (*CostsheetHandler) CreateCostsheet ¶ added in v1.0.33
func (h *CostsheetHandler) CreateCostsheet(c *gin.Context)
@Summary Create a new costsheet @Description Create a new costsheet with the specified name @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param costsheet body dto.CreateCostsheetRequest true "Costsheet configuration" @Success 201 {object} dto.CreateCostsheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 409 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs [post]
func (*CostsheetHandler) DeleteCostsheet ¶ added in v1.0.33
func (h *CostsheetHandler) DeleteCostsheet(c *gin.Context)
@Summary Delete a costsheet @Description Soft delete a costsheet by setting its status to deleted @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Costsheet ID" @Success 200 {object} dto.DeleteCostsheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/{id} [delete]
func (*CostsheetHandler) GetActiveCostsheetForTenant ¶ added in v1.0.33
func (h *CostsheetHandler) GetActiveCostsheetForTenant(c *gin.Context)
@Summary Get active costsheet for tenant @Description Get the active costsheet for the current tenant @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} dto.CostsheetResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/active [get]
func (*CostsheetHandler) GetCostsheet ¶ added in v1.0.33
func (h *CostsheetHandler) GetCostsheet(c *gin.Context)
@Summary Get a costsheet by ID @Description Get a costsheet by ID with optional price expansion @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Costsheet ID" @Param expand query string false "Comma-separated list of fields to expand (e.g., 'prices')" @Success 200 {object} dto.GetCostsheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/{id} [get]
func (*CostsheetHandler) ListCostsheetByFilter ¶ added in v1.0.33
func (h *CostsheetHandler) ListCostsheetByFilter(c *gin.Context)
@Summary List costsheets by filter @Description List costsheet records by filter with POST body @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param filter body domainCostsheet.Filter true "Filter" @Success 200 {object} dto.ListCostsheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/search [post]
func (*CostsheetHandler) UpdateCostsheet ¶ added in v1.0.33
func (h *CostsheetHandler) UpdateCostsheet(c *gin.Context)
@Summary Update a costsheet @Description Update a costsheet with the specified configuration @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Costsheet ID" @Param costsheet body dto.UpdateCostsheetRequest true "Costsheet configuration" @Success 200 {object} dto.UpdateCostsheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 409 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/{id} [put]
type CouponHandler ¶ added in v1.0.21
type CouponHandler struct {
// contains filtered or unexported fields
}
func NewCouponHandler ¶ added in v1.0.21
func NewCouponHandler(couponService service.CouponService, logger *logger.Logger) *CouponHandler
func (*CouponHandler) CreateCoupon ¶ added in v1.0.21
func (h *CouponHandler) CreateCoupon(c *gin.Context)
@Summary Create a new coupon @Description Creates a new coupon @Tags Coupons @Accept json @Produce json @Security ApiKeyAuth @Param coupon body dto.CreateCouponRequest true "Coupon request" @Success 201 {object} dto.CouponResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /coupons [post] @Security ApiKeyAuth
func (*CouponHandler) DeleteCoupon ¶ added in v1.0.21
func (h *CouponHandler) DeleteCoupon(c *gin.Context)
@Summary Delete a coupon @Description Deletes a coupon @Tags Coupons @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Coupon ID" @Success 200 {object} map[string]string @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /coupons/{id} [delete] @Security ApiKeyAuth
func (*CouponHandler) GetCoupon ¶ added in v1.0.21
func (h *CouponHandler) GetCoupon(c *gin.Context)
@Summary Get a coupon by ID @Description Retrieves a coupon by ID @Tags Coupons @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Coupon ID" @Success 200 {object} dto.CouponResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /coupons/{id} [get] @Security ApiKeyAuth
func (*CouponHandler) ListCouponsByFilter ¶ added in v1.0.21
func (h *CouponHandler) ListCouponsByFilter(c *gin.Context)
@Summary List coupons with filtering @Description Lists coupons with filtering @Tags Coupons @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.CouponFilter true "Filter options" @Success 200 {object} dto.ListCouponsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /coupons [get] @Security ApiKeyAuth
func (*CouponHandler) UpdateCoupon ¶ added in v1.0.21
func (h *CouponHandler) UpdateCoupon(c *gin.Context)
@Summary Update a coupon @Description Updates an existing coupon @Tags Coupons @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Coupon ID" @Param coupon body dto.UpdateCouponRequest true "Coupon update request" @Success 200 {object} dto.CouponResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /coupons/{id} [put] @Security ApiKeyAuth
type CreditGrantHandler ¶ added in v1.0.18
type CreditGrantHandler struct {
// contains filtered or unexported fields
}
func NewCreditGrantHandler ¶ added in v1.0.18
func NewCreditGrantHandler(service service.CreditGrantService, log *logger.Logger) *CreditGrantHandler
func (*CreditGrantHandler) CreateCreditGrant ¶ added in v1.0.18
func (h *CreditGrantHandler) CreateCreditGrant(c *gin.Context)
@Summary Create a new credit grant @Description Create a new credit grant with the specified configuration @Tags CreditGrants @Accept json @Produce json @Security ApiKeyAuth @Param credit_grant body dto.CreateCreditGrantRequest true "Credit Grant configuration" @Success 201 {object} dto.CreditGrantResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditgrants [post]
func (*CreditGrantHandler) DeleteCreditGrant ¶ added in v1.0.18
func (h *CreditGrantHandler) DeleteCreditGrant(c *gin.Context)
@Summary Delete a credit grant @Description Delete a credit grant @Tags CreditGrants @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Credit Grant ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditgrants/{id} [delete]
func (*CreditGrantHandler) GetCreditGrant ¶ added in v1.0.18
func (h *CreditGrantHandler) GetCreditGrant(c *gin.Context)
@Summary Get a credit grant by ID @Description Get a credit grant by ID @Tags CreditGrants @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Credit Grant ID" @Success 200 {object} dto.CreditGrantResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditgrants/{id} [get]
func (*CreditGrantHandler) ListCreditGrants ¶ added in v1.0.18
func (h *CreditGrantHandler) ListCreditGrants(c *gin.Context)
@Summary Get credit grants @Description Get credit grants with the specified filter @Tags CreditGrants @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.CreditGrantFilter true "Filter" @Success 200 {object} dto.ListCreditGrantsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditgrants [get]
func (*CreditGrantHandler) UpdateCreditGrant ¶ added in v1.0.18
func (h *CreditGrantHandler) UpdateCreditGrant(c *gin.Context)
@Summary Update a credit grant @Description Update a credit grant with the specified configuration @Tags CreditGrants @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Credit Grant ID" @Param credit_grant body dto.UpdateCreditGrantRequest true "Credit Grant configuration" @Success 200 {object} dto.CreditGrantResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditgrants/{id} [put]
type CreditNoteHandler ¶ added in v1.0.18
type CreditNoteHandler struct {
// contains filtered or unexported fields
}
func NewCreditNoteHandler ¶ added in v1.0.18
func NewCreditNoteHandler(creditNoteService service.CreditNoteService, logger *logger.Logger) *CreditNoteHandler
func (*CreditNoteHandler) CreateCreditNote ¶ added in v1.0.18
func (h *CreditNoteHandler) CreateCreditNote(c *gin.Context)
@Summary Create a new credit note @Description Creates a new credit note @Tags Credit Notes @Accept json @Produce json @Security ApiKeyAuth @Param credit_note body dto.CreateCreditNoteRequest true "Credit note request" @Success 201 {object} dto.CreditNoteResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditnotes [post] @Security ApiKeyAuth
func (*CreditNoteHandler) FinalizeCreditNote ¶ added in v1.0.18
func (h *CreditNoteHandler) FinalizeCreditNote(c *gin.Context)
@Summary Process a draft credit note @Description Processes a draft credit note @Tags Credit Notes @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Credit note ID" @Success 200 {object} dto.CreditNoteResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditnotes/{id}/finalize [post] @Security ApiKeyAuth
func (*CreditNoteHandler) GetCreditNote ¶ added in v1.0.18
func (h *CreditNoteHandler) GetCreditNote(c *gin.Context)
@Summary Get a credit note by ID @Description Retrieves a credit note by ID @Tags Credit Notes @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Credit note ID" @Success 200 {object} dto.CreditNoteResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditnotes/{id} [get] @Security ApiKeyAuth
func (*CreditNoteHandler) ListCreditNotes ¶ added in v1.0.18
func (h *CreditNoteHandler) ListCreditNotes(c *gin.Context)
@Summary List credit notes with filtering @Description Lists credit notes with filtering @Tags Credit Notes @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.CreditNoteFilter true "Filter options" @Success 200 {object} dto.ListCreditNotesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditnotes [get] @Security ApiKeyAuth
func (*CreditNoteHandler) VoidCreditNote ¶ added in v1.0.18
func (h *CreditNoteHandler) VoidCreditNote(c *gin.Context)
@Summary Void a credit note @Description Voids a credit note @Tags Credit Notes @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Credit note ID" @Success 200 {object} dto.CreditNoteResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 403 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /creditnotes/{id}/void [post] @Security ApiKeyAuth
type CustomerHandler ¶
type CustomerHandler struct {
// contains filtered or unexported fields
}
func NewCustomerHandler ¶
func NewCustomerHandler( service service.CustomerService, billing service.BillingService, log *logger.Logger, ) *CustomerHandler
func (*CustomerHandler) CreateCustomer ¶
func (h *CustomerHandler) CreateCustomer(c *gin.Context)
@Summary Create a customer @Description Create a customer @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param customer body dto.CreateCustomerRequest true "Customer" @Success 201 {object} dto.CustomerResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers [post]
func (*CustomerHandler) DeleteCustomer ¶
func (h *CustomerHandler) DeleteCustomer(c *gin.Context)
@Summary Delete a customer @Description Delete a customer @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Success 204 @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id} [delete]
func (*CustomerHandler) GetCustomer ¶
func (h *CustomerHandler) GetCustomer(c *gin.Context)
@Summary Get a customer @Description Get a customer @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Success 200 {object} dto.CustomerResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id} [get]
func (*CustomerHandler) GetCustomerByLookupKey ¶
func (h *CustomerHandler) GetCustomerByLookupKey(c *gin.Context)
@Summary Get a customer by external id @Description Get a customer by external id @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param external_id path string true "Customer External ID" @Success 200 {object} dto.CustomerResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/external/{external_id} [get]
func (*CustomerHandler) GetCustomerEntitlements ¶ added in v1.0.0
func (h *CustomerHandler) GetCustomerEntitlements(c *gin.Context)
@Summary Get customer entitlements @Description Get customer entitlements @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Param filter query dto.GetCustomerEntitlementsRequest false "Filter" @Success 200 {object} dto.CustomerEntitlementsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id}/entitlements [get]
func (*CustomerHandler) GetCustomerUsageSummary ¶ added in v1.0.0
func (h *CustomerHandler) GetCustomerUsageSummary(c *gin.Context)
@Summary Get customer usage summary @Description Get customer usage summary by customer_id or customer_lookup_key (external_customer_id) @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param filter query dto.GetCustomerUsageSummaryRequest false "Filter" @Success 200 {object} dto.CustomerUsageSummaryResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/usage [get]
func (*CustomerHandler) GetCustomers ¶
func (h *CustomerHandler) GetCustomers(c *gin.Context)
@Summary Get customers @Description Get customers @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.CustomerFilter false "Filter" @Success 200 {object} dto.ListCustomersResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers [get]
func (*CustomerHandler) GetUpcomingCreditGrantApplications ¶ added in v1.0.38
func (h *CustomerHandler) GetUpcomingCreditGrantApplications(c *gin.Context)
@Summary Get upcoming credit grant applications @Description Get upcoming credit grant applications for a customer @Tags Customers @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Success 200 {object} dto.ListCreditGrantApplicationsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id}/grants/upcoming [get]
func (*CustomerHandler) ListCustomersByFilter ¶ added in v1.0.17
func (h *CustomerHandler) ListCustomersByFilter(c *gin.Context)
@Summary List customers by filter @Description List customers by filter @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.CustomerFilter true "Filter" @Success 200 {object} dto.ListCustomersResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/search [post]
func (*CustomerHandler) UpdateCustomer ¶
func (h *CustomerHandler) UpdateCustomer(c *gin.Context)
@Summary Update a customer @Description Update a customer @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Param customer body dto.UpdateCustomerRequest true "Customer" @Success 200 {object} dto.CustomerResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id} [put]
type CustomerPortalHandler ¶ added in v1.0.50
type CustomerPortalHandler struct {
// contains filtered or unexported fields
}
CustomerPortalHandler handles customer portal API requests
func NewCustomerPortalHandler ¶ added in v1.0.50
func NewCustomerPortalHandler( portalService service.CustomerPortalService, log *logger.Logger, ) *CustomerPortalHandler
NewCustomerPortalHandler creates a new customer portal handler
func (*CustomerPortalHandler) CreateSession ¶ added in v1.0.50
func (h *CustomerPortalHandler) CreateSession(c *gin.Context)
CreateSession creates a dashboard session for a customer @Summary Create a customer portal session @Description Generate a dashboard URL/token for a customer to access their billing information @Tags CustomerPortal @Accept json @Produce json @Security ApiKeyAuth @Param external_id path string true "Customer External ID" @Success 200 {object} dto.PortalSessionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /portal/{external_id} [get]
func (*CustomerPortalHandler) GetAnalytics ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetAnalytics(c *gin.Context)
func (*CustomerPortalHandler) GetCostAnalytics ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetCostAnalytics(c *gin.Context)
func (*CustomerPortalHandler) GetCustomer ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetCustomer(c *gin.Context)
func (*CustomerPortalHandler) GetInvoice ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetInvoice(c *gin.Context)
func (*CustomerPortalHandler) GetInvoicePDF ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetInvoicePDF(c *gin.Context)
func (*CustomerPortalHandler) GetInvoices ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetInvoices(c *gin.Context)
func (*CustomerPortalHandler) GetSubscription ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetSubscription(c *gin.Context)
func (*CustomerPortalHandler) GetSubscriptions ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetSubscriptions(c *gin.Context)
func (*CustomerPortalHandler) GetUsageSummary ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetUsageSummary(c *gin.Context)
func (*CustomerPortalHandler) GetWallet ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetWallet(c *gin.Context)
func (*CustomerPortalHandler) GetWalletTransactions ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetWalletTransactions(c *gin.Context)
func (*CustomerPortalHandler) GetWallets ¶ added in v1.0.50
func (h *CustomerPortalHandler) GetWallets(c *gin.Context)
func (*CustomerPortalHandler) UpdateCustomer ¶ added in v1.0.50
func (h *CustomerPortalHandler) UpdateCustomer(c *gin.Context)
type EntitlementHandler ¶
type EntitlementHandler struct {
// contains filtered or unexported fields
}
func NewEntitlementHandler ¶
func NewEntitlementHandler(service service.EntitlementService, log *logger.Logger) *EntitlementHandler
func (*EntitlementHandler) CreateBulkEntitlement ¶ added in v1.0.21
func (h *EntitlementHandler) CreateBulkEntitlement(c *gin.Context)
@Summary Create multiple entitlements in bulk @Description Create multiple entitlements with the specified configurations @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param entitlements body dto.CreateBulkEntitlementRequest true "Bulk entitlement configuration" @Success 201 {object} dto.CreateBulkEntitlementResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements/bulk [post]
func (*EntitlementHandler) CreateEntitlement ¶
func (h *EntitlementHandler) CreateEntitlement(c *gin.Context)
@Summary Create a new entitlement @Description Create a new entitlement with the specified configuration @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param entitlement body dto.CreateEntitlementRequest true "Entitlement configuration" @Success 201 {object} dto.EntitlementResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements [post]
func (*EntitlementHandler) DeleteEntitlement ¶
func (h *EntitlementHandler) DeleteEntitlement(c *gin.Context)
@Summary Delete an entitlement @Description Delete an entitlement @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Entitlement ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements/{id} [delete]
func (*EntitlementHandler) GetEntitlement ¶
func (h *EntitlementHandler) GetEntitlement(c *gin.Context)
@Summary Get an entitlement by ID @Description Get an entitlement by ID @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Entitlement ID" @Success 200 {object} dto.EntitlementResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements/{id} [get]
func (*EntitlementHandler) ListEntitlements ¶
func (h *EntitlementHandler) ListEntitlements(c *gin.Context)
@Summary Get entitlements @Description Get entitlements with the specified filter @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.EntitlementFilter true "Filter" @Success 200 {object} dto.ListEntitlementsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements [get]
func (*EntitlementHandler) ListEntitlementsByFilter ¶ added in v1.0.20
func (h *EntitlementHandler) ListEntitlementsByFilter(c *gin.Context)
ListEntitlementsByFilter godoc @Summary List entitlements by filter @Description List entitlements by filter @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.EntitlementFilter true "Filter" @Success 200 {object} dto.ListEntitlementsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements/search [post]
func (*EntitlementHandler) UpdateEntitlement ¶
func (h *EntitlementHandler) UpdateEntitlement(c *gin.Context)
@Summary Update an entitlement @Description Update an entitlement with the specified configuration @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Entitlement ID" @Param entitlement body dto.UpdateEntitlementRequest true "Entitlement configuration" @Success 200 {object} dto.EntitlementResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entitlements/{id} [put]
type EntityIntegrationMappingHandler ¶ added in v1.0.21
type EntityIntegrationMappingHandler struct {
EntityIntegrationMappingService service.EntityIntegrationMappingService
// contains filtered or unexported fields
}
EntityIntegrationMappingHandler handles entity integration mapping API requests
func NewEntityIntegrationMappingHandler ¶ added in v1.0.21
func NewEntityIntegrationMappingHandler( entityIntegrationMappingService service.EntityIntegrationMappingService, logger *logger.Logger, ) *EntityIntegrationMappingHandler
NewEntityIntegrationMappingHandler creates a new entity integration mapping handler
func (*EntityIntegrationMappingHandler) CreateEntityIntegrationMapping ¶ added in v1.0.21
func (h *EntityIntegrationMappingHandler) CreateEntityIntegrationMapping(c *gin.Context)
CreateEntityIntegrationMapping godoc @Summary Create entity integration mapping @Description Create a new entity integration mapping @Tags Entity Integration Mappings @Accept json @Produce json @Security ApiKeyAuth @Param entity_integration_mapping body dto.CreateEntityIntegrationMappingRequest true "Entity integration mapping data" @Success 201 {object} dto.EntityIntegrationMappingResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 409 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entity-integration-mappings [post]
func (*EntityIntegrationMappingHandler) DeleteEntityIntegrationMapping ¶ added in v1.0.21
func (h *EntityIntegrationMappingHandler) DeleteEntityIntegrationMapping(c *gin.Context)
DeleteEntityIntegrationMapping godoc @Summary Delete entity integration mapping @Description Delete an entity integration mapping @Tags Entity Integration Mappings @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Entity integration mapping ID" @Success 204 "No Content" @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entity-integration-mappings/{id} [delete]
func (*EntityIntegrationMappingHandler) GetEntityIntegrationMapping ¶ added in v1.0.21
func (h *EntityIntegrationMappingHandler) GetEntityIntegrationMapping(c *gin.Context)
GetEntityIntegrationMapping godoc @Summary Get entity integration mapping @Description Retrieve a specific entity integration mapping by ID @Tags Entity Integration Mappings @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Entity integration mapping ID" @Success 200 {object} dto.EntityIntegrationMappingResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entity-integration-mappings/{id} [get]
func (*EntityIntegrationMappingHandler) ListEntityIntegrationMappings ¶ added in v1.0.21
func (h *EntityIntegrationMappingHandler) ListEntityIntegrationMappings(c *gin.Context)
ListEntityIntegrationMappings godoc @Summary List entity integration mappings @Description Retrieve a list of entity integration mappings with optional filtering @Tags Entity Integration Mappings @Accept json @Produce json @Security ApiKeyAuth @Param entity_id query string false "Filter by FlexPrice entity ID" @Param entity_type query string false "Filter by entity type" @Param provider_type query string false "Filter by provider type" @Param provider_entity_id query string false "Filter by provider entity ID" @Param limit query int false "Number of results to return (default: 20, max: 100)" @Param offset query int false "Pagination offset (default: 0)" @Success 200 {object} dto.ListEntityIntegrationMappingsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 401 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /entity-integration-mappings [get]
type EnvironmentHandler ¶
type EnvironmentHandler struct {
// contains filtered or unexported fields
}
func NewEnvironmentHandler ¶
func NewEnvironmentHandler(service service.EnvironmentService, log *logger.Logger) *EnvironmentHandler
func (*EnvironmentHandler) CreateEnvironment ¶
func (h *EnvironmentHandler) CreateEnvironment(c *gin.Context)
@Summary Create an environment @Description Create an environment @Tags Environments @Accept json @Produce json @Security ApiKeyAuth @Param environment body dto.CreateEnvironmentRequest true "Environment" @Success 201 {object} dto.EnvironmentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /environments [post]
func (*EnvironmentHandler) GetEnvironment ¶
func (h *EnvironmentHandler) GetEnvironment(c *gin.Context)
@Summary Get an environment @Description Get an environment @Tags Environments @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Environment ID" @Success 200 {object} dto.EnvironmentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /environments/{id} [get]
func (*EnvironmentHandler) GetEnvironments ¶
func (h *EnvironmentHandler) GetEnvironments(c *gin.Context)
@Summary Get environments @Description Get environments @Tags Environments @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.Filter false "Filter" @Success 200 {object} dto.ListEnvironmentsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /environments [get]
func (*EnvironmentHandler) UpdateEnvironment ¶
func (h *EnvironmentHandler) UpdateEnvironment(c *gin.Context)
@Summary Update an environment @Description Update an environment @Tags Environments @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Environment ID" @Param environment body dto.UpdateEnvironmentRequest true "Environment" @Success 200 {object} dto.EnvironmentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /environments/{id} [put]
type EventsHandler ¶
type EventsHandler struct {
// contains filtered or unexported fields
}
func NewEventsHandler ¶
func NewEventsHandler(eventService service.EventService, eventPostProcessingService service.EventPostProcessingService, featureUsageTrackingService service.FeatureUsageTrackingService, config *config.Configuration, log *logger.Logger) *EventsHandler
func (*EventsHandler) BulkIngestEvent ¶ added in v1.0.0
func (h *EventsHandler) BulkIngestEvent(c *gin.Context)
@Summary Bulk Ingest events @Description Ingest bulk events into the system @Tags Events @Accept json @Produce json @Security ApiKeyAuth @Param event body dto.BulkIngestEventRequest true "Event data" @Success 202 {object} map[string]string "message:Event accepted for processing" @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /events/bulk [post]
func (*EventsHandler) GetEvents ¶
func (h *EventsHandler) GetEvents(c *gin.Context)
func (*EventsHandler) GetHuggingFaceBillingData ¶ added in v1.0.38
func (h *EventsHandler) GetHuggingFaceBillingData(c *gin.Context)
@Summary Get hugging face inference data @Description Retrieve hugging face inference data for events @Tags Events @Produce json @Security ApiKeyAuth @Success 200 {object} dto.GetHuggingFaceBillingDataResponse @Failure 500 {object} ierr.ErrorResponse @Router /events/huggingface-inference [post]
func (*EventsHandler) GetMonitoringData ¶ added in v1.0.36
func (h *EventsHandler) GetMonitoringData(c *gin.Context)
@Summary Get monitoring data @Description Retrieve monitoring data for events including consumer lag and event metrics (last 24 hours by default) @Tags Events @Produce json @Security ApiKeyAuth @Param start_time query time.Time false "Start time (ISO 8601) - defaults to 24 hours ago" @Param end_time query time.Time false "End time (ISO 8601) - defaults to now" @Param window_size query string false "Window size for time series data (e.g., 'HOUR', 'DAY') - optional" @Success 200 {object} dto.GetMonitoringDataResponse @Failure 400 {object} ierr.ErrorResponse "Validation error" @Failure 500 {object} ierr.ErrorResponse "Internal server error" @Router /events/monitoring [get]
func (*EventsHandler) GetUsage ¶
func (h *EventsHandler) GetUsage(c *gin.Context)
@Summary Get usage statistics @Description Retrieve aggregated usage statistics for events @Tags Events @Produce json @Security ApiKeyAuth @Param request body dto.GetUsageRequest true "Request body" @Success 200 {object} dto.GetUsageResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /events/usage [post]
func (*EventsHandler) GetUsageAnalytics ¶ added in v1.0.17
func (h *EventsHandler) GetUsageAnalytics(c *gin.Context)
@Summary Get usage analytics @Description Retrieve comprehensive usage analytics with filtering, grouping, and time-series data @Tags Events @Produce json @Security ApiKeyAuth @Param request body dto.GetUsageAnalyticsRequest true "Request body" @Success 200 {object} dto.GetUsageAnalyticsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /events/analytics [post]
func (*EventsHandler) GetUsageAnalyticsV2 ¶ added in v1.0.27
func (h *EventsHandler) GetUsageAnalyticsV2(c *gin.Context)
func (*EventsHandler) GetUsageByMeter ¶
func (h *EventsHandler) GetUsageByMeter(c *gin.Context)
@Summary Get usage by meter @Description Retrieve aggregated usage statistics using meter configuration @Tags Events @Produce json @Security ApiKeyAuth @Param request body dto.GetUsageByMeterRequest true "Request body" @Success 200 {object} dto.GetUsageResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /events/usage/meter [post]
func (*EventsHandler) IngestEvent ¶
func (h *EventsHandler) IngestEvent(c *gin.Context)
@Summary Ingest event @Description Ingest a new event into the system @Tags Events @Accept json @Produce json @Security ApiKeyAuth @Param event body dto.IngestEventRequest true "Event data" @Success 202 {object} map[string]string "message:Event accepted for processing" @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /events [post]
func (*EventsHandler) QueryEvents ¶ added in v1.0.13
func (h *EventsHandler) QueryEvents(c *gin.Context)
@Summary List raw events @Description Retrieve raw events with pagination and filtering @Tags Events @Produce json @Security ApiKeyAuth @Param request body dto.GetEventsRequest true "Request body" @Success 200 {object} dto.GetEventsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /events/query [post]
type FeatureHandler ¶
type FeatureHandler struct {
// contains filtered or unexported fields
}
func NewFeatureHandler ¶
func NewFeatureHandler(featureService service.FeatureService, log *logger.Logger) *FeatureHandler
func (*FeatureHandler) CreateFeature ¶
func (h *FeatureHandler) CreateFeature(c *gin.Context)
CreateFeature godoc @Summary Create a new feature @Description Create a new feature @Tags Features @Accept json @Produce json @Security ApiKeyAuth @Param feature body dto.CreateFeatureRequest true "Feature to create" @Success 201 {object} dto.FeatureResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /features [post]
func (*FeatureHandler) DeleteFeature ¶
func (h *FeatureHandler) DeleteFeature(c *gin.Context)
DeleteFeature godoc @Summary Delete a feature @Description Delete a feature by ID @Tags Features @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Feature ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /features/{id} [delete]
func (*FeatureHandler) GetFeature ¶
func (h *FeatureHandler) GetFeature(c *gin.Context)
GetFeature godoc @Summary Get a feature by ID @Description Get a feature by ID @Tags Features @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Feature ID" @Success 200 {object} dto.FeatureResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /features/{id} [get]
func (*FeatureHandler) ListFeatures ¶ added in v1.0.0
func (h *FeatureHandler) ListFeatures(c *gin.Context)
ListFeatures godoc @Summary List features @Description List features with optional filtering @Tags Features @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.FeatureFilter true "Filter" @Success 200 {object} dto.ListFeaturesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /features [get]
func (*FeatureHandler) ListFeaturesByFilter ¶ added in v1.0.17
func (h *FeatureHandler) ListFeaturesByFilter(c *gin.Context)
ListFeaturesByFilter godoc @Summary List features by filter @Description List features by filter @Tags Features @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.FeatureFilter true "Filter" @Success 200 {object} dto.ListFeaturesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /features/search [post]
func (*FeatureHandler) UpdateFeature ¶
func (h *FeatureHandler) UpdateFeature(c *gin.Context)
UpdateFeature godoc @Summary Update a feature @Description Update a feature by ID @Tags Features @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Feature ID" @Param feature body dto.UpdateFeatureRequest true "Feature update data" @Success 200 {object} dto.FeatureResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /features/{id} [put]
type GroupHandler ¶ added in v1.0.34
type GroupHandler struct {
// contains filtered or unexported fields
}
func NewGroupHandler ¶ added in v1.0.34
func NewGroupHandler(service service.GroupService, log *logger.Logger) *GroupHandler
func (*GroupHandler) CreateGroup ¶ added in v1.0.34
func (h *GroupHandler) CreateGroup(c *gin.Context)
@Summary Create a group @Description Create a new group for organizing entities (prices, plans, customers, etc.) @Tags Groups @Accept json @Produce json @Security ApiKeyAuth @Param group body dto.CreateGroupRequest true "Group" @Success 201 {object} dto.GroupResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /groups [post]
func (*GroupHandler) DeleteGroup ¶ added in v1.0.34
func (h *GroupHandler) DeleteGroup(c *gin.Context)
@Summary Delete a group @Description Delete a group and remove all entity associations @Tags Groups @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Group ID" @Success 204 "No Content" @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /groups/{id} [delete]
func (*GroupHandler) GetGroup ¶ added in v1.0.34
func (h *GroupHandler) GetGroup(c *gin.Context)
@Summary Get a group @Description Get a group by ID @Tags Groups @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Group ID" @Success 200 {object} dto.GroupResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /groups/{id} [get]
func (*GroupHandler) ListGroups ¶ added in v1.0.34
func (h *GroupHandler) ListGroups(c *gin.Context)
@Summary Get groups @Description Get groups with optional filtering via query parameters @Tags Groups @Accept json @Produce json @Security ApiKeyAuth @Param entity_type query string false "Filter by entity type (e.g., 'price')" @Param name query string false "Filter by group name (contains search)" @Param lookup_key query string false "Filter by lookup key (exact match)" @Param limit query int false "Number of items to return (default: 20)" @Param offset query int false "Number of items to skip (default: 0)" @Param sort_by query string false "Field to sort by (name, created_at, updated_at)" @Param sort_order query string false "Sort order (asc, desc)" @Success 200 {object} dto.ListGroupsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /groups/search [post]
type HealthHandler ¶
type HealthHandler struct {
// contains filtered or unexported fields
}
func NewHealthHandler ¶
func NewHealthHandler( logger *logger.Logger, ) *HealthHandler
func (*HealthHandler) Health ¶
func (h *HealthHandler) Health(c *gin.Context)
@Summary Health check @Description Health check @Tags Health @Accept json @Produce json @Success 200 {object} map[string]string
type InvoiceHandler ¶
type InvoiceHandler struct {
// contains filtered or unexported fields
}
func NewInvoiceHandler ¶
func NewInvoiceHandler(invoiceService service.InvoiceService, logger *logger.Logger) *InvoiceHandler
func (*InvoiceHandler) AttemptPayment ¶ added in v1.0.0
func (h *InvoiceHandler) AttemptPayment(c *gin.Context)
AttemptPayment godoc @Summary Attempt payment for an invoice @Description Attempt to pay an invoice using customer's available wallets @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/payment/attempt [post]
func (*InvoiceHandler) CreateOneOffInvoice ¶ added in v1.0.21
func (h *InvoiceHandler) CreateOneOffInvoice(c *gin.Context)
CreateOneOffInvoice godoc @Summary Create a new one off invoice @Description Create a new one off invoice with the provided details @Tags Invoices @Accept json @Security ApiKeyAuth @Produce json @Param invoice body dto.CreateInvoiceRequest true "Invoice details" @Success 201 {object} dto.InvoiceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices [post]
func (*InvoiceHandler) FinalizeInvoice ¶
func (h *InvoiceHandler) FinalizeInvoice(c *gin.Context)
FinalizeInvoice godoc @Summary Finalize an invoice @Description Finalize a draft invoice @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/finalize [post]
func (*InvoiceHandler) GetCustomerInvoiceSummary ¶
func (h *InvoiceHandler) GetCustomerInvoiceSummary(c *gin.Context)
GetCustomerInvoiceSummary godoc @Summary Get a customer invoice summary @Description Get a customer invoice summary @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Success 200 {object} dto.CustomerMultiCurrencyInvoiceSummary @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id}/invoices/summary [get]
func (*InvoiceHandler) GetInvoice ¶
func (h *InvoiceHandler) GetInvoice(c *gin.Context)
GetInvoice godoc @Summary Get an invoice by ID @Description Get detailed information about an invoice @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Param expand_by_source query bool false "Include source-level price breakdown for usage line items (legacy)" @Param group_by query []string false "Group usage breakdown by specified fields (e.g., source, feature_id, properties.org_id)" @Success 200 {object} dto.InvoiceResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id} [get]
func (*InvoiceHandler) GetInvoicePDF ¶ added in v1.0.0
func (h *InvoiceHandler) GetInvoicePDF(c *gin.Context)
GetInvoicePDF godoc @Summary Get PDF for an invoice @Description Retrieve the PDF document for a specific invoice by its ID @Tags Invoices @Security ApiKeyAuth @Param id path string true "Invoice ID" @Param url query bool false "Return presigned URL from s3 instead of PDF" @Success 200 {file} application/pdf @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/pdf [get]
func (*InvoiceHandler) GetPreviewInvoice ¶
func (h *InvoiceHandler) GetPreviewInvoice(c *gin.Context)
GetPreviewInvoice godoc @Summary Get a preview invoice @Description Get a preview invoice @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.GetPreviewInvoiceRequest true "Preview Invoice Request" @Success 200 {object} dto.InvoiceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/preview [post]
func (*InvoiceHandler) ListInvoices ¶
func (h *InvoiceHandler) ListInvoices(c *gin.Context)
ListInvoices godoc @Summary List invoices @Description List invoices with optional filtering @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.InvoiceFilter false "Filter" @Success 200 {object} dto.ListInvoicesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices [get]
func (*InvoiceHandler) ListInvoicesByFilter ¶ added in v1.0.20
func (h *InvoiceHandler) ListInvoicesByFilter(c *gin.Context)
ListInvoicesByFilter godoc @Summary List invoices by filter @Description List invoices by filter @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.InvoiceFilter true "Filter" @Success 200 {object} dto.ListInvoicesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/search [post]
func (*InvoiceHandler) RecalculateInvoice ¶ added in v1.0.18
func (h *InvoiceHandler) RecalculateInvoice(c *gin.Context)
RecalculateInvoice godoc @Summary Recalculate invoice totals and line items @Description Recalculate totals and line items for a draft invoice, useful when subscription line items or usage data has changed @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Param finalize query bool false "Whether to finalize the invoice after recalculation (default: true)" @Success 200 {object} dto.InvoiceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/recalculate [post]
func (*InvoiceHandler) TriggerCommunication ¶ added in v1.0.21
func (h *InvoiceHandler) TriggerCommunication(c *gin.Context)
TriggerCommunication godoc @Summary Trigger communication webhook for an invoice @Description Triggers a communication webhook event containing all information about the invoice @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/comms/trigger [post]
func (*InvoiceHandler) UpdateInvoice ¶ added in v1.0.21
func (h *InvoiceHandler) UpdateInvoice(c *gin.Context)
UpdateInvoice godoc @Summary Update an invoice @Description Update invoice details like PDF URL and due date. Works for draft, finalized, and paid invoices. Only safe fields like PDF URL and due date can be updated for paid invoices. @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Param request body dto.UpdateInvoiceRequest true "Invoice Update Request" @Success 200 {object} dto.InvoiceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id} [put]
func (*InvoiceHandler) UpdatePaymentStatus ¶
func (h *InvoiceHandler) UpdatePaymentStatus(c *gin.Context)
UpdatePaymentStatus godoc @Summary Update invoice payment status @Description Update the payment status of an invoice @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Param request body dto.UpdatePaymentStatusRequest true "Payment Status Update Request" @Success 200 {object} dto.InvoiceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/payment [put]
func (*InvoiceHandler) VoidInvoice ¶
func (h *InvoiceHandler) VoidInvoice(c *gin.Context)
VoidInvoice godoc @Summary Void an invoice @Description Void an invoice that hasn't been paid @Tags Invoices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Invoice ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/void [post]
type MeterHandler ¶
type MeterHandler struct {
// contains filtered or unexported fields
}
func NewMeterHandler ¶
func NewMeterHandler(service service.MeterService, log *logger.Logger) *MeterHandler
func (*MeterHandler) CreateMeter ¶
func (h *MeterHandler) CreateMeter(c *gin.Context)
func (*MeterHandler) DeleteMeter ¶
func (h *MeterHandler) DeleteMeter(c *gin.Context)
func (*MeterHandler) DisableMeter ¶
func (h *MeterHandler) DisableMeter(c *gin.Context)
func (*MeterHandler) GetAllMeters ¶
func (h *MeterHandler) GetAllMeters(c *gin.Context)
func (*MeterHandler) GetMeter ¶
func (h *MeterHandler) GetMeter(c *gin.Context)
func (*MeterHandler) UpdateMeter ¶
func (h *MeterHandler) UpdateMeter(c *gin.Context)
type OAuthHandler ¶ added in v1.0.47
type OAuthHandler struct {
// contains filtered or unexported fields
}
OAuthHandler handles generic OAuth endpoints for multiple providers
func NewOAuthHandler ¶ added in v1.0.47
func NewOAuthHandler( oauthService service.OAuthService, redirectURI string, logger *logger.Logger, ) *OAuthHandler
NewOAuthHandler creates a new generic OAuth handler
func (*OAuthHandler) CompleteOAuth ¶ added in v1.0.47
func (h *OAuthHandler) CompleteOAuth(c *gin.Context)
CompleteOAuth completes the OAuth flow for any supported provider POST /v1/oauth/complete
func (*OAuthHandler) InitiateOAuth ¶ added in v1.0.47
func (h *OAuthHandler) InitiateOAuth(c *gin.Context)
InitiateOAuth initiates the OAuth flow for any supported provider POST /v1/oauth/init
type OnboardingHandler ¶ added in v1.0.0
type OnboardingHandler struct {
// contains filtered or unexported fields
}
OnboardingHandler handles onboarding-related API endpoints
func NewOnboardingHandler ¶ added in v1.0.0
func NewOnboardingHandler(onboardingService service.OnboardingService, log *logger.Logger) *OnboardingHandler
NewOnboardingHandler creates a new onboarding handler
func (*OnboardingHandler) GenerateEvents ¶ added in v1.0.0
func (h *OnboardingHandler) GenerateEvents(c *gin.Context)
func (*OnboardingHandler) SetupDemo ¶ added in v1.0.0
func (h *OnboardingHandler) SetupDemo(c *gin.Context)
type PaymentHandler ¶
type PaymentHandler struct {
// contains filtered or unexported fields
}
func NewPaymentHandler ¶
func NewPaymentHandler(service service.PaymentService, processor service.PaymentProcessorService, log *logger.Logger) *PaymentHandler
func (*PaymentHandler) CreatePayment ¶
func (h *PaymentHandler) CreatePayment(c *gin.Context)
@Summary Create a new payment @Description Create a new payment with the specified configuration @Tags Payments @Accept json @Produce json @Security ApiKeyAuth @Param payment body dto.CreatePaymentRequest true "Payment configuration" @Success 201 {object} dto.PaymentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /payments [post]
func (*PaymentHandler) DeletePayment ¶
func (h *PaymentHandler) DeletePayment(c *gin.Context)
@Summary Delete a payment @Description Delete a payment @Tags Payments @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Payment ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /payments/{id} [delete]
func (*PaymentHandler) GetPayment ¶
func (h *PaymentHandler) GetPayment(c *gin.Context)
@Summary Get a payment by ID @Description Get a payment by ID @Tags Payments @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Payment ID" @Success 200 {object} dto.PaymentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /payments/{id} [get]
func (*PaymentHandler) ListPayments ¶
func (h *PaymentHandler) ListPayments(c *gin.Context)
@Summary List payments @Description List payments with the specified filter @Tags Payments @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.PaymentFilter true "Filter" @Success 200 {object} dto.ListPaymentsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /payments [get]
func (*PaymentHandler) ProcessPayment ¶
func (h *PaymentHandler) ProcessPayment(c *gin.Context)
@Summary Process a payment @Description Process a payment @Tags Payments @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Payment ID" @Success 200 {object} dto.PaymentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /payments/{id}/process [post]
func (*PaymentHandler) UpdatePayment ¶
func (h *PaymentHandler) UpdatePayment(c *gin.Context)
@Summary Update a payment @Description Update a payment with the specified configuration @Tags Payments @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Payment ID" @Param payment body dto.UpdatePaymentRequest true "Payment configuration" @Success 200 {object} dto.PaymentResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /payments/{id} [put]
type PlanHandler ¶
type PlanHandler struct {
// contains filtered or unexported fields
}
func NewPlanHandler ¶
func NewPlanHandler( service service.PlanService, entitlementService service.EntitlementService, creditGrantService service.CreditGrantService, temporalService temporalservice.TemporalService, log *logger.Logger, ) *PlanHandler
func (*PlanHandler) CreatePlan ¶
func (h *PlanHandler) CreatePlan(c *gin.Context)
@Summary Create a new plan @Description Create a new plan with the specified configuration @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param plan body dto.CreatePlanRequest true "Plan configuration" @Success 201 {object} dto.PlanResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans [post]
func (*PlanHandler) DeletePlan ¶
func (h *PlanHandler) DeletePlan(c *gin.Context)
@Summary Delete a plan @Description Delete a plan by ID @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Plan ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/{id} [delete]
func (*PlanHandler) GetPlan ¶
func (h *PlanHandler) GetPlan(c *gin.Context)
@Summary Get a plan @Description Get a plan by ID @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Plan ID" @Success 200 {object} dto.PlanResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/{id} [get]
func (*PlanHandler) GetPlanCreditGrants ¶ added in v1.0.18
func (h *PlanHandler) GetPlanCreditGrants(c *gin.Context)
@Summary Get plan credit grants @Description Get all credit grants for a plan @Tags CreditGrants @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Plan ID" @Success 200 {object} dto.ListCreditGrantsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/{id}/creditgrants [get]
func (*PlanHandler) GetPlanEntitlements ¶
func (h *PlanHandler) GetPlanEntitlements(c *gin.Context)
@Summary Get plan entitlements @Description Get all entitlements for a plan @Tags Entitlements @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Plan ID" @Success 200 {object} dto.PlanResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/{id}/entitlements [get]
func (*PlanHandler) GetPlans ¶
func (h *PlanHandler) GetPlans(c *gin.Context)
@Summary Get plans @Description Get plans with optional filtering @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.PlanFilter false "Filter" @Success 200 {object} dto.ListPlansResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans [get]
func (*PlanHandler) ListPlansByFilter ¶ added in v1.0.20
func (h *PlanHandler) ListPlansByFilter(c *gin.Context)
@Summary List plans by filter @Description List plans by filter @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.PlanFilter true "Filter" @Success 200 {object} dto.ListPlansResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/search [post]
func (*PlanHandler) SyncPlanPrices ¶ added in v1.0.18
func (h *PlanHandler) SyncPlanPrices(c *gin.Context)
@Summary Synchronize plan prices @Description Synchronize current plan prices with all existing active subscriptions @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Plan ID" @Success 200 {object} models.TemporalWorkflowResult @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 422 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/{id}/sync/subscriptions [post]
func (*PlanHandler) UpdatePlan ¶
func (h *PlanHandler) UpdatePlan(c *gin.Context)
@Summary Update a plan @Description Update a plan by ID @Tags Plans @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Plan ID" @Param plan body dto.UpdatePlanRequest true "Plan update" @Success 200 {object} dto.PlanResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /plans/{id} [put]
type PriceHandler ¶
type PriceHandler struct {
// contains filtered or unexported fields
}
func NewPriceHandler ¶
func NewPriceHandler(service service.PriceService, log *logger.Logger) *PriceHandler
func (*PriceHandler) CreateBulkPrice ¶ added in v1.0.21
func (h *PriceHandler) CreateBulkPrice(c *gin.Context)
@Summary Create multiple prices in bulk @Description Create multiple prices with the specified configurations. Supports both regular and price unit configurations. @Tags Prices @Accept json @Produce json @Security ApiKeyAuth @Param prices body dto.CreateBulkPriceRequest true "Bulk price configuration" @Success 201 {object} dto.CreateBulkPriceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/bulk [post]
func (*PriceHandler) CreatePrice ¶
func (h *PriceHandler) CreatePrice(c *gin.Context)
@Summary Create a new price @Description Create a new price with the specified configuration. Supports both regular and price unit configurations. @Tags Prices @Accept json @Produce json @Security ApiKeyAuth @Param price body dto.CreatePriceRequest true "Price configuration" @Success 201 {object} dto.PriceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices [post]
func (*PriceHandler) DeletePrice ¶
func (h *PriceHandler) DeletePrice(c *gin.Context)
@Summary Delete a price @Description Delete a price @Tags Prices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Price ID" @Param request body dto.DeletePriceRequest true "Delete Price Request" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/{id} [delete]
func (*PriceHandler) GetPrice ¶
func (h *PriceHandler) GetPrice(c *gin.Context)
@Summary Get a price by ID @Description Get a price by ID with expanded meter and price unit information @Tags Prices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Price ID" @Success 200 {object} dto.PriceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/{id} [get]
func (*PriceHandler) GetPrices ¶
func (h *PriceHandler) GetPrices(c *gin.Context)
@Summary Get prices @Description Get prices with the specified filter @Tags Prices @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.PriceFilter false "Filter" @Success 200 {object} dto.ListPricesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices [get]
func (*PriceHandler) UpdatePrice ¶
func (h *PriceHandler) UpdatePrice(c *gin.Context)
@Summary Update a price @Description Update a price with the specified configuration @Tags Prices @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Price ID" @Param price body dto.UpdatePriceRequest true "Price configuration" @Success 200 {object} dto.PriceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/{id} [put]
type PriceUnitHandler ¶ added in v1.0.21
type PriceUnitHandler struct {
// contains filtered or unexported fields
}
func NewPriceUnitHandler ¶ added in v1.0.21
func NewPriceUnitHandler(service service.PriceUnitService, log *logger.Logger) *PriceUnitHandler
func (*PriceUnitHandler) CreatePriceUnit ¶ added in v1.0.21
func (h *PriceUnitHandler) CreatePriceUnit(c *gin.Context)
CreatePriceUnit handles the creation of a new price unit @Summary Create a new price unit @Description Create a new price unit with the provided details @Tags Price Units @Accept json @Security ApiKeyAuth @Produce json @Param body body dto.CreatePriceUnitRequest true "Price unit details" @Success 201 {object} dto.CreatePriceUnitResponse @Failure 400 {object} ierr.ErrorResponse @Router /prices/units [post]
func (*PriceUnitHandler) DeletePriceUnit ¶ added in v1.0.21
func (h *PriceUnitHandler) DeletePriceUnit(c *gin.Context)
DeletePriceUnit handles deleting a price unit @Summary Delete a price unit @Description Delete an existing price unit. @Tags Price Units @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Price unit ID" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Router /prices/units/{id} [delete]
func (*PriceUnitHandler) GetPriceUnit ¶ added in v1.0.49
func (h *PriceUnitHandler) GetPriceUnit(c *gin.Context)
GetPriceUnit handles getting a price unit by ID @Summary Get a price unit by ID @Description Get a price unit by ID @Tags Price Units @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Price unit ID" @Success 200 {object} dto.PriceUnitResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Router /prices/units/{id} [get]
func (*PriceUnitHandler) GetPriceUnitByCode ¶ added in v1.0.49
func (h *PriceUnitHandler) GetPriceUnitByCode(c *gin.Context)
GetPriceUnitByCode handles getting a price unit by code @Summary Get a price unit by code @Description Get a price unit by code @Tags Price Units @Accept json @Produce json @Security ApiKeyAuth @Param code path string true "Price unit code" @Success 200 {object} dto.PriceUnitResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/units/code/{code} [get]
func (*PriceUnitHandler) ListPriceUnits ¶ added in v1.0.49
func (h *PriceUnitHandler) ListPriceUnits(c *gin.Context)
ListPriceUnits handles listing price units with pagination and filtering @Summary List price units @Description Get a paginated list of price units with optional filtering @Tags Price Units @Accept json @Produce json @Security ApiKeyAuth @Param status query string false "Filter by status" @Param limit query int false "Limit number of results" @Param offset query int false "Offset for pagination" @Param sort query string false "Sort field" @Param order query string false "Sort order (asc/desc)" @Success 200 {object} dto.ListPriceUnitsResponse @Failure 400 {object} ierr.ErrorResponse @Router /prices/units [get]
func (*PriceUnitHandler) ListPriceUnitsByFilter ¶ added in v1.0.21
func (h *PriceUnitHandler) ListPriceUnitsByFilter(c *gin.Context)
@Summary List price units by filter @Description List price units by filter @Tags Price Units @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.Filter true "Filter" @Success 200 {object} dto.ListPriceUnitsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/units/search [post]
func (*PriceUnitHandler) UpdatePriceUnit ¶ added in v1.0.21
func (h *PriceUnitHandler) UpdatePriceUnit(c *gin.Context)
UpdatePriceUnit handles updating an existing price unit @Summary Update a price unit @Description Update an existing price unit with the provided details. Only name and metadata can be updated. @Tags Price Units @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Price unit ID" @Param body body dto.UpdatePriceUnitRequest true "Price unit details to update" @Success 200 {object} dto.PriceUnitResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Router /prices/units/{id} [put]
type RBACHandler ¶ added in v1.0.36
type RBACHandler struct {
// contains filtered or unexported fields
}
func NewRBACHandler ¶ added in v1.0.36
func NewRBACHandler(rbacService *rbac.RBACService, userService service.UserService, logger *logger.Logger) *RBACHandler
func (*RBACHandler) GetRole ¶ added in v1.0.36
func (h *RBACHandler) GetRole(c *gin.Context)
GetRole returns a specific role by ID @Summary Get a specific RBAC role @Description Returns details of a specific role including permissions, name, and description @Tags RBAC @Accept json @Produce json @Param id path string true "Role ID" @Success 200 {object} map[string]interface{} "Role details" @Failure 404 {object} map[string]string "Role not found" @Router /rbac/roles/{id} [get] @Security ApiKeyAuth
func (*RBACHandler) ListRoles ¶ added in v1.0.36
func (h *RBACHandler) ListRoles(c *gin.Context)
ListRoles returns all available roles with their metadata @Summary List all RBAC roles @Description Returns all available roles with their permissions, names, and descriptions @Tags RBAC @Accept json @Produce json @Success 200 {object} map[string]interface{} "List of roles" @Failure 500 {object} map[string]string "Internal server error" @Router /rbac/roles [get] @Security ApiKeyAuth
type RevenueAnalyticsHandler ¶ added in v1.0.33
type RevenueAnalyticsHandler struct {
Logger *logger.Logger
// contains filtered or unexported fields
}
func NewRevenueAnalyticsHandler ¶ added in v1.0.33
func NewRevenueAnalyticsHandler( revenueAnalyticsService interfaces.RevenueAnalyticsService, costsheetUsageTrackingService service.CostSheetUsageTrackingService, config *config.Configuration, logger *logger.Logger, ) *RevenueAnalyticsHandler
func (*RevenueAnalyticsHandler) GetDetailedCostAnalytics ¶ added in v1.0.33
func (h *RevenueAnalyticsHandler) GetDetailedCostAnalytics(c *gin.Context)
GetCombinedAnalytics retrieves combined cost and revenue analytics with derived metrics @Summary Get combined revenue and cost analytics @Description Retrieve combined analytics with ROI, margin, and detailed breakdowns. If start_time and end_time are not provided, defaults to last 7 days. @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.GetCostAnalyticsRequest true "Combined analytics request (start_time/end_time optional - defaults to last 7 days)" @Success 200 {object} dto.GetDetailedCostAnalyticsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/analytics [post]
func (*RevenueAnalyticsHandler) GetDetailedCostAnalyticsV2 ¶ added in v1.0.47
func (h *RevenueAnalyticsHandler) GetDetailedCostAnalyticsV2(c *gin.Context)
GetCombinedAnalytics retrieves combined cost and revenue analytics with derived metrics @Summary Get combined revenue and cost analytics @Description Retrieve combined analytics with ROI, margin, and detailed breakdowns. If start_time and end_time are not provided, defaults to last 7 days. @Tags Costs @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.GetCostAnalyticsRequest true "Combined analytics request (start_time/end_time optional - defaults to last 7 days)" @Success 200 {object} dto.GetDetailedCostAnalyticsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /costs/analytics-v2 [post]
type ScheduledTaskHandler ¶ added in v1.0.32
type ScheduledTaskHandler struct {
// contains filtered or unexported fields
}
func NewScheduledTaskHandler ¶ added in v1.0.32
func NewScheduledTaskHandler( service service.ScheduledTaskService, logger *logger.Logger, ) *ScheduledTaskHandler
func (*ScheduledTaskHandler) CreateScheduledTask ¶ added in v1.0.32
func (h *ScheduledTaskHandler) CreateScheduledTask(c *gin.Context)
@Summary Create a scheduled task @Description Create a new scheduled task for data export @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param scheduled_task body dto.CreateScheduledTaskRequest true "Scheduled Task" @Success 201 {object} dto.ScheduledTaskResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/scheduled [post]
func (*ScheduledTaskHandler) DeleteScheduledTask ¶ added in v1.0.32
func (h *ScheduledTaskHandler) DeleteScheduledTask(c *gin.Context)
@Summary Delete a scheduled task @Description Archive a scheduled task by ID (soft delete) - Sets status to archived and deletes from Temporal @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Scheduled Task ID" @Success 204 "Scheduled task archived successfully" @Failure 400 {object} ierr.ErrorResponse "Task already archived" @Failure 404 {object} ierr.ErrorResponse "Scheduled task not found" @Failure 500 {object} ierr.ErrorResponse "Failed to archive task" @Router /tasks/scheduled/{id} [delete]
func (*ScheduledTaskHandler) GetScheduledTask ¶ added in v1.0.32
func (h *ScheduledTaskHandler) GetScheduledTask(c *gin.Context)
@Summary Get a scheduled task @Description Get a scheduled task by ID @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Scheduled Task ID" @Success 200 {object} dto.ScheduledTaskResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/scheduled/{id} [get]
func (*ScheduledTaskHandler) ListScheduledTasks ¶ added in v1.0.32
func (h *ScheduledTaskHandler) ListScheduledTasks(c *gin.Context)
@Summary List scheduled tasks @Description Get a list of scheduled tasks with optional filters @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param limit query int false "Limit" @Param offset query int false "Offset" @Param connection_id query string false "Filter by connection ID" @Param entity_type query string false "Filter by entity type" @Param interval query string false "Filter by interval" @Param enabled query bool false "Filter by enabled status" @Success 200 {object} dto.ListScheduledTasksResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/scheduled [get]
func (*ScheduledTaskHandler) ScheduleUpdateBillingPeriod ¶ added in v1.0.49
func (h *ScheduledTaskHandler) ScheduleUpdateBillingPeriod(c *gin.Context)
@Summary Schedule update billing period @Description Schedule an update billing period workflow @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param request body object true "Schedule Update Billing Period Request" @Success 200 {object} object @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/scheduled/schedule-update-billing-period [post]
func (*ScheduledTaskHandler) TriggerForceRun ¶ added in v1.0.32
func (h *ScheduledTaskHandler) TriggerForceRun(c *gin.Context)
@Summary Trigger force run @Description Trigger a force run export immediately for a scheduled task with optional custom time range @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Scheduled Task ID" @Param request body dto.TriggerForceRunRequest false "Optional start and end time for custom range" @Success 200 {object} dto.TriggerForceRunResponse "Returns workflow details and time range" @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/scheduled/{id}/run [post]
func (*ScheduledTaskHandler) UpdateScheduledTask ¶ added in v1.0.32
func (h *ScheduledTaskHandler) UpdateScheduledTask(c *gin.Context)
@Summary Update a scheduled task @Description Update a scheduled task by ID - Only enabled field can be changed (pause/resume) @Tags ScheduledTasks @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Scheduled Task ID" @Param scheduled_task body dto.UpdateScheduledTaskRequest true "Update request (enabled: true/false to pause/resume)" @Success 200 {object} dto.ScheduledTaskResponse @Failure 400 {object} ierr.ErrorResponse "Invalid request or task is archived" @Failure 404 {object} ierr.ErrorResponse "Scheduled task not found" @Failure 500 {object} ierr.ErrorResponse "Failed to update Temporal schedule" @Router /tasks/scheduled/{id} [put]
type SecretHandler ¶
type SecretHandler struct {
// contains filtered or unexported fields
}
func NewSecretHandler ¶
func NewSecretHandler(service service.SecretService, logger *logger.Logger) *SecretHandler
func (*SecretHandler) CreateAPIKey ¶
func (h *SecretHandler) CreateAPIKey(c *gin.Context)
CreateAPIKey godoc @Summary Create a new API key @Description Create a new API key. Provide 'service_account_id' in body to create API key for a service account, otherwise creates for authenticated user. @Tags secrets @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.CreateAPIKeyRequest true "API key creation request\" @Success 201 {object} dto.CreateAPIKeyResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/api/keys [post]
func (*SecretHandler) CreateIntegration ¶
func (h *SecretHandler) CreateIntegration(c *gin.Context)
CreateIntegration godoc @Summary Create or update an integration @Description Create or update integration credentials @Tags Integrations @Accept json @Produce json @Security ApiKeyAuth @Param provider path string true "Integration provider" @Param request body dto.CreateIntegrationRequest true "Integration creation request" @Success 201 {object} dto.SecretResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/integrations/create/{provider} [post]
func (*SecretHandler) DeleteAPIKey ¶
func (h *SecretHandler) DeleteAPIKey(c *gin.Context)
DeleteAPIKey godoc @Summary Delete an API key @Description Delete an API key by ID @Tags secrets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "API key ID" @Success 204 "No Content" @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/api/keys/{id} [delete]
func (*SecretHandler) DeleteIntegration ¶
func (h *SecretHandler) DeleteIntegration(c *gin.Context)
DeleteIntegration godoc @Summary Delete an integration @Description Delete integration credentials @Tags Integrations @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Integration ID" @Success 204 "No Content" @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/integrations/{id} [delete]
func (*SecretHandler) GetIntegration ¶
func (h *SecretHandler) GetIntegration(c *gin.Context)
GetIntegration godoc @Summary Get integration details @Description Get details of a specific integration @Tags Integrations @Accept json @Produce json @Security ApiKeyAuth @Param provider path string true "Integration provider" @Success 200 {object} dto.SecretResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/integrations/by-provider/{provider} [get]
func (*SecretHandler) ListAPIKeys ¶
func (h *SecretHandler) ListAPIKeys(c *gin.Context)
ListAPIKeys godoc @Summary List API keys @Description Get a paginated list of API keys @Tags secrets @Accept json @Produce json @Security ApiKeyAuth @Param limit query int false "Limit" @Param offset query int false "Offset" @Param status query string false "Status (published/archived)" @Success 200 {object} dto.ListSecretsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/api/keys [get]
func (*SecretHandler) ListLinkedIntegrations ¶
func (h *SecretHandler) ListLinkedIntegrations(c *gin.Context)
ListLinkedIntegrations godoc @Summary List linked integrations @Description Get a list of unique providers which have a valid linked integration secret @Tags Integrations @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} dto.LinkedIntegrationsResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/integrations/linked [get]
type SettingsHandler ¶ added in v1.0.22
type SettingsHandler struct {
// contains filtered or unexported fields
}
func NewSettingsHandler ¶ added in v1.0.22
func NewSettingsHandler( service service.SettingsService, log *logger.Logger, ) *SettingsHandler
func (*SettingsHandler) DeleteSettingByKey ¶ added in v1.0.22
func (h *SettingsHandler) DeleteSettingByKey(c *gin.Context)
func (*SettingsHandler) GetSettingByKey ¶ added in v1.0.22
func (h *SettingsHandler) GetSettingByKey(c *gin.Context)
func (*SettingsHandler) UpdateSettingByKey ¶ added in v1.0.22
func (h *SettingsHandler) UpdateSettingByKey(c *gin.Context)
type SetupIntentHandler ¶ added in v1.0.28
type SetupIntentHandler struct {
// contains filtered or unexported fields
}
func NewSetupIntentHandler ¶ added in v1.0.28
func NewSetupIntentHandler(integrationFactory *integration.Factory, customerService interfaces.CustomerService, log *logger.Logger) *SetupIntentHandler
func (*SetupIntentHandler) CreateSetupIntentSession ¶ added in v1.0.28
func (h *SetupIntentHandler) CreateSetupIntentSession(c *gin.Context)
func (*SetupIntentHandler) ListCustomerPaymentMethods ¶ added in v1.0.28
func (h *SetupIntentHandler) ListCustomerPaymentMethods(c *gin.Context)
type SubscriptionChangeHandler ¶ added in v1.0.25
type SubscriptionChangeHandler struct {
// contains filtered or unexported fields
}
SubscriptionChangeHandler handles API requests for subscription plan changes
func NewSubscriptionChangeHandler ¶ added in v1.0.25
func NewSubscriptionChangeHandler( subscriptionChangeService service.SubscriptionChangeService, log *logger.Logger, ) *SubscriptionChangeHandler
NewSubscriptionChangeHandler creates a new subscription change handler
func (*SubscriptionChangeHandler) ExecuteSubscriptionChange ¶ added in v1.0.25
func (h *SubscriptionChangeHandler) ExecuteSubscriptionChange(c *gin.Context)
@Summary Execute subscription plan change @Description Execute a subscription plan change, including proration and invoice generation @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.SubscriptionChangeRequest true "Subscription change request" @Success 200 {object} dto.SubscriptionChangeExecuteResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/change/execute [post]
func (*SubscriptionChangeHandler) PreviewSubscriptionChange ¶ added in v1.0.25
func (h *SubscriptionChangeHandler) PreviewSubscriptionChange(c *gin.Context)
@Summary Preview subscription plan change @Description Preview the impact of changing a subscription's plan, including proration calculations @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.SubscriptionChangeRequest true "Subscription change preview request" @Success 200 {object} dto.SubscriptionChangePreviewResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/change/preview [post]
type SubscriptionHandler ¶
type SubscriptionHandler struct {
// contains filtered or unexported fields
}
func NewSubscriptionHandler ¶
func NewSubscriptionHandler(service service.SubscriptionService, log *logger.Logger) *SubscriptionHandler
func (*SubscriptionHandler) ActivateDraftSubscription ¶ added in v1.0.42
func (h *SubscriptionHandler) ActivateDraftSubscription(c *gin.Context)
@Summary Activate draft subscription @Description Activate a draft subscription with a new start date @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.ActivateDraftSubscriptionRequest true "Activate Draft Subscription Request" @Success 200 {object} dto.SubscriptionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/activate [post]
func (*SubscriptionHandler) AddAddonToSubscription ¶ added in v1.0.21
func (h *SubscriptionHandler) AddAddonToSubscription(c *gin.Context)
@Summary Add addon to subscription @Description Add an addon to a subscription @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.AddAddonRequest true "Add Addon Request" @Success 200 {object} dto.AddonAssociationResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/addon [post]
func (*SubscriptionHandler) CancelSubscription ¶
func (h *SubscriptionHandler) CancelSubscription(c *gin.Context)
@Summary Cancel subscription @Description Cancel a subscription with enhanced proration support @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.CancelSubscriptionRequest true "Cancel Subscription Request" @Success 200 {object} dto.CancelSubscriptionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/cancel [post]
func (*SubscriptionHandler) CreateSubscription ¶
func (h *SubscriptionHandler) CreateSubscription(c *gin.Context)
@Summary Create subscription @Description Create a new subscription @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param subscription body dto.CreateSubscriptionRequest true "Subscription Request" @Success 201 {object} dto.SubscriptionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions [post]
func (*SubscriptionHandler) DeleteSubscriptionLineItem ¶ added in v1.0.35
func (h *SubscriptionHandler) DeleteSubscriptionLineItem(c *gin.Context)
@Summary Delete subscription line item @Description Delete a subscription line item by setting its end date @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Line Item ID" @Param request body dto.DeleteSubscriptionLineItemRequest true "Delete Line Item Request" @Success 200 {object} dto.SubscriptionLineItemResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/lineitems/{id} [delete]
func (*SubscriptionHandler) GetActiveAddonAssociations ¶ added in v1.0.47
func (h *SubscriptionHandler) GetActiveAddonAssociations(c *gin.Context)
@Summary Get active addon associations @Description Get active addon associations for a subscription @Tags Subscriptions @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Success 200 {array} dto.AddonAssociationResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/addons/associations [get]
func (*SubscriptionHandler) GetSubscription ¶
func (h *SubscriptionHandler) GetSubscription(c *gin.Context)
@Summary Get subscription @Description Get a subscription by ID @Tags Subscriptions @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Success 200 {object} dto.SubscriptionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id} [get]
func (*SubscriptionHandler) GetSubscriptionEntitlements ¶ added in v1.0.35
func (h *SubscriptionHandler) GetSubscriptionEntitlements(c *gin.Context)
@Summary Get subscription entitlements @Description Get all entitlements for a subscription @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param feature_ids query []string false "Feature IDs to filter by" @Success 200 {object} dto.SubscriptionEntitlementsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/entitlements [get]
func (*SubscriptionHandler) GetSubscriptions ¶
func (h *SubscriptionHandler) GetSubscriptions(c *gin.Context)
@Summary List subscriptions @Description Get subscriptions with optional filtering @Tags Subscriptions @Produce json @Security ApiKeyAuth @Param filter query types.SubscriptionFilter false "Filter" @Success 200 {object} dto.ListSubscriptionsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions [get]
func (*SubscriptionHandler) GetUpcomingCreditGrantApplications ¶ added in v1.0.38
func (h *SubscriptionHandler) GetUpcomingCreditGrantApplications(c *gin.Context)
@Summary Get upcoming credit grant applications @Description Get upcoming credit grant applications for a subscription @Tags Subscriptions @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Success 200 {object} dto.ListCreditGrantApplicationsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/grants/upcoming [get]
func (*SubscriptionHandler) GetUsageBySubscription ¶
func (h *SubscriptionHandler) GetUsageBySubscription(c *gin.Context)
@Summary Get usage by subscription @Description Get usage for a subscription @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.GetUsageBySubscriptionRequest true "Usage request" @Success 200 {object} dto.GetUsageBySubscriptionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/usage [post]
func (*SubscriptionHandler) ListSubscriptionsByFilter ¶ added in v1.0.20
func (h *SubscriptionHandler) ListSubscriptionsByFilter(c *gin.Context)
ListSubscriptionsByFilter godoc @Summary List subscriptions by filter @Description List subscriptions by filter @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.SubscriptionFilter true "Filter" @Success 200 {object} dto.ListSubscriptionsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/search [post]
func (*SubscriptionHandler) RemoveAddonToSubscription ¶ added in v1.0.21
func (h *SubscriptionHandler) RemoveAddonToSubscription(c *gin.Context)
@Summary Remove addon from subscription @Description Remove an addon from a subscription @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.RemoveAddonRequest true "Remove Addon Request" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/addon [delete]
func (*SubscriptionHandler) UpdateSubscriptionLineItem ¶ added in v1.0.30
func (h *SubscriptionHandler) UpdateSubscriptionLineItem(c *gin.Context)
@Summary Update subscription line item @Description Update a subscription line item by terminating the existing one and creating a new one @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Line Item ID" @Param request body dto.UpdateSubscriptionLineItemRequest true "Update Line Item Request" @Success 200 {object} dto.SubscriptionLineItemResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/lineitems/{id} [put]
type SubscriptionPauseHandler ¶
type SubscriptionPauseHandler struct {
// contains filtered or unexported fields
}
SubscriptionPauseHandler handles API requests for subscription pauses
func NewSubscriptionPauseHandler ¶
func NewSubscriptionPauseHandler(service service.SubscriptionService, log *logger.Logger) *SubscriptionPauseHandler
NewSubscriptionPauseHandler creates a new subscription pause handler
func (*SubscriptionPauseHandler) ListPauses ¶
func (h *SubscriptionPauseHandler) ListPauses(c *gin.Context)
@Summary List all pauses for a subscription @Description List all pauses for a subscription @Tags Subscriptions @Produce json @Param id path string true "Subscription ID" @Success 200 {array} dto.ListSubscriptionPausesResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/pauses [get]
func (*SubscriptionPauseHandler) PauseSubscription ¶
func (h *SubscriptionPauseHandler) PauseSubscription(c *gin.Context)
@Summary Pause a subscription @Description Pause a subscription with the specified parameters @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.PauseSubscriptionRequest true "Pause subscription request" @Success 200 {object} dto.SubscriptionPauseResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/pause [post]
func (*SubscriptionPauseHandler) ResumeSubscription ¶
func (h *SubscriptionPauseHandler) ResumeSubscription(c *gin.Context)
@Summary Resume a paused subscription @Description Resume a paused subscription with the specified parameters @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.ResumeSubscriptionRequest true "Resume subscription request" @Success 200 {object} dto.SubscriptionPauseResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/resume [post]
type TaskHandler ¶
type TaskHandler struct {
// contains filtered or unexported fields
}
func NewTaskHandler ¶
func NewTaskHandler( service service.TaskService, temporalService temporalservice.TemporalService, log *logger.Logger, ) *TaskHandler
func (*TaskHandler) CreateTask ¶
func (h *TaskHandler) CreateTask(c *gin.Context)
@Summary Create a new task @Description Create a new task for processing files asynchronously @Tags Tasks @Accept json @Produce json @Security ApiKeyAuth @Param task body dto.CreateTaskRequest true "Task configuration" @Success 202 {object} dto.TaskResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks [post]
func (*TaskHandler) GetTask ¶
func (h *TaskHandler) GetTask(c *gin.Context)
@Summary Get a task @Description Get a task by ID @Tags Tasks @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Task ID" @Success 200 {object} dto.TaskResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/{id} [get]
func (*TaskHandler) GetTaskProcessingResult ¶ added in v1.0.27
func (h *TaskHandler) GetTaskProcessingResult(c *gin.Context)
@Summary Get task processing result @Description Get the result of a task processing workflow @Tags Tasks @Accept json @Produce json @Security ApiKeyAuth @Param workflow_id query string true "Workflow ID" @Success 200 {object} models.TemporalWorkflowResult @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/result [get]
func (*TaskHandler) ListTasks ¶
func (h *TaskHandler) ListTasks(c *gin.Context)
@Summary List tasks @Description List tasks with optional filtering @Tags Tasks @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.TaskFilter false "Filter" @Success 200 {object} dto.ListTasksResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks [get]
func (*TaskHandler) UpdateTaskStatus ¶
func (h *TaskHandler) UpdateTaskStatus(c *gin.Context)
@Summary Update task status @Description Update a task's status @Tags Tasks @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Task ID" @Param status body dto.UpdateTaskStatusRequest true "Status update" @Success 200 {object} dto.SuccessResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/{id}/status [put]
type TaxHandler ¶ added in v1.0.21
type TaxHandler struct {
// contains filtered or unexported fields
}
func NewTaxHandler ¶ added in v1.0.21
func NewTaxHandler(service service.TaxService, logger *logger.Logger) *TaxHandler
func (*TaxHandler) CreateTaxAssociation ¶ added in v1.0.21
func (h *TaxHandler) CreateTaxAssociation(c *gin.Context)
@Summary Create Tax Association @Description Create a new tax association @Tags Tax Associations @Accept json @Produce json @Security ApiKeyAuth @Param tax_config body dto.CreateTaxAssociationRequest true "Tax Config Request" @Success 200 {object} dto.TaxAssociationResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/associations [post]
func (*TaxHandler) CreateTaxRate ¶ added in v1.0.21
func (h *TaxHandler) CreateTaxRate(c *gin.Context)
@Summary Create a tax rate @Description Create a tax rate @Tags Tax Rates @Accept json @Produce json @Security ApiKeyAuth @Param tax_rate body dto.CreateTaxRateRequest true "Tax rate to create" @Success 201 {object} dto.TaxRateResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/rates [post]
func (*TaxHandler) DeleteTaxAssociation ¶ added in v1.0.21
func (h *TaxHandler) DeleteTaxAssociation(c *gin.Context)
@Summary Delete tax association @Description Delete a tax association by ID @Tags Tax Associations @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tax Config ID" @Success 200 {object} dto.TaxAssociationResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/associations/{id} [delete]
func (*TaxHandler) DeleteTaxRate ¶ added in v1.0.21
func (h *TaxHandler) DeleteTaxRate(c *gin.Context)
@Summary Delete a tax rate @Description Delete a tax rate @Tags Tax Rates @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tax rate ID" @Success 204 {object} nil @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/rates/{id} [delete]
func (*TaxHandler) GetTaxAssociation ¶ added in v1.0.21
func (h *TaxHandler) GetTaxAssociation(c *gin.Context)
@Summary Get Tax Association @Description Get a tax association by ID @Tags Tax Associations @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tax Config ID" @Success 200 {object} dto.TaxAssociationResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/associations/{id} [get]
func (*TaxHandler) GetTaxRate ¶ added in v1.0.21
func (h *TaxHandler) GetTaxRate(c *gin.Context)
@Summary Get a tax rate @Description Get a tax rate @Tags Tax Rates @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tax rate ID" @Success 200 {object} dto.TaxRateResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/rates/{id} [get]
func (*TaxHandler) ListTaxAssociations ¶ added in v1.0.21
func (h *TaxHandler) ListTaxAssociations(c *gin.Context)
@Summary List tax associations @Description List tax associations @Tags Tax Associations @Accept json @Produce json @Security ApiKeyAuth @Param entity_type query string false "Entity Type" @Param entity_id query string false "Entity ID" @Param tax_rate_id query string false "Tax Rate ID" @Success 200 {object} dto.ListTaxAssociationsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/associations [get]
func (*TaxHandler) ListTaxRates ¶ added in v1.0.21
func (h *TaxHandler) ListTaxRates(c *gin.Context)
@Summary Get tax rates @Description Get tax rates @Tags Tax Rates @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.TaxRateFilter true "Filter" @Success 200 {object} []dto.TaxRateResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/rates [get]
func (*TaxHandler) UpdateTaxAssociation ¶ added in v1.0.21
func (h *TaxHandler) UpdateTaxAssociation(c *gin.Context)
@Summary Update tax association @Description Update a tax association by ID @Tags Tax Associations @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tax Config ID" @Param tax_config body dto.TaxAssociationUpdateRequest true "Tax Config Request" @Success 200 {object} dto.TaxAssociationResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/associations/{id} [put]
func (*TaxHandler) UpdateTaxRate ¶ added in v1.0.21
func (h *TaxHandler) UpdateTaxRate(c *gin.Context)
@Summary Update a tax rate @Description Update a tax rate @Tags Tax Rates @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tax rate ID" @Param tax_rate body dto.UpdateTaxRateRequest true "Tax rate to update" @Success 200 {object} dto.TaxRateResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /taxes/rates/{id} [put]
type TenantHandler ¶
type TenantHandler struct {
// contains filtered or unexported fields
}
func NewTenantHandler ¶
func NewTenantHandler( service service.TenantService, log *logger.Logger, ) *TenantHandler
func (*TenantHandler) CreateTenant ¶
func (h *TenantHandler) CreateTenant(c *gin.Context)
@Summary Create a new tenant @Description Create a new tenant @Tags Tenants @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.CreateTenantRequest true "Create tenant request" @Success 201 {object} dto.TenantResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tenants [post]
func (*TenantHandler) GetTenantBillingUsage ¶ added in v1.0.0
func (h *TenantHandler) GetTenantBillingUsage(c *gin.Context)
@Summary Get billing usage for the current tenant @Description Get the subscription and usage details for the current tenant @Tags Tenants @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} dto.TenantBillingUsage @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tenant/billing [get]
func (*TenantHandler) GetTenantByID ¶
func (h *TenantHandler) GetTenantByID(c *gin.Context)
@Summary Get tenant by ID @Description Get tenant by ID @Tags Tenants @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Tenant ID" @Success 200 {object} dto.TenantResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tenants/{id} [get]
func (*TenantHandler) UpdateTenant ¶ added in v1.0.0
func (h *TenantHandler) UpdateTenant(c *gin.Context)
@Summary Update a tenant @Description Update a tenant's details including name and billing information @Tags Tenants @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.UpdateTenantRequest true "Update tenant request" @Success 200 {object} dto.TenantResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tenants/update [put]
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(userService service.UserService, logger *logger.Logger) *UserHandler
func (*UserHandler) CreateUser ¶ added in v1.0.36
func (h *UserHandler) CreateUser(c *gin.Context)
@Summary Create service account @Description Create a new service account with required roles. Only service accounts can be created via this endpoint. @Tags Users @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.CreateUserRequest true "Create service account request (type must be 'service_account', roles are required)" @Success 201 {object} dto.UserResponse @Failure 400 {object} errors.ErrorResponse @Failure 500 {object} errors.ErrorResponse @Router /users [post]
func (*UserHandler) GetUserInfo ¶
func (h *UserHandler) GetUserInfo(c *gin.Context)
@Summary Get user info @Description Get the current user's information @Tags Users @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} dto.UserResponse @Failure 401 {object} errors.ErrorResponse @Failure 500 {object} errors.ErrorResponse @Router /users/me [get]
func (*UserHandler) ListUsersByFilter ¶ added in v1.0.36
func (h *UserHandler) ListUsersByFilter(c *gin.Context)
@Summary List users with filters @Description Search and filter users by type (user/service_account), roles, etc. @Tags Users @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.UserFilter true "Filter parameters" @Success 200 {object} dto.ListUsersResponse @Failure 400 {object} errors.ErrorResponse @Failure 500 {object} errors.ErrorResponse @Router /users/search [post]
type WalletHandler ¶
type WalletHandler struct {
// contains filtered or unexported fields
}
WalletHandler handles wallet-related HTTP requests
func NewWalletHandler ¶
func NewWalletHandler(walletService service.WalletService, logger *logger.Logger) *WalletHandler
NewWalletHandler creates a new wallet handler
func (*WalletHandler) CreateWallet ¶
func (h *WalletHandler) CreateWallet(c *gin.Context)
CreateWallet godoc @Summary Create a new wallet @Description Create a new wallet for a customer @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.CreateWalletRequest true "Create wallet request" @Success 200 {object} dto.WalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets [post]
func (*WalletHandler) GetCustomerWallets ¶ added in v1.0.17
func (h *WalletHandler) GetCustomerWallets(c *gin.Context)
GetCustomerWallets godoc @Summary Get Customer Wallets @Description Get all wallets for a customer by lookup key or id @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param request query dto.GetCustomerWalletsRequest true "Get customer wallets request" @Success 200 {array} dto.WalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/wallets [get]
func (*WalletHandler) GetWalletBalance ¶
func (h *WalletHandler) GetWalletBalance(c *gin.Context)
GetWalletBalance godoc @Summary Get wallet balance @Description Get real-time balance of a wallet @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Wallet ID" @Success 200 {object} dto.WalletBalanceResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/{id}/balance/real-time [get]
func (*WalletHandler) GetWalletBalanceV2 ¶ added in v1.0.27
func (h *WalletHandler) GetWalletBalanceV2(c *gin.Context)
TODONEW: Revamp
func (*WalletHandler) GetWalletByID ¶
func (h *WalletHandler) GetWalletByID(c *gin.Context)
GetWalletByID godoc @Summary Get wallet by ID @Description Get a wallet by its ID @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Wallet ID" @Success 200 {object} dto.WalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/{id} [get]
func (*WalletHandler) GetWalletTransactions ¶
func (h *WalletHandler) GetWalletTransactions(c *gin.Context)
GetWalletTransactions godoc @Summary Get wallet transactions @Description Get transactions for a wallet with pagination @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Wallet ID" @Param filter query types.WalletTransactionFilter false "Filter" @Success 200 {object} dto.ListWalletTransactionsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/{id}/transactions [get]
func (*WalletHandler) GetWalletsByCustomerID ¶
func (h *WalletHandler) GetWalletsByCustomerID(c *gin.Context)
GetWalletsByCustomerID godoc @Summary Get wallets by customer ID @Description Get all wallets for a customer @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Success 200 {array} dto.WalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id}/wallets [get]
func (*WalletHandler) ListWalletTransactionsByFilter ¶ added in v1.0.47
func (h *WalletHandler) ListWalletTransactionsByFilter(c *gin.Context)
ListWalletTransactionsByFilter godoc @Summary List wallet transactions by filter @Description List wallet transactions by filter @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.WalletTransactionFilter false "Filter" @Param expand query string false "Expand fields (e.g., customer,created_by_user,wallet)" @Success 200 {object} dto.ListWalletTransactionsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/transactions/search [post]
func (*WalletHandler) ListWallets ¶ added in v1.0.47
func (h *WalletHandler) ListWallets(c *gin.Context)
@Summary List wallets @Description List wallets with optional filtering @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param filter query types.WalletFilter false "Filter" @Success 200 {object} types.ListResponse[dto.WalletResponse] @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets [get]
func (*WalletHandler) ListWalletsByFilter ¶ added in v1.0.47
func (h *WalletHandler) ListWalletsByFilter(c *gin.Context)
ListWalletsByFilter godoc @Summary List wallets by filter @Description List wallets by filter @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param filter body types.WalletFilter false "Filter" @Success 200 {object} types.ListResponse[dto.WalletResponse] @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/search [post]
func (*WalletHandler) ManualBalanceDebit ¶ added in v1.0.36
func (h *WalletHandler) ManualBalanceDebit(c *gin.Context)
func (*WalletHandler) TerminateWallet ¶
func (h *WalletHandler) TerminateWallet(c *gin.Context)
TerminateWallet godoc @Summary Terminate a wallet @Description Terminates a wallet by closing it and debiting remaining balance @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Wallet ID" @Success 200 {object} dto.WalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/{id}/terminate [post]
func (*WalletHandler) TopUpWallet ¶
func (h *WalletHandler) TopUpWallet(c *gin.Context)
TopUpWallet godoc @Summary Top up wallet @Description Add credits to a wallet @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Wallet ID" @Param request body dto.TopUpWalletRequest true "Top up request" @Success 200 {object} dto.TopUpWalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/{id}/top-up [post]
func (*WalletHandler) UpdateWallet ¶
func (h *WalletHandler) UpdateWallet(c *gin.Context)
UpdateWallet godoc @Summary Update a wallet @Description Update a wallet's details including auto top-up configuration @Tags Wallets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Wallet ID" @Param request body dto.UpdateWalletRequest true "Update wallet request" @Success 200 {object} dto.WalletResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /wallets/{id} [put]
type WebhookHandler ¶ added in v1.0.18
type WebhookHandler struct {
// contains filtered or unexported fields
}
WebhookHandler handles webhook-related endpoints
func NewWebhookHandler ¶ added in v1.0.18
func NewWebhookHandler( cfg *config.Configuration, svixClient *svix.Client, logger *logger.Logger, integrationFactory *integration.Factory, customerService interfaces.CustomerService, paymentService interfaces.PaymentService, invoiceService interfaces.InvoiceService, planService interfaces.PlanService, subscriptionService interfaces.SubscriptionService, entityIntegrationMappingService interfaces.EntityIntegrationMappingService, db postgres.IClient, ) *WebhookHandler
NewWebhookHandler creates a new webhook handler
func (*WebhookHandler) GetDashboardURL ¶ added in v1.0.18
func (h *WebhookHandler) GetDashboardURL(c *gin.Context)
GetDashboardURL handles the GET /webhooks/dashboard endpoint
func (*WebhookHandler) HandleChargebeeWebhook ¶ added in v1.0.38
func (h *WebhookHandler) HandleChargebeeWebhook(c *gin.Context)
@Summary Handle Chargebee webhook events @Description Process incoming Chargebee webhook events for payment status updates @Tags Webhooks @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param environment_id path string true "Environment ID" @Param Authorization header string false "Basic Auth credentials" @Success 200 {object} map[string]interface{} "Webhook processed successfully" @Failure 401 {object} map[string]interface{} "Unauthorized" @Failure 400 {object} map[string]interface{} "Bad request" @Failure 500 {object} map[string]interface{} "Internal server error" @Router /webhooks/chargebee/{tenant_id}/{environment_id} [post]
func (*WebhookHandler) HandleHubSpotWebhook ¶ added in v1.0.34
func (h *WebhookHandler) HandleHubSpotWebhook(c *gin.Context)
@Summary Handle HubSpot webhook events @Description Process incoming HubSpot webhook events for deal closed won and customer creation @Tags Webhooks @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param environment_id path string true "Environment ID" @Param X-HubSpot-Signature-v3 header string true "HubSpot webhook signature" @Success 200 {object} map[string]interface{} "Webhook received (always returns 200)" @Router /webhooks/hubspot/{tenant_id}/{environment_id} [post]
func (*WebhookHandler) HandleNomodWebhook ¶ added in v1.0.47
func (h *WebhookHandler) HandleNomodWebhook(c *gin.Context)
@Summary Handle Nomod webhook events @Description Process incoming Nomod webhook events for payment and invoice payments @Tags Webhooks @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param environment_id path string true "Environment ID" @Param X-API-KEY header string false "Nomod webhook secret (if configured)" @Success 200 {object} map[string]interface{} "Webhook processed successfully" @Failure 401 {object} map[string]interface{} "Unauthorized - invalid or missing X-API-KEY" @Router /webhooks/nomod/{tenant_id}/{environment_id} [post]
func (*WebhookHandler) HandleQuickBooksWebhook ¶ added in v1.0.47
func (h *WebhookHandler) HandleQuickBooksWebhook(c *gin.Context)
@Summary Handle QuickBooks webhook events @Description Process incoming QuickBooks webhook events for payment sync @Tags Webhooks @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param environment_id path string true "Environment ID" @Param intuit-signature header string false "QuickBooks webhook signature" @Success 200 {object} map[string]interface{} "Webhook processed successfully" @Failure 401 {object} map[string]interface{} "Unauthorized - invalid signature" @Failure 400 {object} map[string]interface{} "Bad request" @Failure 500 {object} map[string]interface{} "Internal server error" @Router /webhooks/quickbooks/{tenant_id}/{environment_id} [post]
func (*WebhookHandler) HandleRazorpayWebhook ¶ added in v1.0.38
func (h *WebhookHandler) HandleRazorpayWebhook(c *gin.Context)
@Summary Handle Razorpay webhook events @Description Process incoming Razorpay webhook events for payment capture and failure @Tags Webhooks @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param environment_id path string true "Environment ID" @Param X-Razorpay-Signature header string true "Razorpay webhook signature" @Success 200 {object} map[string]interface{} "Webhook received (always returns 200)" @Router /webhooks/razorpay/{tenant_id}/{environment_id} [post]
func (*WebhookHandler) HandleStripeWebhook ¶ added in v1.0.21
func (h *WebhookHandler) HandleStripeWebhook(c *gin.Context)
@Summary Handle Stripe webhook events @Description Process incoming Stripe webhook events for payment status updates and customer creation @Tags Webhooks @Accept json @Produce json @Param tenant_id path string true "Tenant ID" @Param environment_id path string true "Environment ID" @Param Stripe-Signature header string true "Stripe webhook signature" @Success 200 {object} map[string]interface{} "Webhook processed successfully" @Failure 400 {object} map[string]interface{} "Bad request - missing parameters or invalid signature" @Failure 500 {object} map[string]interface{} "Internal server error" @Router /webhooks/stripe/{tenant_id}/{environment_id} [post]
Source Files
¶
- addon.go
- alertlogs.go
- auth.go
- connection.go
- costsheet.go
- costsheet_analytics.go
- coupon.go
- creditgrant.go
- creditnote.go
- customer.go
- customer_portal.go
- entitlement.go
- entityintegrationmapping.go
- environment.go
- events.go
- feature.go
- group.go
- health.go
- invoice.go
- meter.go
- oauth.go
- onboarding.go
- payment.go
- plan.go
- price.go
- priceunit.go
- rbac.go
- scheduled_task.go
- secret.go
- settings.go
- setupintent.go
- subscription.go
- subscription_change.go
- subscription_pause.go
- task.go
- tax.go
- tenant.go
- user.go
- wallet.go
- webhook.go