func (c *ApiService) ListRateLimit(ServiceSid string, params *ListRateLimitParams) ([]VerifyV2RateLimit, error) {
	if params == nil {
		params = &ListRateLimitParams{}
	}
	params.SetPageSize(client.ReadLimits(params.PageSize, params.Limit))
	response, err := c.PageRateLimit(ServiceSid, params, "", "")
	if err != nil {
		return nil, err
	}
	curRecord := 0
	var records []VerifyV2RateLimit
	for response != nil {
		records = append(records, response.RateLimits...)
		var record interface{}
		if record, err = client.GetNext(c.baseURL, response, &curRecord, params.Limit, c.getNextListRateLimitResponse); record == nil || err != nil {
			return records, err
		}
		response = record.(*ListRateLimitResponse)
	}
	return records, err
}
Lists RateLimit records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
package openapi
import (
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"github.com/twilio/twilio-go/client"
)
type CreateRateLimitParams struct {
	Description *string `json:"Description,omitempty"`
	UniqueName *string `json:"UniqueName,omitempty"`
}
func (params *CreateRateLimitParams) SetDescription(Description string) *CreateRateLimitParams {
	params.Description = &Description
	return params
}
func (params *CreateRateLimitParams) SetUniqueName(UniqueName string) *CreateRateLimitParams {
	params.UniqueName = &UniqueName
	return params
}
func (c *ApiService) CreateRateLimit(ServiceSid string, params *CreateRateLimitParams) (*VerifyV2RateLimit, error) {
	path := "/v2/Services/{ServiceSid}/RateLimits"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Description != nil {
		data.Set("Description", *params.Description)
	}
	if params != nil && params.UniqueName != nil {
		data.Set("UniqueName", *params.UniqueName)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &VerifyV2RateLimit{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func (c *ApiService) DeleteRateLimit(ServiceSid string, Sid string) error {
	path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	return nil
}
func (c *ApiService) FetchRateLimit(ServiceSid string, Sid string) (*VerifyV2RateLimit, error) {
	path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &VerifyV2RateLimit{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
type ListRateLimitParams struct {
	PageSize *int `json:"PageSize,omitempty"`
	Limit *int `json:"limit,omitempty"`
}
func (params *ListRateLimitParams) SetPageSize(PageSize int) *ListRateLimitParams {
	params.PageSize = &PageSize
	return params
}
func (params *ListRateLimitParams) SetLimit(Limit int) *ListRateLimitParams {
	params.Limit = &Limit
	return params
}
func (c *ApiService) PageRateLimit(ServiceSid string, params *ListRateLimitParams, pageToken, pageNumber string) (*ListRateLimitResponse, error) {
	path := "/v2/Services/{ServiceSid}/RateLimits"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.PageSize != nil {
		data.Set("PageSize", fmt.Sprint(*params.PageSize))
	}
	if pageToken != "" {
		data.Set("PageToken", pageToken)
	}
	if pageNumber != "" {
		data.Set("Page", pageNumber)
	}
	resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ListRateLimitResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}