Skip to content

Commit 10abdbc

Browse files
feat!: modified twilio.go
1 parent ed17b11 commit 10abdbc

File tree

3 files changed

+97
-94
lines changed

3 files changed

+97
-94
lines changed

twilio.go

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import (
4141
NotifyV1 "github.com/twilio/twilio-go/rest/notify/v1"
4242
NumbersV1 "github.com/twilio/twilio-go/rest/numbers/v1"
4343
NumbersV2 "github.com/twilio/twilio-go/rest/numbers/v2"
44+
PreviewMessagingV1 "github.com/twilio/twilio-go/rest/preview_messaging/v1"
4445
PricingV1 "github.com/twilio/twilio-go/rest/pricing/v1"
4546
PricingV2 "github.com/twilio/twilio-go/rest/pricing/v2"
4647
ProxyV1 "github.com/twilio/twilio-go/rest/proxy/v1"
@@ -62,47 +63,48 @@ import (
6263
// RestClient provides access to Twilio services.
6364
type RestClient struct {
6465
*client.RequestHandler
65-
AccountsV1 *AccountsV1.ApiService
66-
Api *Api.ApiService
67-
BulkexportsV1 *BulkexportsV1.ApiService
68-
ChatV1 *ChatV1.ApiService
69-
ChatV2 *ChatV2.ApiService
70-
ChatV3 *ChatV3.ApiService
71-
ContentV1 *ContentV1.ApiService
72-
ConversationsV1 *ConversationsV1.ApiService
73-
EventsV1 *EventsV1.ApiService
74-
FlexV1 *FlexV1.ApiService
75-
FlexV2 *FlexV2.ApiService
76-
FrontlineV1 *FrontlineV1.ApiService
77-
InsightsV1 *InsightsV1.ApiService
78-
IntelligenceV2 *IntelligenceV2.ApiService
79-
IpMessagingV1 *IpMessagingV1.ApiService
80-
IpMessagingV2 *IpMessagingV2.ApiService
81-
LookupsV1 *LookupsV1.ApiService
82-
LookupsV2 *LookupsV2.ApiService
83-
MediaV1 *MediaV1.ApiService
84-
MessagingV1 *MessagingV1.ApiService
85-
MicrovisorV1 *MicrovisorV1.ApiService
86-
MonitorV1 *MonitorV1.ApiService
87-
NotifyV1 *NotifyV1.ApiService
88-
NumbersV1 *NumbersV1.ApiService
89-
NumbersV2 *NumbersV2.ApiService
90-
PricingV1 *PricingV1.ApiService
91-
PricingV2 *PricingV2.ApiService
92-
ProxyV1 *ProxyV1.ApiService
93-
RoutesV2 *RoutesV2.ApiService
94-
ServerlessV1 *ServerlessV1.ApiService
95-
StudioV1 *StudioV1.ApiService
96-
StudioV2 *StudioV2.ApiService
97-
SupersimV1 *SupersimV1.ApiService
98-
SyncV1 *SyncV1.ApiService
99-
TaskrouterV1 *TaskrouterV1.ApiService
100-
TrunkingV1 *TrunkingV1.ApiService
101-
TrusthubV1 *TrusthubV1.ApiService
102-
VerifyV2 *VerifyV2.ApiService
103-
VideoV1 *VideoV1.ApiService
104-
VoiceV1 *VoiceV1.ApiService
105-
WirelessV1 *WirelessV1.ApiService
66+
AccountsV1 *AccountsV1.ApiService
67+
Api *Api.ApiService
68+
BulkexportsV1 *BulkexportsV1.ApiService
69+
ChatV1 *ChatV1.ApiService
70+
ChatV2 *ChatV2.ApiService
71+
ChatV3 *ChatV3.ApiService
72+
ContentV1 *ContentV1.ApiService
73+
ConversationsV1 *ConversationsV1.ApiService
74+
EventsV1 *EventsV1.ApiService
75+
FlexV1 *FlexV1.ApiService
76+
FlexV2 *FlexV2.ApiService
77+
FrontlineV1 *FrontlineV1.ApiService
78+
InsightsV1 *InsightsV1.ApiService
79+
IntelligenceV2 *IntelligenceV2.ApiService
80+
IpMessagingV1 *IpMessagingV1.ApiService
81+
IpMessagingV2 *IpMessagingV2.ApiService
82+
LookupsV1 *LookupsV1.ApiService
83+
LookupsV2 *LookupsV2.ApiService
84+
MediaV1 *MediaV1.ApiService
85+
PreviewMessagingV1 *PreviewMessagingV1.ApiService
86+
MessagingV1 *MessagingV1.ApiService
87+
MicrovisorV1 *MicrovisorV1.ApiService
88+
MonitorV1 *MonitorV1.ApiService
89+
NotifyV1 *NotifyV1.ApiService
90+
NumbersV1 *NumbersV1.ApiService
91+
NumbersV2 *NumbersV2.ApiService
92+
PricingV1 *PricingV1.ApiService
93+
PricingV2 *PricingV2.ApiService
94+
ProxyV1 *ProxyV1.ApiService
95+
RoutesV2 *RoutesV2.ApiService
96+
ServerlessV1 *ServerlessV1.ApiService
97+
StudioV1 *StudioV1.ApiService
98+
StudioV2 *StudioV2.ApiService
99+
SupersimV1 *SupersimV1.ApiService
100+
SyncV1 *SyncV1.ApiService
101+
TaskrouterV1 *TaskrouterV1.ApiService
102+
TrunkingV1 *TrunkingV1.ApiService
103+
TrusthubV1 *TrusthubV1.ApiService
104+
VerifyV2 *VerifyV2.ApiService
105+
VideoV1 *VideoV1.ApiService
106+
VoiceV1 *VoiceV1.ApiService
107+
WirelessV1 *WirelessV1.ApiService
106108
}
107109

108110
// Meta holds relevant pagination resources.
@@ -174,6 +176,7 @@ func NewRestClientWithParams(params ClientParams) *RestClient {
174176
c.LookupsV1 = LookupsV1.NewApiService(c.RequestHandler)
175177
c.LookupsV2 = LookupsV2.NewApiService(c.RequestHandler)
176178
c.MediaV1 = MediaV1.NewApiService(c.RequestHandler)
179+
c.PreviewMessagingV1 = PreviewMessagingV1.NewApiService(c.RequestHandler)
177180
c.MessagingV1 = MessagingV1.NewApiService(c.RequestHandler)
178181
c.MicrovisorV1 = MicrovisorV1.NewApiService(c.RequestHandler)
179182
c.MonitorV1 = MonitorV1.NewApiService(c.RequestHandler)

twiml/messaging_response.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Messages(verbs []Element) (string, error) {
1313
return ToXML(doc)
1414
}
1515

16-
//MessagingRedirect <Redirect> TwiML Verb
16+
// MessagingRedirect <Redirect> TwiML Verb
1717
type MessagingRedirect struct {
1818
// url: Redirect URL
1919
// method: Redirect URL method
@@ -43,12 +43,12 @@ func (m MessagingRedirect) GetInnerElements() []Element {
4343
return m.InnerElements
4444
}
4545

46-
//MessagingMessage <Message> TwiML Verb
46+
// MessagingMessage <Message> TwiML Verb
4747
type MessagingMessage struct {
4848
// body: Message Body
4949
// to: Phone Number to send Message to
5050
// from: Phone Number to send Message from
51-
// action: Action URL
51+
// action: A URL specifying where Twilio should send status callbacks for the created outbound message.
5252
// method: Action URL Method
5353
// status_callback: Status callback URL. Deprecated in favor of action.
5454
// OptionalAttributes: additional attributes
@@ -85,7 +85,7 @@ func (m MessagingMessage) GetInnerElements() []Element {
8585
return m.InnerElements
8686
}
8787

88-
//MessagingMedia <Media> TwiML Noun
88+
// MessagingMedia <Media> TwiML Noun
8989
type MessagingMedia struct {
9090
// url: Media URL
9191
// OptionalAttributes: additional attributes
@@ -110,7 +110,7 @@ func (m MessagingMedia) GetInnerElements() []Element {
110110
return m.InnerElements
111111
}
112112

113-
//MessagingBody <Body> TwiML Noun
113+
// MessagingBody <Body> TwiML Noun
114114
type MessagingBody struct {
115115
// message: Message Body
116116
// OptionalAttributes: additional attributes

0 commit comments

Comments
 (0)