Documentation ¶
Overview ¶
Package gotwilio is a library for interacting with http://www.twilio.com/ API.
Package gotwilio is a library for interacting with http://www.twilio.com/ API.
Package gotwilio is a library for interacting with http://www.twilio.com/ API.
Package gotwilio is a library for interacting with http://www.twilio.com/ API.
Index ¶
- Constants
- func DecodeWebhook(data url.Values, out interface{}) error
- type CallbackParameters
- type Exception
- type FaxBase
- type FaxMediaResource
- type FaxResource
- type FaxResourcesList
- type Interaction
- type InteractionData
- type InteractionList
- type ListResources
- type Meta
- type Participant
- type ParticipantList
- type ParticipantRequest
- type ProxyCallbackWebhook
- type ProxyInterceptCallbackWebhook
- type ProxyMessage
- type ProxyOutOfSessionCallbackWebhook
- type ProxyService
- type ProxyServiceRequest
- type ProxySession
- func (session *ProxySession) AddParticipant(req ParticipantRequest) (response Participant, exception *Exception, err error)
- func (session *ProxySession) CreateInteraction(participantSid string, msg ProxyMessage) (response Interaction, exception *Exception, err error)
- func (session *ProxySession) DeleteParticipant(participantID string) (exception *Exception, err error)
- func (session *ProxySession) GetInteractions() (response InteractionList, exception *Exception, err error)
- func (session *ProxySession) GetParticipant(participantID string) (response Participant, exception *Exception, err error)
- func (session *ProxySession) ListParticipants() (response []Participant, exception *Exception, err error)
- type ProxySessionRequest
- type SmsResponse
- type Twilio
- func (twilio *Twilio) CallWithApplicationCallbacks(from, to, applicationSid string) (*VoiceResponse, *Exception, error)
- func (twilio *Twilio) CallWithUrlCallbacks(from, to string, callbackParameters *CallbackParameters) (*VoiceResponse, *Exception, error)
- func (t *Twilio) CancelFax(faxSid string) (*Exception, error)
- func (twilio *Twilio) CheckRequestSignature(r *http.Request, baseURL string) (bool, error)
- func (t *Twilio) DeleteFax(faxSid string) (*Exception, error)
- func (twilio *Twilio) DeleteProxyService(sid string) (exception *Exception, err error)
- func (twilio *Twilio) DeleteProxySession(serviceID, sessionID string) (exception *Exception, err error)
- func (twilio *Twilio) GenerateSignature(url string, form url.Values) ([]byte, error)
- func (t *Twilio) GetFax(faxSid string) (*FaxResource, *Exception, error)
- func (t *Twilio) GetFaxes(to, from, createdOnOrBefore, createdAfter string) ([]*FaxResource, *Exception, error)
- func (twilio *Twilio) GetProxyService(sid string) (response *ProxyService, exception *Exception, err error)
- func (twilio *Twilio) GetProxySession(serviceID, sessionID string) (response *ProxySession, exception *Exception, err error)
- func (twilio *Twilio) GetSMS(sid string) (smsResponse *SmsResponse, exception *Exception, err error)
- func (twilio *Twilio) NewProxyService(service ProxyServiceRequest) (response *ProxyService, exception *Exception, err error)
- func (twilio *Twilio) NewProxySession(serviceID string, req ProxySessionRequest) (response *ProxySession, exception *Exception, err error)
- func (t *Twilio) SendFax(to, from, mediaUrl, quality, statusCallback string, storeMedia bool) (*FaxResource, *Exception, error)
- func (twilio *Twilio) SendMMS(from, to, body, mediaUrl, statusCallback, applicationSid string) (smsResponse *SmsResponse, exception *Exception, err error)
- func (twilio *Twilio) SendSMS(from, to, body, statusCallback, applicationSid string) (smsResponse *SmsResponse, exception *Exception, err error)
- func (twilio *Twilio) SendSMSWithCopilot(messagingServiceSid, to, body, statusCallback, applicationSid string) (smsResponse *SmsResponse, exception *Exception, err error)
- func (twilio *Twilio) UpdateProxyService(sid string, service ProxyServiceRequest) (response *ProxyService, exception *Exception, err error)
- func (twilio *Twilio) UpdateProxySession(serviceID, sessionID string, req ProxySessionRequest) (response *ProxySession, exception *Exception, err error)
- type VoiceResponse
Constants ¶
const ProxyBaseUrl = "https://proxy.twilio.com/v1"
Variables ¶
This section is empty.
Functions ¶
func DecodeWebhook ¶
Types ¶
type CallbackParameters ¶
type CallbackParameters struct { Url string // Required Method string // Optional FallbackUrl string // Optional FallbackMethod string // Optional StatusCallback string // Optional StatusCallbackMethod string // Optional StatusCallbackEvent []string // Optional SendDigits string // Optional IfMachine string // False, Continue or Hangup; http://www.twilio.com/docs/errors/21207 Timeout int // Optional Record bool // Optional RecordingChannels string // Optional RecordingStatusCallback string // Optional RecordingStatusCallbackMethod string // Optional MachineDetection string // Optional MachineDetectionTimeout int // Optional }
These are the paramters to use when you want Twilio to use callback urls. See http://www.twilio.com/docs/api/rest/making-calls for more info.
func NewCallbackParameters ¶
func NewCallbackParameters(url string) *CallbackParameters
Returns a CallbackParameters type with the specified url and CallbackParameters.Timeout set to 60.
type Exception ¶
type Exception struct { Status int `json:"status"` // HTTP specific error code Message string `json:"message"` // HTTP error message Code int `json:"code"` // Twilio specific error code MoreInfo string `json:"more_info"` // Additional info from Twilio }
Exception is a representation of a twilio exception.
type FaxBase ¶
type FaxBase struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` }
func (*FaxBase) DateCreatedAsTime ¶
Returns FaxBase.DateCreated as a time.Time object instead of a string.
type FaxMediaResource ¶
type FaxResource ¶
type FaxResource struct { FaxBase From string `json:"from"` To string `json:"to"` Direction string `json:"direction"` NumPages uint `json:"num_pages,string"` Duration uint `json:"duration,string"` MediaSid string `json:"media_sid"` MediaUrl string `json:"media_url"` Status string `json:"status"` Quality string `json:"quality"` ApiVersion string `json:"api_version"` Price *string `json:"price,omitempty"` PriceUnit *string `json:"price_unit,omitempty"` }
type FaxResourcesList ¶
type FaxResourcesList struct { ListResources Faxes []*FaxResource `json:"faxes"` }
type Interaction ¶
type Interaction struct { InboundResourceStatus string `json:"inbound_resource_status"` InboundResourceSid string `json:"inbound_resource_sid"` OutboundResourceStatus string `json:"outbound_resource_status"` OutboundResourceSid string `json:"outbound_resource_sid"` InboundResourceURL string `json:"inbound_resource_url"` Type string `json:"type"` AccountSid string `json:"account_sid"` OutboundResourceType string `json:"outbound_resource_type"` DateCreated time.Time `json:"date_created"` InboundResourceType string `json:"inbound_resource_type"` URL string `json:"url"` DateUpdated time.Time `json:"date_updated"` Sid string `json:"sid"` OutboundParticipantSid string `json:"outbound_participant_sid"` OutboundResourceURL string `json:"outbound_resource_url"` SessionSid string `json:"session_sid"` ServiceSid string `json:"service_sid"` Data string `json:"data"` InboundParticipantSid string `json:"inbound_participant_sid"` }
type InteractionData ¶
type InteractionData struct {
Body string `json:"body"`
}
type InteractionList ¶
type InteractionList struct { Meta Meta `json:"meta"` Interactions []Interaction `json:"interactions"` }
type ListResources ¶
type ListResources struct { Uri string `json:"uri"` FirstPageUri string `json:"first_page_uri"` NextPageUri string `json:"next_page_uri"` PreviousPageUri string `json:"previous_page_uri"` Page uint `json:"page"` PageSize uint `json:"page_size"` Faxes []*FaxResource `json:"faxes"` Messages []*SmsResponse `json:"messages"` // contains filtered or unexported fields }
ListResources contains Twilio paging information. See https://www.twilio.com/docs/usage/twilios-response#response-formats-list-paging-information
type Participant ¶
type Participant struct { Sid string `json:"sid"` Identifier string `json:"identifier"` DateUpdated time.Time `json:"date_updated"` FriendlyName interface{} `json:"friendly_name"` DateDeleted interface{} `json:"date_deleted"` AccountSid string `json:"account_sid"` URL string `json:"url"` ProxyIdentifier string `json:"proxy_identifier"` ProxyIdentifierSid string `json:"proxy_identifier_sid"` DateCreated time.Time `json:"date_created"` ParticipantSid string `json:"Participant_sid"` ServiceSid string `json:"service_sid"` Links struct { MessageInteractions string `json:"message_interactions"` } `json:"links"` }
type ParticipantList ¶
type ParticipantList struct { Participants []Participant `json:"participants"` Meta Meta `json:"meta"` }
type ParticipantRequest ¶
type ProxyCallbackWebhook ¶
type ProxyCallbackWebhook struct { OutboundResourceStatus string `form:"outboundResourceStatus"` OutboundResourceType string `form:"outboundResourceType"` InteractionDateUpdated time.Time `form:"interactionDateUpdated"` InteractionData string `form:"interactionData"` InteractionDateCreated time.Time `form:"interactionDateCreated"` InboundResourceURL string `form:"inboundResourceUrl"` InteractionServiceSid string `form:"interactionServiceSid"` OutboundParticipantSid string `form:"outboundParticipantSid"` InteractionType string `form:"interactionType"` InteractionAccountSid string `form:"interactionAccountSid"` InboundParticipantSid string `form:"inboundParticipantSid"` InboundResourceStatus string `form:"inboundResourceStatus"` OutboundResourceSid string `form:"outboundResourceSid"` OutboundResourceURL string `form:"outboundResourceUrl"` InboundResourceType string `form:"inboundResourceType"` InboundResourceSid string `form:"inboundResourceSid"` InteractionSessionSid string `form:"interactionSessionSid"` InteractionSid string `form:"interactionSid"` }
https://www.twilio.com/docs/proxy/api/proxy-webhooks#callbackurl These webhooks are fired for each new interaction and are informational only.
func (ProxyCallbackWebhook) GetInteractionData ¶
func (p ProxyCallbackWebhook) GetInteractionData() (InteractionData, error)
type ProxyInterceptCallbackWebhook ¶
type ProxyInterceptCallbackWebhook struct { InteractionDateUpdated time.Time `form:"interactionDateUpdated"` InteractionData string `form:"interactionData"` InteractionDateCreated time.Time `form:"interactionDateCreated"` InboundResourceURL string `form:"inboundResourceUrl"` InteractionServiceSid string `form:"interactionServiceSid"` InteractionType string `form:"interactionType"` InteractionAccountSid string `form:"interactionAccountSid"` InboundParticipantSid string `form:"inboundParticipantSid"` InboundResourceStatus string `form:"inboundResourceStatus"` InboundResourceType string `form:"inboundResourceType"` InboundResourceSid string `form:"inboundResourceSid"` InteractionSessionSid string `form:"interactionSessionSid"` InteractionSid string `form:"interactionSid"` }
https://www.twilio.com/docs/proxy/api/proxy-webhooks#interceptcallbackurl Fires on each interaction. If responded to with a 403 to this webhook we will abort/block the interaction. Any other status or timeout the interaction continues
func (ProxyInterceptCallbackWebhook) GetInteractionData ¶
func (p ProxyInterceptCallbackWebhook) GetInteractionData() (InteractionData, error)
type ProxyMessage ¶
type ProxyOutOfSessionCallbackWebhook ¶
type ProxyOutOfSessionCallbackWebhook struct { AccountSid string `form:"AccountSid"` SessionUniqueName string `form:"sessionUniqueName"` SessionAccountSid string `form:"sessionAccountSid"` SessionServiceSid string `form:"sessionServiceSid"` SessionSid string `form:"sessionSid"` SessionStatus string `form:"sessionStatus"` SessionMode string `form:"sessionMode"` SessionDateCreated time.Time `form:"sessionDateCreated"` SessionDateStarted time.Time `form:"sessionDateStarted"` SessionDateUpdated time.Time `form:"sessionDateUpdated"` SessionDateEnded time.Time `form:"sessionDateEnded"` SessionDateLastInteraction time.Time `form:"sessionDateLastInteraction"` SessionClosedReason string `form:"sessionClosedReason"` // SMS Specific Body string `form:"Body"` SmsSid string `form:"SmsSid"` MessageSid string `form:"MessageSid"` NumMedia string `form:"NumMedia"` NumSegments string `form:"NumSegments"` SmsStatus string `form:"SmsStatus"` SmsMessageSid string `form:"SmsMessageSid"` To string `form:"To"` ToCity string `form:"ToCity"` ToState string `form:"ToState"` ToZip string `form:"ToZip"` ToCountry string `form:"ToCountry"` From string `form:"From"` FromCity string `form:"FromCity"` FromState string `form:"FromState"` FromZip string `form:"FromZip"` FromCountry string `form:"FromCountry"` InboundParticipantSid string `form:"inboundParticipantSid"` InboundParticipantIdentifier string `form:"inboundParticipantIdentifier"` InboundParticipantFriendlyName string `form:"inboundParticipantFriendlyName"` InboundParticipantProxyIdentifier string `form:"inboundParticipantProxyIdentifier"` InboundParticipantProxyIdentifierSid string `form:"inboundParticipantProxyIdentifierSid"` InboundParticipantAccountSid string `form:"inboundParticipantAccountSid"` InboundParticipantServiceSid string `form:"inboundParticipantServiceSid"` InboundParticipantSessionSid string `form:"inboundParticipantSessionSid"` InboundParticipantDateCreated time.Time `form:"inboundParticipantDateCreated"` InboundParticipantDateUpdated time.Time `form:"inboundParticipantDateUpdated"` OutboundParticipantSid string `form:"outboundParticipantSid"` OutboundParticipantIdentifier string `form:"outboundParticipantIdentifier"` OutboundParticipantFriendlyName string `form:"outboundParticipantFriendlyName"` OutboundParticipantProxyIdentifier string `form:"outboundParticipantProxyIdentifier"` OutboundParticipantProxyIdentifierSid string `form:"outboundParticipantProxyIdentifierSid"` OutboundParticipantAccountSid string `form:"outboundParticipantAccountSid"` OutboundParticipantServiceSid string `form:"outboundParticipantServiceSid"` OutboundParticipantSessionSid string `form:"outboundParticipantSessionSid"` OutboundParticipantDateCreated time.Time `form:"outboundParticipantDateCreated"` OutboundParticipantDateUpdated time.Time `form:"outboundParticipantDateUpdated"` CallSid string `form:"CallSid"` CallStatus string `form:"CallStatus"` Caller string `form:"Caller"` CallerCity string `form:"CallerCity"` CallerState string `form:"CallerState"` CallerZip string `form:"CallerZip"` CallerCountry string `form:"CallerCountry"` Called string `form:"Called"` CalledCity string `form:"CalledCity"` CalledState string `form:"CalledState"` CalledZip string `form:"CalledZip"` CalledCountry string `form:"CalledCountry"` Direction string `form:"Direction"` AddOns string `form:"AddOns"` APIVersion string `form:"ApiVersion"` }
https://www.twilio.com/docs/proxy/api/proxy-webhooks#outofsessioncallbackurl A URL to send webhooks to when an action (inbound call or SMS) occurs where there is no session or a closed session. If your server (or a Twilio function) responds with valid TwiML, this will be processed. This means it is possible to e.g. play a message for a call, send an automated text message response, or redirect a call to another number.
type ProxyService ¶
type ProxyService struct { Sid string `json:"sid"` UniqueName string `json:"unique_name"` AccountSid string `json:"account_sid"` CallbackURL string `json:"callback_url"` DefaultTTL int `json:"default_ttl"` NumberSelectionBehavior string `json:"number_selection_behavior"` GeoMatchLevel string `json:"geo_match_level"` InterceptCallbackURL interface{} `json:"intercept_callback_url"` OutOfSessionCallbackURL interface{} `json:"out_of_session_callback_url"` DateCreated time.Time `json:"date_created"` DateUpdated time.Time `json:"date_updated"` URL string `json:"url"` Links struct { PhoneNumbers string `json:"phone_numbers"` ShortCodes string `json:"short_codes"` Sessions string `json:"sessions"` } `json:"links"` }
type ProxyServiceRequest ¶
type ProxyServiceRequest struct { UniqueName string // optional CallbackURL string // optional OutOfSessionCallbackURL string // optional InterceptCallbackURL string // optional GeoMatchLevel string // Default: country Options: country, area-code, extended-area-code optional NumberSelectionBehavior string // Default: prefer-sticky Options: prefer-sticky, avoid-sticky optional DefaultTtl int // (seconds) Default: 0 optional }
type ProxySession ¶
type ProxySession struct { Sid string `json:"sid"` Status string `json:"status"` UniqueName string `json:"unique_name"` ClosedReason interface{} `json:"closed_reason"` DateEnded interface{} `json:"date_ended"` TTL int `json:"ttl"` DateExpiry interface{} `json:"date_expiry"` AccountSid string `json:"account_sid"` DateUpdated time.Time `json:"date_updated"` Mode string `json:"mode"` DateLastInteraction interface{} `json:"date_last_interaction"` URL string `json:"url"` DateCreated time.Time `json:"date_created"` DateStarted time.Time `json:"date_started"` ServiceSid string `json:"service_sid"` Links struct { Participants string `json:"participants"` Interactions string `json:"interactions"` } `json:"links"` // contains filtered or unexported fields }
func (*ProxySession) AddParticipant ¶
func (session *ProxySession) AddParticipant(req ParticipantRequest) (response Participant, exception *Exception, err error)
Add Participant to Session
func (*ProxySession) CreateInteraction ¶
func (session *ProxySession) CreateInteraction(participantSid string, msg ProxyMessage) (response Interaction, exception *Exception, err error)
func (*ProxySession) DeleteParticipant ¶
func (session *ProxySession) DeleteParticipant(participantID string) (exception *Exception, err error)
func (*ProxySession) GetInteractions ¶
func (session *ProxySession) GetInteractions() (response InteractionList, exception *Exception, err error)
func (*ProxySession) GetParticipant ¶
func (session *ProxySession) GetParticipant(participantID string) (response Participant, exception *Exception, err error)
func (*ProxySession) ListParticipants ¶
func (session *ProxySession) ListParticipants() (response []Participant, exception *Exception, err error)
type ProxySessionRequest ¶
type SmsResponse ¶
type SmsResponse struct { Sid string `json:"sid"` DateCreated string `json:"date_created"` DateUpdate string `json:"date_updated"` DateSent string `json:"date_sent"` AccountSid string `json:"account_sid"` To string `json:"to"` From string `json:"from"` MediaUrl string `json:"media_url"` Body string `json:"body"` Status string `json:"status"` Direction string `json:"direction"` ApiVersion string `json:"api_version"` Price *string `json:"price,omitempty"` Url string `json:"uri"` }
SmsResponse is returned after a text/sms message is posted to Twilio
func (*SmsResponse) DateCreatedAsTime ¶
func (sms *SmsResponse) DateCreatedAsTime() (time.Time, error)
Returns SmsResponse.DateCreated as a time.Time object instead of a string.
func (*SmsResponse) DateSentAsTime ¶
func (sms *SmsResponse) DateSentAsTime() (time.Time, error)
Returns SmsResponse.DateSent as a time.Time object instead of a string.
func (*SmsResponse) DateUpdateAsTime ¶
func (sms *SmsResponse) DateUpdateAsTime() (time.Time, error)
Returns SmsResponse.DateUpdate as a time.Time object instead of a string.
type Twilio ¶
Twilio stores basic information important for connecting to the twilio.com REST api such as AccountSid and AuthToken.
func NewTwilioClient ¶
Create a new Twilio struct.
func NewTwilioClientCustomHTTP ¶
Create a new Twilio client, optionally using a custom http.Client
func (*Twilio) CallWithApplicationCallbacks ¶
func (twilio *Twilio) CallWithApplicationCallbacks(from, to, applicationSid string) (*VoiceResponse, *Exception, error)
Place a voice call with an ApplicationSid specified.
func (*Twilio) CallWithUrlCallbacks ¶
func (twilio *Twilio) CallWithUrlCallbacks(from, to string, callbackParameters *CallbackParameters) (*VoiceResponse, *Exception, error)
Place a voice call with a list of callbacks specified.
func (*Twilio) CheckRequestSignature ¶
CheckRequestSignature checks that the X-Twilio-Signature header on a request matches the expected signature defined by the GenerateSignature function.
The baseUrl parameter will be prepended to the request URL. It is useful for specifying the protocol and host parts of the server URL hosting your endpoint.
Passing a non-POST request or a request without the X-Twilio-Signature header is an error.
func (*Twilio) DeleteProxyService ¶
func (*Twilio) DeleteProxySession ¶
func (*Twilio) GenerateSignature ¶
GenerateSignature computes the Twilio signature for verifying the authenticity of a request. It is based on the specification at: https://www.twilio.com/docs/security#validating-requests
func (*Twilio) GetFaxes ¶
func (t *Twilio) GetFaxes(to, from, createdOnOrBefore, createdAfter string) ([]*FaxResource, *Exception, error)
GetFaxes gets faxes for a Twilio account. See https://www.twilio.com/docs/fax/api/faxes#fax-list-resource
func (*Twilio) GetProxyService ¶
func (twilio *Twilio) GetProxyService(sid string) (response *ProxyService, exception *Exception, err error)
func (*Twilio) GetProxySession ¶
func (twilio *Twilio) GetProxySession(serviceID, sessionID string) (response *ProxySession, exception *Exception, err error)
func (*Twilio) GetSMS ¶
func (twilio *Twilio) GetSMS(sid string) (smsResponse *SmsResponse, exception *Exception, err error)
GetSMS uses Twilio to get information about a text message. See https://www.twilio.com/docs/api/rest/sms for more information.
func (*Twilio) NewProxyService ¶
func (twilio *Twilio) NewProxyService(service ProxyServiceRequest) (response *ProxyService, exception *Exception, err error)
Create a new Twilio Service
func (*Twilio) NewProxySession ¶
func (twilio *Twilio) NewProxySession(serviceID string, req ProxySessionRequest) (response *ProxySession, exception *Exception, err error)
Create a new Twilio Service
func (*Twilio) SendFax ¶
func (t *Twilio) SendFax(to, from, mediaUrl, quality, statusCallback string, storeMedia bool) (*FaxResource, *Exception, error)
SendFax uses Twilio to send a fax. See https://www.twilio.com/docs/fax/api/faxes#list-post for more information.
func (*Twilio) SendMMS ¶
func (twilio *Twilio) SendMMS(from, to, body, mediaUrl, statusCallback, applicationSid string) (smsResponse *SmsResponse, exception *Exception, err error)
SendMultimediaMessage uses Twilio to send a multimedia message.
func (*Twilio) SendSMS ¶
func (twilio *Twilio) SendSMS(from, to, body, statusCallback, applicationSid string) (smsResponse *SmsResponse, exception *Exception, err error)
SendTextMessage uses Twilio to send a text message. See http://www.twilio.com/docs/api/rest/sending-sms for more information.
func (*Twilio) SendSMSWithCopilot ¶
func (twilio *Twilio) SendSMSWithCopilot(messagingServiceSid, to, body, statusCallback, applicationSid string) (smsResponse *SmsResponse, exception *Exception, err error)
SendSMSWithCopilot uses Twilio Copilot to send a text message. See https://www.twilio.com/docs/api/rest/sending-messages-copilot
func (*Twilio) UpdateProxyService ¶
func (twilio *Twilio) UpdateProxyService(sid string, service ProxyServiceRequest) (response *ProxyService, exception *Exception, err error)
func (*Twilio) UpdateProxySession ¶
func (twilio *Twilio) UpdateProxySession(serviceID, sessionID string, req ProxySessionRequest) (response *ProxySession, exception *Exception, err error)
type VoiceResponse ¶
type VoiceResponse struct { Sid string `json:"sid"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` ParentCallSid string `json:"parent_call_sid"` AccountSid string `json:"account_sid"` To string `json:"to"` ToFormatted string `json:"to_formatted"` From string `json:"from"` FromFormatted string `json:"from_formatted"` PhoneNumberSid string `json:"phone_number_sid"` Status string `json:"status"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Duration int `json:"duration"` Price *float32 `json:"price,omitempty"` Direction string `json:"direction"` AnsweredBy string `json:"answered_by"` ApiVersion string `json:"api_version"` Annotation string `json:"annotation"` ForwardedFrom string `json:"forwarded_from"` GroupSid string `json:"group_sid"` CallerName string `json:"caller_name"` Uri string `json:"uri"` }
VoiceResponse contains the details about successful voice calls.
func (*VoiceResponse) DateCreatedAsTime ¶
func (vr *VoiceResponse) DateCreatedAsTime() (time.Time, error)
Returns VoiceResponse.DateCreated as a time.Time object instead of a string.
func (*VoiceResponse) DateUpdatedAsTime ¶
func (vr *VoiceResponse) DateUpdatedAsTime() (time.Time, error)
Returns VoiceResponse.DateUpdated as a time.Time object instead of a string.
func (*VoiceResponse) EndTimeAsTime ¶
func (vr *VoiceResponse) EndTimeAsTime() (time.Time, error)
Returns VoiceResponse.EndTime as a time.Time object instead of a string.
func (*VoiceResponse) StartTimeAsTime ¶
func (vr *VoiceResponse) StartTimeAsTime() (time.Time, error)
Returns VoiceResponse.StartTime as a time.Time object instead of a string.