Skip to content

Commit bdbb3ec

Browse files
committed
[Librarian] Regenerated @ 84b4cd4c23a96109c715a2512bbe8238fae5c394 4f23177c4c946a9a5cdaf592718766a9b4816075
1 parent 94ad022 commit bdbb3ec

File tree

449 files changed

+3949
-1312
lines changed

Some content is hidden

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

449 files changed

+3949
-1312
lines changed

CHANGES.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
twilio-go changelog
22
====================
3+
[2024-06-18] Version 1.22.0
4+
---------------------------
5+
**Events**
6+
- Add `status` and `documentation_url` to Event Types
7+
8+
**Lookups**
9+
- Removed unused `fraud` lookups in V1 only to facilitate rest proxy migration
10+
11+
**Numbers**
12+
- Add date_created field to the Get Port In Request API
13+
- Rename the `status_last_time_updated_timestamp` field to `last_updated` in the Get Port In Phone Number API **(breaking change)**
14+
- Add Rejection reason and rejection reason code to the Get Port In Phone Number API
15+
- Remove the carrier information from the Portability API
16+
17+
**Proxy**
18+
- Change property `type` from enum to ienum
19+
20+
**Trusthub**
21+
- Add skipMessagingUseCase field in compliance_tollfree_inquiry.
22+
23+
324
[2024-06-06] Version 1.21.1
425
---------------------------
526
**Api**

