v1

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 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) 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) 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) 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 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, 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) 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) 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 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) CreateInvoice

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

CreateInvoice godoc @Summary Create a new invoice @Description Create a new 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" @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) 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,
	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) 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) 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) CreatePrice

func (h *PriceHandler) CreatePrice(c *gin.Context)

@Summary Create a new price @Description Create a new price with the specified configuration @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 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) 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]

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

Jump to

Keyboard shortcuts

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