@@ -14,7 +14,7 @@ import (
14
14
// Is only used when a binary or premium message is sent.
15
15
type TypeDetails map [string ]interface {}
16
16
17
- // Message struct represents a message at MessageBird .com
17
+ // Message struct represents a message at messagebird .com.
18
18
type Message struct {
19
19
ID string
20
20
HRef string
@@ -54,6 +54,7 @@ type Params struct {
54
54
DataCoding string
55
55
ReportURL string
56
56
ScheduledDatetime time.Time
57
+ ShortenURLs bool
57
58
}
58
59
59
60
// ListParams provides additional message list options.
@@ -79,6 +80,7 @@ type messageRequest struct {
79
80
MClass int `json:"mclass,omitempty"`
80
81
ReportURL string `json:"reportUrl,omitempty"`
81
82
ScheduledDatetime string `json:"scheduledDatetime,omitempty"`
83
+ ShortenURLs bool `json:"shortenUrls"`
82
84
}
83
85
84
86
// path represents the path to the Message resource.
@@ -94,7 +96,7 @@ func Read(c *messagebird.Client, id string) (*Message, error) {
94
96
return message , nil
95
97
}
96
98
97
- // Cancel sending Scheduled Sms
99
+ // Cancel sending Scheduled Sms.
98
100
func Delete (c * messagebird.Client , id string ) (* Message , error ) {
99
101
message := & Message {}
100
102
if err := c .Request (message , http .MethodDelete , path + "/" + id , nil ); err != nil {
@@ -172,6 +174,7 @@ func requestDataForMessage(originator string, recipients []string, body string,
172
174
request .TypeDetails = params .TypeDetails
173
175
request .DataCoding = params .DataCoding
174
176
request .ReportURL = params .ReportURL
177
+ request .ShortenURLs = params .ShortenURLs
175
178
176
179
return request , nil
177
180
}
0 commit comments