You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rebate.go
    path of file: ./repos/go-binance/v2
    
    the code of the file until where you have to start completion: package binance

import (
	"context"
	"net/http"
)

type SpotRebateHistoryService struct {
	c         *Client
	startTime *int64
	endTime   *int64
	page      *int32
}

// BeginTime set beginTime
func (s *SpotRebateHistoryService) StartTime(startTime int64) *SpotRebateHistoryService {
	s.startTime = &startTime
	return s
}

// EndTime set endTime
func (s *SpotRebateHistoryService) EndTime(endTime int64) *SpotRebateHistoryService {
	s.endTime = &endTim
    
func (s *SpotRebateHistoryService) Do(ctx context.Context, opts ...RequestOption) (*SpotRebateHistory, error) {
	r := &request{
		method:   http.MethodGet,
		endpoint: "/sapi/v1/rebate/taxQuery",
		secType:  secTypeSigned,
	}
	if s.startTime != nil {
		r.setParam("startTime", *s.startTime)
	}
	if s.endTime != nil {
		r.setParam("endTime", *s.endTime)
	}
	if s.page != nil {
		r.setParam("page", *s.page)
	}
	data, err := s.c.callAPI(ctx, r, opts...)
	if err != nil {
		return nil, err
	}
	res := SpotRebateHistory{}
	if err = json.Unmarshal(data, &res); err != nil {
		return nil, err
	}
	return &res, nil
}