test wheels

This commit is contained in:
Aditya Siregar
2025-09-18 12:01:20 +07:00
parent f64fec1fe2
commit be92ec8b23
21 changed files with 420 additions and 85 deletions
@@ -12,6 +12,8 @@ type CustomerPointsService interface {
GetCustomerPoints(ctx context.Context, customerID string) (*models.GetCustomerPointsResponse, error)
GetCustomerTokens(ctx context.Context, customerID string) (*models.GetCustomerTokensResponse, error)
GetCustomerWallet(ctx context.Context, customerID string) (*models.GetCustomerWalletResponse, error)
GetCustomerGames(ctx context.Context) (*models.GetCustomerGamesResponse, error)
GetFerrisWheelGame(ctx context.Context) (*models.GetFerrisWheelGameResponse, error)
}
type customerPointsService struct {
@@ -62,3 +64,21 @@ func (s *customerPointsService) GetCustomerWallet(ctx context.Context, customerI
return response, nil
}
func (s *customerPointsService) GetCustomerGames(ctx context.Context) (*models.GetCustomerGamesResponse, error) {
response, err := s.customerPointsProcessor.GetCustomerGamesAPI(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get customer games: %w", err)
}
return response, nil
}
func (s *customerPointsService) GetFerrisWheelGame(ctx context.Context) (*models.GetFerrisWheelGameResponse, error) {
response, err := s.customerPointsProcessor.GetFerrisWheelGameAPI(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get Ferris Wheel game: %w", err)
}
return response, nil
}