v1

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

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, 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} gin.H @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) 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 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)

@Summary Create a connection @Description Create a new integration connection @Tags Connections @Accept json @Produce json @Security ApiKeyAuth @Param connection body dto.CreateConnectionRequest true "Connection" @Success 201 {object} dto.ConnectionResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /connections [post]

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.18

type CostSheetHandler struct {
	// contains filtered or unexported fields
}

CostSheetHandler handles HTTP requests for cost sheet operations.

func NewCostSheetHandler added in v1.0.18

func NewCostSheetHandler(service service.CostSheetService, log *logger.Logger) *CostSheetHandler

NewCostSheetHandler creates a new instance of CostSheetHandler.

func (*CostSheetHandler) CalculateROI added in v1.0.18

func (h *CostSheetHandler) CalculateROI(c *gin.Context)

@Summary Calculate ROI for cost sheet @Description Calculate ROI (Return on Investment) for a given cost sheet @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param request body dto.CalculateROIRequest true "ROI calculation request" @Success 200 {object} dto.ROIResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost/roi [post]

func (*CostSheetHandler) CreateCostSheet added in v1.0.18

func (h *CostSheetHandler) CreateCostSheet(c *gin.Context)

@Summary Create a new cost sheet @Description Create a new cost sheet with the specified configuration @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param costsheet body dto.CreateCostSheetRequest true "Cost sheet configuration" @Success 201 {object} dto.CostSheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 409 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost [post]

func (*CostSheetHandler) DeleteCostSheet added in v1.0.18

func (h *CostSheetHandler) DeleteCostSheet(c *gin.Context)

@Summary Delete a cost sheet @Description Delete a cost sheet. If status is published/draft, it will be archived. If already archived, it will be deleted from database. @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Cost Sheet ID" @Success 204 "No Content" @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost/{id} [delete]

func (*CostSheetHandler) GetCostBreakDown added in v1.0.18

func (h *CostSheetHandler) GetCostBreakDown(c *gin.Context)

@Summary Get cost breakdown @Description Get cost breakdown for a time period @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param subscription_id path string true "Subscription ID" @Param start_time query string false "Start time (RFC3339)" @Param end_time query string false "End time (RFC3339)" @Success 200 {object} dto.CostBreakdownResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost/breakdown/{subscription_id} [get]

func (*CostSheetHandler) GetCostSheet added in v1.0.18

func (h *CostSheetHandler) GetCostSheet(c *gin.Context)

@Summary Get a cost sheet by ID @Description Get a cost sheet by ID @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Cost Sheet ID" @Success 200 {object} dto.CostSheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost/{id} [get]

func (*CostSheetHandler) ListCostSheets added in v1.0.18

func (h *CostSheetHandler) ListCostSheets(c *gin.Context)

@Summary List cost sheets @Description List cost sheets with optional filtering @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param filter query domainCostsheet.Filter false "Filter" @Success 200 {object} dto.ListCostSheetsResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost [get]

func (*CostSheetHandler) UpdateCostSheet added in v1.0.18

func (h *CostSheetHandler) UpdateCostSheet(c *gin.Context)

@Summary Update a cost sheet @Description Update a cost sheet with the specified configuration @Tags CostSheets @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Cost Sheet ID" @Param costsheet body dto.UpdateCostSheetRequest true "Cost sheet configuration" @Success 200 {object} dto.CostSheetResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /cost/{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 @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 @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 @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 @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 @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} gin.H @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 @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 @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 @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 @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 @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 lookup key @Description Get a customer by lookup key (external_id) @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param lookup_key path string true "Customer Lookup Key (external_id)" @Success 200 {object} dto.CustomerResponse @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/lookup/{lookup_key} [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 @Tags Customers @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Customer ID" @Param filter query dto.GetCustomerUsageSummaryRequest false "Filter" @Success 200 {object} dto.CustomerUsageSummaryResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /customers/{id}/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) 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 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} gin.H @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, 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) 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) 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} gin.H @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 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 IntegrationHandler added in v1.0.21

