MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / GetUsageHistory

Method GetUsageHistory

api/pkg/services/billing_service.go:132–137  ·  view source on GitHub ↗

GetUsageHistory gets the billing usage history for a user

(ctx context.Context, userID entities.UserID, params repositories.IndexParams)

Source from the content-addressed store, hash-verified

130
131// GetUsageHistory gets the billing usage history for a user
132func (service *BillingService) GetUsageHistory(ctx context.Context, userID entities.UserID, params repositories.IndexParams) (*[]entities.BillingUsage, error) {
133 ctx, span := service.tracer.Start(ctx)
134 defer span.End()
135
136 return service.billingUsageRepository.GetHistory(ctx, userID, params)
137}
138
139// RegisterSentMessage records the billing usage for a sent message
140func (service *BillingService) RegisterSentMessage(ctx context.Context, messageID uuid.UUID, timestamp time.Time, userID entities.UserID) error {

Callers 1

UsageHistoryMethod · 0.80

Calls 2

StartMethod · 0.65
GetHistoryMethod · 0.65

Tested by

no test coverage detected