Skip to content

Commit 7b3ffa6

Browse files
committed
[Librarian] Regenerated @ b8a450aff168b5449d658833256ca2354e3ecbbc df505752cdef00170b029d7b720bbc359933bf82
1 parent acd46a0 commit 7b3ffa6

File tree

57 files changed

+2983
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2983
-5
lines changed

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
twilio-go changelog
22
====================
3+
[2024-06-06] Version 1.21.1
4+
---------------------------
5+
**Api**
6+
- Mark MaxPrice as obsolete
7+
8+
**Lookups**
9+
- Update examples for `phone_number_quality_score`
10+
11+
**Messaging**
12+
- List tollfree verifications on parent account and all sub-accounts
13+
14+
315
[2024-05-24] Version 1.21.0
416
---------------------------
517
**Library - Chore**

rest/api/v2010/accounts_messages.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ type CreateMessageParams struct {
3434
StatusCallback *string `json:"StatusCallback,omitempty"`
3535
// The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
3636
ApplicationSid *string `json:"ApplicationSid,omitempty"`
37-
// [DEPRECATED] This parameter will no longer have any effect as of 2024-06-03.
37+
// [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
3838
MaxPrice *float32 `json:"MaxPrice,omitempty"`
3939
// Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
4040
ProvideFeedback *bool `json:"ProvideFeedback,omitempty"`
4141
// Total number of attempts made (including this request) to send the message regardless of the provider used
4242
Attempt *int `json:"Attempt,omitempty"`
43-
// The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
43+
// The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
4444
ValidityPeriod *int `json:"ValidityPeriod,omitempty"`
4545
// Reserved
4646
ForceDelivery *bool `json:"ForceDelivery,omitempty"`

rest/api/v2010/docs/AccountsMessagesApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ Name | Type | Description
3535
**To** | **string** | The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
3636
**StatusCallback** | **string** | The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
3737
**ApplicationSid** | **string** | The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
38-
**MaxPrice** | **float32** | [DEPRECATED] This parameter will no longer have any effect as of 2024-06-03.
38+
**MaxPrice** | **float32** | [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
3939
**ProvideFeedback** | **bool** | Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
4040
**Attempt** | **int** | Total number of attempts made (including this request) to send the message regardless of the provider used
41-
**ValidityPeriod** | **int** | The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
41+
**ValidityPeriod** | **int** | The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
4242
**ForceDelivery** | **bool** | Reserved
4343
**ContentRetention** | **string** |
4444
**AddressRetention** | **string** |

rest/content/v2/content.go

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"encoding/json"
1919
"fmt"
2020
"net/url"
21+
"time"
2122

2223
"github.com/twilio/twilio-go/client"
2324
)
@@ -26,6 +27,24 @@ import (
2627
type ListContentParams struct {
2728
// How many resources to return in each list page. The default is 50, and the maximum is 1000.
2829
PageSize *int `json:"PageSize,omitempty"`
30+
// Whether to sort by ascending or descending date updated
31+
SortByDate *string `json:"SortByDate,omitempty"`
32+
// Whether to sort by ascending or descending content name
33+
SortByContentName *string `json:"SortByContentName,omitempty"`
34+
// Filter by >=[date-time]
35+
DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"`
36+
// Filter by <=[date-time]
37+
DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"`
38+
// Filter by Regex Pattern in content name
39+
ContentName *string `json:"ContentName,omitempty"`
40+
// Filter by Regex Pattern in template content
41+
Content *string `json:"Content,omitempty"`
42+
// Filter by array of valid language(s)
43+
Language *[]string `json:"Language,omitempty"`
44+
// Filter by array of contentType(s)
45+
ContentType *[]string `json:"ContentType,omitempty"`
46+
// Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
47+
ChannelEligibility *[]string `json:"ChannelEligibility,omitempty"`
2948
// Max number of records to return.
3049
Limit *int `json:"limit,omitempty"`
3150
}
@@ -34,6 +53,42 @@ func (params *ListContentParams) SetPageSize(PageSize int) *ListContentParams {
3453
params.PageSize = &PageSize
3554
return params
3655
}
56+
func (params *ListContentParams) SetSortByDate(SortByDate string) *ListContentParams {
57+
params.SortByDate = &SortByDate
58+
return params
59+
}
60+
func (params *ListContentParams) SetSortByContentName(SortByContentName string) *ListContentParams {
61+
params.SortByContentName = &SortByContentName
62+
return params
63+
}
64+
func (params *ListContentParams) SetDateCreatedAfter(DateCreatedAfter time.Time) *ListContentParams {
65+
params.DateCreatedAfter = &DateCreatedAfter
66+
return params
67+
}
68+
func (params *ListContentParams) SetDateCreatedBefore(DateCreatedBefore time.Time) *ListContentParams {
69+
params.DateCreatedBefore = &DateCreatedBefore
70+
return params
71+
}
72+
func (params *ListContentParams) SetContentName(ContentName string) *ListContentParams {
73+
params.ContentName = &ContentName
74+
return params
75+
}
76+
func (params *ListContentParams) SetContent(Content string) *ListContentParams {
77+
params.Content = &Content
78+
return params
79+
}
80+
func (params *ListContentParams) SetLanguage(Language []string) *ListContentParams {
81+
params.Language = &Language
82+
return params
83+
}
84+
func (params *ListContentParams) SetContentType(ContentType []string) *ListContentParams {
85+
params.ContentType = &ContentType
86+
return params
87+
}
88+
func (params *ListContentParams) SetChannelEligibility(ChannelEligibility []string) *ListContentParams {
89+
params.ChannelEligibility = &ChannelEligibility
90+
return params
91+
}
3792
func (params *ListContentParams) SetLimit(Limit int) *ListContentParams {
3893
params.Limit = &Limit
3994
return params
@@ -49,6 +104,39 @@ func (c *ApiService) PageContent(params *ListContentParams, pageToken, pageNumbe
49104
if params != nil && params.PageSize != nil {
50105
data.Set("PageSize", fmt.Sprint(*params.PageSize))
51106
}
107+
if params != nil && params.SortByDate != nil {
108+
data.Set("SortByDate", *params.SortByDate)
109+
}
110+
if params != nil && params.SortByContentName != nil {
111+
data.Set("SortByContentName", *params.SortByContentName)
112+
}
113+
if params != nil && params.DateCreatedAfter != nil {
114+
data.Set("DateCreatedAfter", fmt.Sprint((*params.DateCreatedAfter).Format(time.RFC3339)))
115+
}
116+
if params != nil && params.DateCreatedBefore != nil {
117+
data.Set("DateCreatedBefore", fmt.Sprint((*params.DateCreatedBefore).Format(time.RFC3339)))
118+
}
119+
if params != nil && params.ContentName != nil {
120+
data.Set("ContentName", *params.ContentName)
121+
}
122+
if params != nil && params.Content != nil {
123+
data.Set("Content", *params.Content)
124+
}
125+
if params != nil && params.Language != nil {
126+
for _, item := range *params.Language {
127+
data.Add("Language", item)
128+
}
129+
}
130+
if params != nil && params.ContentType != nil {
131+
for _, item := range *params.ContentType {
132+
data.Add("ContentType", item)
133+
}
134+
}
135+
if params != nil && params.ChannelEligibility != nil {
136+
for _, item := range *params.ChannelEligibility {
137+
data.Add("ChannelEligibility", item)
138+
}
139+
}
52140

53141
if pageToken != "" {
54142
data.Set("PageToken", pageToken)

rest/content/v2/content_and_approvals.go

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"encoding/json"
1919
"fmt"
2020
"net/url"
21+
"time"
2122

2223
"github.com/twilio/twilio-go/client"
2324
)
@@ -26,6 +27,24 @@ import (
2627
type ListContentAndApprovalsParams struct {
2728
// How many resources to return in each list page. The default is 50, and the maximum is 1000.
2829
PageSize *int `json:"PageSize,omitempty"`
30+
// Whether to sort by ascending or descending date updated
31+
SortByDate *string `json:"SortByDate,omitempty"`
32+
// Whether to sort by ascending or descending content name
33+
SortByContentName *string `json:"SortByContentName,omitempty"`
34+
// Filter by >=[date-time]
35+
DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"`
36+
// Filter by <=[date-time]
37+
DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"`
38+
// Filter by Regex Pattern in content name
39+
ContentName *string `json:"ContentName,omitempty"`
40+
// Filter by Regex Pattern in template content
41+
Content *string `json:"Content,omitempty"`
42+
// Filter by array of valid language(s)
43+
Language *[]string `json:"Language,omitempty"`
44+
// Filter by array of contentType(s)
45+
ContentType *[]string `json:"ContentType,omitempty"`
46+
// Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
47+
ChannelEligibility *[]string `json:"ChannelEligibility,omitempty"`
2948
// Max number of records to return.
3049
Limit *int `json:"limit,omitempty"`
3150
}
@@ -34,6 +53,42 @@ func (params *ListContentAndApprovalsParams) SetPageSize(PageSize int) *ListCont
3453
params.PageSize = &PageSize
3554
return params
3655
}
56+
func (params *ListContentAndApprovalsParams) SetSortByDate(SortByDate string) *ListContentAndApprovalsParams {
57+
params.SortByDate = &SortByDate
58+
return params
59+
}
60+
func (params *ListContentAndApprovalsParams) SetSortByContentName(SortByContentName string) *ListContentAndApprovalsParams {
61+
params.SortByContentName = &SortByContentName
62+
return params
63+
}
64+
func (params *ListContentAndApprovalsParams) SetDateCreatedAfter(DateCreatedAfter time.Time) *ListContentAndApprovalsParams {
65+
params.DateCreatedAfter = &DateCreatedAfter
66+
return params
67+
}
68+
func (params *ListContentAndApprovalsParams) SetDateCreatedBefore(DateCreatedBefore time.Time) *ListContentAndApprovalsParams {
69+
params.DateCreatedBefore = &DateCreatedBefore
70+
return params
71+
}
72+
func (params *ListContentAndApprovalsParams) SetContentName(ContentName string) *ListContentAndApprovalsParams {
73+
params.ContentName = &ContentName
74+
return params
75+
}
76+
func (params *ListContentAndApprovalsParams) SetContent(Content string) *ListContentAndApprovalsParams {
77+
params.Content = &Content
78+
return params
79+
}
80+
func (params *ListContentAndApprovalsParams) SetLanguage(Language []string) *ListContentAndApprovalsParams {
81+
params.Language = &Language
82+
return params
83+
}
84+
func (params *ListContentAndApprovalsParams) SetContentType(ContentType []string) *ListContentAndApprovalsParams {
85+
params.ContentType = &ContentType
86+
return params
87+
}
88+
func (params *ListContentAndApprovalsParams) SetChannelEligibility(ChannelEligibility []string) *ListContentAndApprovalsParams {
89+
params.ChannelEligibility = &ChannelEligibility
90+
return params
91+
}
3792
func (params *ListContentAndApprovalsParams) SetLimit(Limit int) *ListContentAndApprovalsParams {
3893
params.Limit = &Limit
3994
return params
@@ -49,6 +104,39 @@ func (c *ApiService) PageContentAndApprovals(params *ListContentAndApprovalsPara
49104
if params != nil && params.PageSize != nil {
50105
data.Set("PageSize", fmt.Sprint(*params.PageSize))
51106
}
107+
if params != nil && params.SortByDate != nil {
108+
data.Set("SortByDate", *params.SortByDate)
109+
}
110+
if params != nil && params.SortByContentName != nil {
111+
data.Set("SortByContentName", *params.SortByContentName)
112+
}
113+
if params != nil && params.DateCreatedAfter != nil {
114+
data.Set("DateCreatedAfter", fmt.Sprint((*params.DateCreatedAfter).Format(time.RFC3339)))
115+
}
116+
if params != nil && params.DateCreatedBefore != nil {
117+
data.Set("DateCreatedBefore", fmt.Sprint((*params.DateCreatedBefore).Format(time.RFC3339)))
118+
}
119+
if params != nil && params.ContentName != nil {
120+
data.Set("ContentName", *params.ContentName)
121+
}
122+
if params != nil && params.Content != nil {
123+
data.Set("Content", *params.Content)
124+
}
125+
if params != nil && params.Language != nil {
126+
for _, item := range *params.Language {
127+
data.Add("Language", item)
128+
}
129+
}
130+
if params != nil && params.ContentType != nil {
131+
for _, item := range *params.ContentType {
132+
data.Add("ContentType", item)
133+
}
134+
}
135+
if params != nil && params.ChannelEligibility != nil {
136+
for _, item := range *params.ChannelEligibility {
137+
data.Add("ChannelEligibility", item)
138+
}
139+
}
52140

53141
if pageToken != "" {
54142
data.Set("PageToken", pageToken)

rest/content/v2/docs/ContentAndApprovalsApi.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ Other parameters are passed through a pointer to a ListContentAndApprovalsParams
2828
Name | Type | Description
2929
------------- | ------------- | -------------
3030
**PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
31+
**SortByDate** | **string** | Whether to sort by ascending or descending date updated
32+
**SortByContentName** | **string** | Whether to sort by ascending or descending content name
33+
**DateCreatedAfter** | **time.Time** | Filter by >=[date-time]
34+
**DateCreatedBefore** | **time.Time** | Filter by <=[date-time]
35+
**ContentName** | **string** | Filter by Regex Pattern in content name
36+
**Content** | **string** | Filter by Regex Pattern in template content
37+
**Language** | **[]string** | Filter by array of valid language(s)
38+
**ContentType** | **[]string** | Filter by array of contentType(s)
39+
**ChannelEligibility** | **[]string** | Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
3140
**Limit** | **int** | Max number of records to return.
3241

3342
### Return type

rest/content/v2/docs/ContentApi.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ Other parameters are passed through a pointer to a ListContentParams struct
2828
Name | Type | Description
2929
------------- | ------------- | -------------
3030
**PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
31+
**SortByDate** | **string** | Whether to sort by ascending or descending date updated
32+
**SortByContentName** | **string** | Whether to sort by ascending or descending content name
33+
**DateCreatedAfter** | **time.Time** | Filter by >=[date-time]
34+
**DateCreatedBefore** | **time.Time** | Filter by <=[date-time]
35+
**ContentName** | **string** | Filter by Regex Pattern in content name
36+
**Content** | **string** | Filter by Regex Pattern in template content
37+
**Language** | **[]string** | Filter by array of valid language(s)
38+
**ContentType** | **[]string** | Filter by array of contentType(s)
39+
**ChannelEligibility** | **[]string** | Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status>
3140
**Limit** | **int** | Max number of records to return.
3241

3342
### Return type

0 commit comments

Comments
 (0)