func (m *MessageService) Create(ctx context.Context, data url.Values) (*Message, error) {
	msg := new(Message)
	err := m.client.CreateResource(ctx, messagesPathPart, data, msg)
	return msg, err
}
Create a message with the given url.Values. For more information on valid
values, see https://www.twilio.com/docs/api/rest/sending-messages or use the
SendMessage helper.
package twilio
import (
	"context"
	"fmt"
	"net/url"
	"time"
	types "github.com/kevinburke/go-types"
	"golang.org/x/sync/errgroup"
)
const messagesPathPart = "Messages"
type MessageService struct {
	client *Client
}
type Direction string
func (d Direction) Friendly() string {
	switch d {
	case DirectionOutboundReply:
		return "Reply"
	case DirectionOutboundCall:
		return "Outgoing (from call)"
	case DirectionOutboundAPI:
		return "Outgoing (from API)"
	case DirectionInbound:
		return "Incoming"
	case DirectionOutboundDial:
		return "Outgoing (via Dial)"
	case DirectionTrunkingTerminating:
		return "Trunking (terminating)"
	case DirectionTrunkingOriginating:
		return "Trunking (originating)"
	default:
		return string(d)
	}
}
const DirectionOutboundReply = Direction("outbound-reply")
const DirectionInbound = Direction("inbound")
const DirectionOutboundCall = Direction("outbound-call")
const DirectionOutboundAPI = Direction("outbound-api")
const DirectionOutboundDial = Direction("outbound-dial")
const DirectionTrunkingTerminating = Direction("trunking-terminating")
const DirectionTrunkingOriginating = Direction("trunking-originating")
type Message struct {
	Sid                 string            `json:"sid"`
	Body                string            `json:"body"`
	From                PhoneNumber       `json:"from"`
	To                  PhoneNumber       `json:"to"`
	Price               string            `json:"price"`
	Status              Status            `json:"status"`
	AccountSid          string            `json:"account_sid"`
	MessagingServiceSid types.NullString  `json:"messaging_service_sid"`
	DateCreated         TwilioTime        `json:"date_created"`
	DateUpdated         TwilioTime        `json:"date_updated"`
	DateSent            TwilioTime        `json:"date_sent"`
	NumSegments         Segments          `json:"num_segments"`
	NumMedia            NumMedia          `json:"num_media"`
	PriceUnit           string            `json:"price_unit"`
	Direction           Direction         `json:"direction"`
	SubresourceURIs     map[string]string `json:"subresource_uris"`
	URI                 string            `json:"uri"`
	APIVersion          string            `json:"api_version"`
	ErrorCode           Code              `json:"error_code"`
	ErrorMessage        string            `json:"error_message"`
}
func (m *Message) FriendlyPrice() string {
	return price(m.PriceUnit, m.Price)
}
type MessagePage struct {
	Page
	Messages []*Message `json:"messages"`
}