type IntegrationHandler struct {
	IntegrationService service.IntegrationService
	// contains filtered or unexported fields
}

IntegrationHandler handles integration API requests

func NewIntegrationHandler added in v1.0.21

func NewIntegrationHandler(
	integrationService service.IntegrationService,
	logger *logger.Logger,
) *IntegrationHandler

NewIntegrationHandler creates a new integration handler

func (*IntegrationHandler) GetAvailableProviders added in v1.0.21

func (h *IntegrationHandler) GetAvailableProviders(c *gin.Context)

GetAvailableProviders godoc @Summary Get available providers @Description Get all available payment providers for the current tenant @Tags Integration @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} dto.ListConnectionsResponse @Failure 401 {object} errors.ErrorResponse @Failure 500 {object} errors.ErrorResponse @Router /integration/providers [get]

func (*IntegrationHandler) SyncEntityToProviders added in v1.0.21

func (h *IntegrationHandler) SyncEntityToProviders(c *gin.Context)

SyncEntityToProviders godoc @Summary Sync entity to all available providers @Description Sync an entity to all available payment providers for the current tenant @Tags Integration @Accept json @Produce json @Security ApiKeyAuth @Param entity_type path string true "Entity type (e.g., customer, invoice, tax)" @Param entity_id path string true "Entity ID" @Success 200 {object} map[string]interface{} @Failure 400 {object} errors.ErrorResponse @Failure 401 {object} errors.ErrorResponse @Failure 404 {object} errors.ErrorResponse @Failure 500 {object} errors.ErrorResponse @Router /integration/sync/{entity_type}/{entity_id} [post]

type InvoiceHandler

type InvoiceHandler struct {
	// contains filtered or unexported fields
}

func NewInvoiceHandler

func NewInvoiceHandler(invoiceService service.InvoiceService, temporalService *temporal.Service, 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 @Param id path string true "Invoice ID" @Success 200 {object} gin.H @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 @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 @Param id path string true "Invoice ID" @Success 200 {object} gin.H @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /invoices/{id}/finalize [post]

func (*InvoiceHandler) GenerateInvoice

func (h *InvoiceHandler) GenerateInvoice(c *gin.Context)

GenerateInvoice handles manual invoice generation requests

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 @Param id path string true "Invoice ID" @Param expand_by_source query bool false "Include source-level price breakdown for usage line items" @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 @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 @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 @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 @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 @Param id path string true "Invoice ID" @Success 200 {object} gin.H @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 @Tags Invoices @Accept json @Produce json @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 @Param id path string true "Invoice ID" @Success 200 {object} gin.H @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 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} gin.H @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,
	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} gin.H @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} service.SyncPlanPricesResponse @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" @Success 200 {object} gin.H @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 @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 @Produce json @Param body body dto.CreatePriceUnitRequest true "Price unit details" @Success 201 {object} dto.PriceUnitResponse @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 archiving a price unit @Summary Archive a price unit @Description Archive an existing price unit. The unit will be marked as archived and cannot be used in new prices. @Tags Price Units @Accept json @Produce json @Param id path string true "Price unit ID" @Success 200 {object} gin.H @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Router /prices/units/{id} [delete]

func (*PriceUnitHandler) GetByCode added in v1.0.21

func (h *PriceUnitHandler) GetByCode(c *gin.Context)

@Summary Get a price unit by code @Description Get a price unit by code @Tags Price Units @Accept json @Produce json @Param code path string true "Price unit code" @Success 200 {object} dto.PriceUnitResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/units/code/{code} [get] GetByCode handles GET /prices/units/code/:code

func (*PriceUnitHandler) GetByID added in v1.0.21

func (h *PriceUnitHandler) GetByID(c *gin.Context)

