func NewPageIterator(client *Client, data url.Values, pathPart string) *PageIterator {
	return &PageIterator{
		data:        data,
		client:      client,
		count:       0,
		nextPageURI: types.NullString{},
		pathPart:    pathPart,
	}
}
NewPageIterator returns a PageIterator that can be used to iterate through
values. Call Next() to get the first page of values (and again to get
subsequent pages). If there are no more results, NoMoreResults is returned.
package twilio
import (
	"context"
	"errors"
	"net/url"
	"strings"
	"time"
	types "github.com/kevinburke/go-types"
)
type Page struct {
	FirstPageURI    string           `json:"first_page_uri"`
	Start           uint             `json:"start"`
	End             uint             `json:"end"`
	NumPages        uint             `json:"num_pages"`
	Total           uint             `json:"total"`
	NextPageURI     types.NullString `json:"next_page_uri"`
	PreviousPageURI types.NullString `json:"previous_page_uri"`
	PageSize        uint             `json:"page_size"`
}
type Meta struct {
	FirstPageURL    string           `json:"first_page_url"`
	NextPageURL     types.NullString `json:"next_page_url"`
	PreviousPageURL types.NullString `json:"previous_page_url"`
	Key             string           `json:"key"`
	Page            uint             `json:"page"`
	PageSize        uint             `json:"page_size"`
}
var NoMoreResults = errors.New("twilio: No more results")
type PageIterator struct {
	client      *Client
	nextPageURI types.NullString
	data        url.Values
	count       uint
	pathPart    string
}
func (p *PageIterator) SetNextPageURI(npuri types.NullString) {
	if npuri.Valid == false {
		p.nextPageURI = npuri
		return
	}
	npuri.String = strings.TrimPrefix(npuri.String, p.client.Base)
	p.nextPageURI = npuri
}
func (p *PageIterator) Next(ctx context.Context, v interface{}) error {
	var err error
	switch {
	case p.nextPageURI.Valid:
		err = p.client.GetNextPage(ctx, p.nextPageURI.String, v)
	case p.count == 0:
		err = p.client.ListResource(ctx, p.pathPart, p.data, v)
	default:
		return NoMoreResults
	}
	if err != nil {
		return err
	}
	p.count++
	return nil
}