package qsnap

import (
	"context"

	"github.com/tech/sendico/payments/storage/model"
	quotestorage "github.com/tech/sendico/payments/storage/quote"
	"go.mongodb.org/mongo-driver/v2/bson"
)

type fakeStore struct {
	getByRefFn func(ctx context.Context, orgRef bson.ObjectID, quoteRef string) (*model.PaymentQuoteRecord, error)
}

func (f *fakeStore) GetByRef(ctx context.Context, orgRef bson.ObjectID, quoteRef string) (*model.PaymentQuoteRecord, error) {
	if f.getByRefFn == nil {
		return nil, quotestorage.ErrQuoteNotFound
	}
	return f.getByRefFn(ctx, orgRef, quoteRef)
}