@Summary Get a price unit by ID @Description Get a price unit by ID @Tags Price Units @Accept json @Produce json @Param id path string true "Price unit ID" @Success 200 {object} dto.PriceUnitResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /prices/units/{id} [get] GetByID handles GET /prices/units/:id

func (*PriceUnitHandler) GetPriceUnits added in v1.0.21

func (h *PriceUnitHandler) GetPriceUnits(c *gin.Context)

GetPriceUnits 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 @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 priceunit.PriceUnitFilter 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, symbol, precision, and conversion_rate can be updated. Status changes are not allowed. @Tags Price Units @Accept json @Produce json @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 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 with the specified type and permissions @Tags secrets @Accept json @Produce json @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 @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/{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 @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 @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 @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/{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 @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 @Success 200 {object} dto.LinkedIntegrationsResponse @Failure 500 {object} ierr.ErrorResponse @Router /secrets/integrations/linked [get]

type SubscriptionHandler

type SubscriptionHandler struct {
	// contains filtered or unexported fields
}

func NewSubscriptionHandler

func NewSubscriptionHandler(service service.SubscriptionService, log *logger.Logger) *SubscriptionHandler

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.AddAddonToSubscriptionRequest 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) AddSubscriptionPhase added in v1.0.18

func (h *SubscriptionHandler) AddSubscriptionPhase(c *gin.Context)

@Summary Add new phase to subscription schedule @Description Add a new phase to a subscription schedule @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param request body dto.AddSchedulePhaseRequest true "Add schedule phase request" @Success 200 {object} dto.SubscriptionScheduleResponse @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/{id}/phases [post]

func (*SubscriptionHandler) CancelSubscription

func (h *SubscriptionHandler) CancelSubscription(c *gin.Context)

@Summary Cancel subscription @Description Cancel a subscription @Tags Subscriptions @Accept json @Produce json @Security ApiKeyAuth @Param id path string true "Subscription ID" @Param cancel_at_period_end query bool false "Cancel at period end" @Success 200 {object} gin.H @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) 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) 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) 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} gin.H @Failure 400 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /subscriptions/addon [delete]

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 @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 @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(taskService service.TaskService, logger *logger.Logger) *TaskHandler

func (*TaskHandler) CreateTask

func (h *TaskHandler) CreateTask(c *gin.Context)

CreateTask godoc @Summary Create a new task @Description Create a new import/export task @Tags Tasks @Accept json @Produce json @Param task body dto.CreateTaskRequest true "Task details" @Success 201 {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)

GetTask godoc @Summary Get a task by ID @Description Get detailed information about a task @Tags Tasks @Accept json @Produce json @Param id path string true "Task ID" @Success 200 {object} dto.TaskResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/{id} [get]

func (*TaskHandler) ListTasks

func (h *TaskHandler) ListTasks(c *gin.Context)

ListTasks godoc @Summary List tasks @Description List tasks with optional filtering @Tags Tasks @Accept json @Produce json @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) ProcessTask

func (h *TaskHandler) ProcessTask(c *gin.Context)

ProcessTask godoc @Summary Process a task @Description Start processing a task @Tags Tasks @Accept json @Produce json @Param id path string true "Task ID" @Success 202 {object} gin.H @Failure 400 {object} ierr.ErrorResponse @Failure 404 {object} ierr.ErrorResponse @Failure 500 {object} ierr.ErrorResponse @Router /tasks/{id}/process [post]

func (*TaskHandler) UpdateTaskStatus

func (h *TaskHandler) UpdateTaskStatus(c *gin.Context)

UpdateTaskStatus godoc @Summary Update task status @Description Update the status of a task @Tags Tasks @Accept json @Produce json @Param id path string true "Task ID" @Param status body dto.UpdateTaskStatusRequest true "New status" @Success 200 {object} dto.TaskResponse @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 tax_association body types.TaxAssociationFilter true "Tax Association Filter" @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) 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]

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) 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) 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 @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.WalletResponse @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 @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,
	stripeService *service.StripeService,
) *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) 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]

Jump to

Keyboard shortcuts

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