rest/accounts/v1/auth_tokens_promote.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ func (c *ApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion,
2424
path := "/v1/AuthTokens/Promote"
2525

2626
data := url.Values{}
27-
headers := make(map[string]interface{})
27+
headers := map[string]interface{}{
28+
"Content-Type": "application/x-www-form-urlencoded",
29+
}
2830

2931
resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
3032
if err != nil {

rest/accounts/v1/auth_tokens_secondary.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ func (c *ApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken,
2424
path := "/v1/AuthTokens/Secondary"
2525

2626
data := url.Values{}
27-
headers := make(map[string]interface{})
27+
headers := map[string]interface{}{
28+
"Content-Type": "application/x-www-form-urlencoded",
29+
}
2830

2931
resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
3032
if err != nil {
@@ -46,7 +48,9 @@ func (c *ApiService) DeleteSecondaryAuthToken() error {
4648
path := "/v1/AuthTokens/Secondary"
4749

4850
data := url.Values{}
49-
headers := make(map[string]interface{})
51+
headers := map[string]interface{}{
52+
"Content-Type": "application/x-www-form-urlencoded",
53+
}
5054

5155
resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
5256
if err != nil {

rest/accounts/v1/credentials_aws.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ func (c *ApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*Ac
5151
path := "/v1/Credentials/AWS"
5252

5353
data := url.Values{}
54-
headers := make(map[string]interface{})
54+
headers := map[string]interface{}{
55+
"Content-Type": "application/x-www-form-urlencoded",
56+
}
5557

5658
if params != nil && params.Credentials != nil {
5759
data.Set("Credentials", *params.Credentials)
@@ -84,7 +86,9 @@ func (c *ApiService) DeleteCredentialAws(Sid string) error {
8486
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
8587

8688
data := url.Values{}
87-
headers := make(map[string]interface{})
89+
headers := map[string]interface{}{
90+
"Content-Type": "application/x-www-form-urlencoded",
91+
}
8892

8993
resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
9094
if err != nil {
@@ -102,7 +106,9 @@ func (c *ApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialAws, e
102106
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
103107

104108
data := url.Values{}
105-
headers := make(map[string]interface{})
109+
headers := map[string]interface{}{
110+
"Content-Type": "application/x-www-form-urlencoded",
111+
}
106112

107113
resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
108114
if err != nil {
@@ -141,7 +147,9 @@ func (c *ApiService) PageCredentialAws(params *ListCredentialAwsParams, pageToke
141147
path := "/v1/Credentials/AWS"
142148

143149
data := url.Values{}
144-
headers := make(map[string]interface{})
150+
headers := map[string]interface{}{
151+
"Content-Type": "application/x-www-form-urlencoded",
152+
}
145153

146154
if params != nil && params.PageSize != nil {
147155
data.Set("PageSize", fmt.Sprint(*params.PageSize))
@@ -272,7 +280,9 @@ func (c *ApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAws
272280
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
273281

274282
data := url.Values{}
275-
headers := make(map[string]interface{})
283+
headers := map[string]interface{}{
284+
"Content-Type": "application/x-www-form-urlencoded",
285+
}
276286

277287
if params != nil && params.FriendlyName != nil {
278288
data.Set("FriendlyName", *params.FriendlyName)

rest/accounts/v1/credentials_public_keys.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ func (c *ApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKey
5151
path := "/v1/Credentials/PublicKeys"
5252

5353
data := url.Values{}
54-
headers := make(map[string]interface{})
54+
headers := map[string]interface{}{
55+
"Content-Type": "application/x-www-form-urlencoded",
56+
}
5557

5658
if params != nil && params.PublicKey != nil {
5759
data.Set("PublicKey", *params.PublicKey)
@@ -84,7 +86,9 @@ func (c *ApiService) DeleteCredentialPublicKey(Sid string) error {
8486
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
8587

8688
data := url.Values{}
87-
headers := make(map[string]interface{})
89+
headers := map[string]interface{}{
90+
"Content-Type": "application/x-www-form-urlencoded",
91+
}
8892

8993
resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
9094
if err != nil {
@@ -102,7 +106,9 @@ func (c *ApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Credential
102106
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
103107

104108
data := url.Values{}
105-
headers := make(map[string]interface{})
109+
headers := map[string]interface{}{
110+
"Content-Type": "application/x-www-form-urlencoded",
111+
}
106112

107113
resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
108114
if err != nil {
@@ -141,7 +147,9 @@ func (c *ApiService) PageCredentialPublicKey(params *ListCredentialPublicKeyPara
141147
path := "/v1/Credentials/PublicKeys"
142148

143149
data := url.Values{}
144-
headers := make(map[string]interface{})
150+
headers := map[string]interface{}{
151+
"Content-Type": "application/x-www-form-urlencoded",
152+
}
145153

146154
if params != nil && params.PageSize != nil {
147155
data.Set("PageSize", fmt.Sprint(*params.PageSize))
@@ -272,7 +280,9 @@ func (c *ApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredent
272280
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
273281

274282
data := url.Values{}
275-
headers := make(map[string]interface{})
283+
headers := map[string]interface{}{
284+
"Content-Type": "application/x-www-form-urlencoded",
285+
}
276286

277287
if params != nil && params.FriendlyName != nil {
278288
data.Set("FriendlyName", *params.FriendlyName)

rest/accounts/v1/safe_list_numbers.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*AccountsV1Sa
3535
path := "/v1/SafeList/Numbers"
3636

3737
data := url.Values{}
38-
headers := make(map[string]interface{})
38+
headers := map[string]interface{}{
39+
"Content-Type": "application/x-www-form-urlencoded",
40+
}
3941

4042
if params != nil && params.PhoneNumber != nil {
4143
data.Set("PhoneNumber", *params.PhoneNumber)
@@ -72,7 +74,9 @@ func (c *ApiService) DeleteSafelist(params *DeleteSafelistParams) error {
7274
path := "/v1/SafeList/Numbers"
7375

7476
data := url.Values{}
75-
headers := make(map[string]interface{})
77+
headers := map[string]interface{}{
78+
"Content-Type": "application/x-www-form-urlencoded",
79+
}
7680

7781
if params != nil && params.PhoneNumber != nil {
7882
data.Set("PhoneNumber", *params.PhoneNumber)
@@ -104,7 +108,9 @@ func (c *ApiService) FetchSafelist(params *FetchSafelistParams) (*AccountsV1Safe
104108
path := "/v1/SafeList/Numbers"
105109

106110
data := url.Values{}
107-
headers := make(map[string]interface{})
111+
headers := map[string]interface{}{
112+
"Content-Type": "application/x-www-form-urlencoded",
113+
}
108114

109115
if params != nil && params.PhoneNumber != nil {
110116
data.Set("PhoneNumber", *params.PhoneNumber)

rest/api/v2010/accounts.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ func (c *ApiService) CreateAccount(params *CreateAccountParams) (*ApiV2010Accoun
3939
path := "/2010-04-01/Accounts.json"
4040

4141
data := url.Values{}
42-
headers := make(map[string]interface{})
42+
headers := map[string]interface{}{
43+
"Content-Type": "application/x-www-form-urlencoded",
44+
}
4345

4446
if params != nil && params.FriendlyName != nil {
4547
data.Set("FriendlyName", *params.FriendlyName)
@@ -66,7 +68,9 @@ func (c *ApiService) FetchAccount(Sid string) (*ApiV2010Account, error) {
6668
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
6769

6870
data := url.Values{}
69-
headers := make(map[string]interface{})
71+
headers := map[string]interface{}{
72+
"Content-Type": "application/x-www-form-urlencoded",
73+
}
7074

7175
resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
7276
if err != nil {
@@ -117,7 +121,9 @@ func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumbe
117121
path := "/2010-04-01/Accounts.json"
118122

119123
data := url.Values{}
120-
headers := make(map[string]interface{})
124+
headers := map[string]interface{}{
125+
"Content-Type": "application/x-www-form-urlencoded",
126+
}
121127

122128
if params != nil && params.FriendlyName != nil {
123129
data.Set("FriendlyName", *params.FriendlyName)
@@ -260,7 +266,9 @@ func (c *ApiService) UpdateAccount(Sid string, params *UpdateAccountParams) (*Ap
260266
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
261267

262268
data := url.Values{}
263-
headers := make(map[string]interface{})
269+
headers := map[string]interface{}{
270+
"Content-Type": "application/x-www-form-urlencoded",
271+
}
264272

265273
if params != nil && params.FriendlyName != nil {
266274
data.Set("FriendlyName", *params.FriendlyName)

rest/api/v2010/accounts_addresses.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ func (c *ApiService) CreateAddress(params *CreateAddressParams) (*ApiV2010Addres
104104
}
105105

106106
data := url.Values{}
107-
headers := make(map[string]interface{})
107+
headers := map[string]interface{}{
108+
"Content-Type": "application/x-www-form-urlencoded",
109+
}
108110

109111
if params != nil && params.CustomerName != nil {
110112
data.Set("CustomerName", *params.CustomerName)
@@ -174,7 +176,9 @@ func (c *ApiService) DeleteAddress(Sid string, params *DeleteAddressParams) erro
174176
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
175177

176178
data := url.Values{}
177-
headers := make(map[string]interface{})
179+
headers := map[string]interface{}{
180+
"Content-Type": "application/x-www-form-urlencoded",
181+
}
178182

179183
resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
180184
if err != nil {
@@ -208,7 +212,9 @@ func (c *ApiService) FetchAddress(Sid string, params *FetchAddressParams) (*ApiV
208212
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
209213

210214
data := url.Values{}
211-
headers := make(map[string]interface{})
215+
headers := map[string]interface{}{
216+
"Content-Type": "application/x-www-form-urlencoded",
217+
}
212218

213219
resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
214220
if err != nil {
@@ -277,7 +283,9 @@ func (c *ApiService) PageAddress(params *ListAddressParams, pageToken, pageNumbe
277283
}
278284

279285
data := url.Values{}
280-
headers := make(map[string]interface{})
286+
headers := map[string]interface{}{
287+
"Content-Type": "application/x-www-form-urlencoded",
288+
}
281289

282290
if params != nil && params.CustomerName != nil {
283291
data.Set("CustomerName", *params.CustomerName)
@@ -476,7 +484,9 @@ func (c *ApiService) UpdateAddress(Sid string, params *UpdateAddressParams) (*Ap
476484
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
477485

478486
data := url.Values{}
479-
headers := make(map[string]interface{})
487+
headers := map[string]interface{}{
488+
"Content-Type": "application/x-www-form-urlencoded",
489+
}
480490

481491
if params != nil && params.FriendlyName != nil {
482492
data.Set("FriendlyName", *params.FriendlyName)

rest/api/v2010/accounts_addresses_dependent_phone_numbers.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ func (c *ApiService) PageDependentPhoneNumber(AddressSid string, params *ListDep
5858
path = strings.Replace(path, "{"+"AddressSid"+"}", AddressSid, -1)
5959

6060
data := url.Values{}
61-
headers := make(map[string]interface{})
61+
headers := map[string]interface{}{
62+
"Content-Type": "application/x-www-form-urlencoded",
63+
}
6264

6365
if params != nil && params.PageSize != nil {
6466
data.Set("PageSize", fmt.Sprint(*params.PageSize))

rest/api/v2010/accounts_applications.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ func (c *ApiService) CreateApplication(params *CreateApplicationParams) (*ApiV20
140140
}
141141

142142
data := url.Values{}
143-
headers := make(map[string]interface{})
143+
headers := map[string]interface{}{
144+
"Content-Type": "application/x-www-form-urlencoded",
145+
}
144146

145147
if params != nil && params.ApiVersion != nil {
146148
data.Set("ApiVersion", *params.ApiVersion)
@@ -228,7 +230,9 @@ func (c *ApiService) DeleteApplication(Sid string, params *DeleteApplicationPara
228230
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
229231

230232
data := url.Values{}
231-
headers := make(map[string]interface{})
233+
headers := map[string]interface{}{
234+
"Content-Type": "application/x-www-form-urlencoded",
235+
}
232236

233237
resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
234238
if err != nil {
@@ -262,7 +266,9 @@ func (c *ApiService) FetchApplication(Sid string, params *FetchApplicationParams
262266
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
263267

264268
data := url.Values{}
265-
headers := make(map[string]interface{})
269+
headers := map[string]interface{}{
270+
"Content-Type": "application/x-www-form-urlencoded",
271+
}
266272

267273
resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
268274
if err != nil {
@@ -319,7 +325,9 @@ func (c *ApiService) PageApplication(params *ListApplicationParams, pageToken, p
319325
}
320326

321327
data := url.Values{}
322-
headers := make(map[string]interface{})
328+
headers := map[string]interface{}{
329+
"Content-Type": "application/x-www-form-urlencoded",
330+
}
323331

324332
if params != nil && params.FriendlyName != nil {
325333
data.Set("FriendlyName", *params.FriendlyName)
@@ -554,7 +562,9 @@ func (c *ApiService) UpdateApplication(Sid string, params *UpdateApplicationPara
554562
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
555563

556564
data := url.Values{}
557-
headers := make(map[string]interface{})
565+
headers := map[string]interface{}{
566+
"Content-Type": "application/x-www-form-urlencoded",
567+
}
558568

559569
if params != nil && params.FriendlyName != nil {
560570
data.Set("FriendlyName", *params.FriendlyName)

0 commit comments

Comments
 (0)