Skip to content

Commit a6217ed

Browse files
all: run go fmt on existing code
1 parent ca30225 commit a6217ed

File tree

1,548 files changed

+4984
-1566
lines changed

Some content is hidden

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

1,548 files changed

+4984
-1566
lines changed

rest/accounts/v1/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Class | Method | HTTP request | Description
4646
*CredentialsPublicKeysApi* | [**FetchCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#fetchcredentialpublickey) | **Get** /v1/Credentials/PublicKeys/{Sid} | Fetch the public key specified by the provided Credential Sid
4747
*CredentialsPublicKeysApi* | [**ListCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#listcredentialpublickey) | **Get** /v1/Credentials/PublicKeys | Retrieves a collection of Public Key Credentials belonging to the account used to make the request
4848
*CredentialsPublicKeysApi* | [**UpdateCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#updatecredentialpublickey) | **Post** /v1/Credentials/PublicKeys/{Sid} | Modify the properties of a given Account
49-
*SafeListNumbersApi* | [**CreateSafelist**](docs/SafeListNumbersApi.md#createsafelist) | **Post** /v1/SafeList/Numbers | Add a new phone number to SafeList.
50-
*SafeListNumbersApi* | [**DeleteSafelist**](docs/SafeListNumbersApi.md#deletesafelist) | **Delete** /v1/SafeList/Numbers | Remove a phone number from SafeList.
51-
*SafeListNumbersApi* | [**FetchSafelist**](docs/SafeListNumbersApi.md#fetchsafelist) | **Get** /v1/SafeList/Numbers | Check if a phone number exists in SafeList.
49+
*SafeListNumbersApi* | [**CreateSafelist**](docs/SafeListNumbersApi.md#createsafelist) | **Post** /v1/SafeList/Numbers | Add a new phone number or phone number 1k prefix to SafeList.
50+
*SafeListNumbersApi* | [**DeleteSafelist**](docs/SafeListNumbersApi.md#deletesafelist) | **Delete** /v1/SafeList/Numbers | Remove a phone number or phone number 1k prefix from SafeList.
51+
*SafeListNumbersApi* | [**FetchSafelist**](docs/SafeListNumbersApi.md#fetchsafelist) | **Get** /v1/SafeList/Numbers | Check if a phone number or phone number 1k prefix exists in SafeList.
5252

5353

5454
## Documentation For Models

rest/accounts/v1/auth_tokens_promote.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ package openapi
1616

1717
import (
1818
"encoding/json"
19+
"fmt"
1920
"net/url"
21+
22+
"github.com/twilio/twilio-go/client"
2023
)
2124

2225
// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.

rest/accounts/v1/auth_tokens_secondary.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ package openapi
1616

1717
import (
1818
"encoding/json"
19+
"fmt"
1920
"net/url"
21+
22+
"github.com/twilio/twilio-go/client"
2023
)
2124

2225
// Create a new secondary Auth Token

rest/accounts/v1/consents_bulk.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ package openapi
1616

1717
import (
1818
"encoding/json"
19+
"fmt"
1920
"net/url"
21+
22+
"github.com/twilio/twilio-go/client"
2023
)
2124

2225
// Optional parameters for the method 'CreateBulkConsents'
@@ -30,7 +33,6 @@ func (params *CreateBulkConsentsParams) SetItems(Items []map[string]interface{})
3033
return params
3134
}
3235

33-
//
3436
func (c *ApiService) CreateBulkConsents(params *CreateBulkConsentsParams) (*AccountsV1BulkConsents, error) {
3537
path := "/v1/Consents/Bulk"
3638

rest/accounts/v1/contacts_bulk.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ package openapi
1616

1717
import (
1818
"encoding/json"
19+
"fmt"
1920
"net/url"
21+
22+
"github.com/twilio/twilio-go/client"
2023
)
2124

2225
// Optional parameters for the method 'CreateBulkContacts'
@@ -30,7 +33,6 @@ func (params *CreateBulkContactsParams) SetItems(Items []map[string]interface{})
3033
return params
3134
}
3235

33-
//
3436
func (c *ApiService) CreateBulkContacts(params *CreateBulkContactsParams) (*AccountsV1BulkContacts, error) {
3537
path := "/v1/Contacts/Bulk"
3638

rest/accounts/v1/credentials_aws.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"encoding/json"
1919
"fmt"
2020
"net/url"
21-
"strings"
2221

2322
"github.com/twilio/twilio-go/client"
2423
)

rest/accounts/v1/credentials_public_keys.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"encoding/json"
1919
"fmt"
2020
"net/url"
21-
"strings"
2221

2322
"github.com/twilio/twilio-go/client"
2423
)

rest/accounts/v1/docs/AccountsV1Safelist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Sid** | Pointer to **string** | The unique string that we created to identify the SafeList resource. |
8-
**PhoneNumber** | Pointer to **string** | The phone number in SafeList. |
8+
**PhoneNumber** | Pointer to **string** | The phone number or phone number 1k prefix in SafeList. |
99

1010
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1111

rest/accounts/v1/docs/SafeListNumbersApi.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ All URIs are relative to *https://accounts.twilio.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**CreateSafelist**](SafeListNumbersApi.md#CreateSafelist) | **Post** /v1/SafeList/Numbers | Add a new phone number to SafeList.
8-
[**DeleteSafelist**](SafeListNumbersApi.md#DeleteSafelist) | **Delete** /v1/SafeList/Numbers | Remove a phone number from SafeList.
9-
[**FetchSafelist**](SafeListNumbersApi.md#FetchSafelist) | **Get** /v1/SafeList/Numbers | Check if a phone number exists in SafeList.
7+
[**CreateSafelist**](SafeListNumbersApi.md#CreateSafelist) | **Post** /v1/SafeList/Numbers | Add a new phone number or phone number 1k prefix to SafeList.
8+
[**DeleteSafelist**](SafeListNumbersApi.md#DeleteSafelist) | **Delete** /v1/SafeList/Numbers | Remove a phone number or phone number 1k prefix from SafeList.
9+
[**FetchSafelist**](SafeListNumbersApi.md#FetchSafelist) | **Get** /v1/SafeList/Numbers | Check if a phone number or phone number 1k prefix exists in SafeList.
1010

1111

1212

1313
## CreateSafelist
1414

1515
> AccountsV1Safelist CreateSafelist(ctx, optional)
1616
17-
Add a new phone number to SafeList.
17+
Add a new phone number or phone number 1k prefix to SafeList.
1818

19-
Add a new phone number to SafeList.
19+
Add a new phone number or phone number 1k prefix to SafeList.
2020

2121
### Path Parameters
2222

@@ -29,7 +29,7 @@ Other parameters are passed through a pointer to a CreateSafelistParams struct
2929

3030
Name | Type | Description
3131
------------- | ------------- | -------------
32-
**PhoneNumber** | **string** | The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
32+
**PhoneNumber** | **string** | The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
3333

3434
### Return type
3535

@@ -53,9 +53,9 @@ Name | Type | Description
5353

5454
> DeleteSafelist(ctx, optional)
5555
56-
Remove a phone number from SafeList.
56+
Remove a phone number or phone number 1k prefix from SafeList.
5757

58-
Remove a phone number from SafeList.
58+
Remove a phone number or phone number 1k prefix from SafeList.
5959

6060
### Path Parameters
6161

@@ -68,7 +68,7 @@ Other parameters are passed through a pointer to a DeleteSafelistParams struct
6868

6969
Name | Type | Description
7070
------------- | ------------- | -------------
71-
**PhoneNumber** | **string** | The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
71+
**PhoneNumber** | **string** | The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
7272

7373
### Return type
7474

@@ -92,9 +92,9 @@ Name | Type | Description
9292

9393
> AccountsV1Safelist FetchSafelist(ctx, optional)
9494
95-
Check if a phone number exists in SafeList.
95+
Check if a phone number or phone number 1k prefix exists in SafeList.
9696

97-
Check if a phone number exists in SafeList.
97+
Check if a phone number or phone number 1k prefix exists in SafeList.
9898

9999
### Path Parameters
100100

@@ -107,7 +107,7 @@ Other parameters are passed through a pointer to a FetchSafelistParams struct
107107

108108
Name | Type | Description
109109
------------- | ------------- | -------------
110-
**PhoneNumber** | **string** | The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
110+
**PhoneNumber** | **string** | The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
111111

112112
### Return type
113113

rest/accounts/v1/model_accounts_v1_auth_token_promotion.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package openapi
1616

1717
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
1820
"time"
1921
)
2022

rest/accounts/v1/model_accounts_v1_bulk_consents.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
package openapi
1616

17+
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
20+
)
21+
1722
// AccountsV1BulkConsents struct for AccountsV1BulkConsents
1823
type AccountsV1BulkConsents struct {
1924
// A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.

rest/accounts/v1/model_accounts_v1_bulk_contacts.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
package openapi
1616

17+
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
20+
)
21+
1722
// AccountsV1BulkContacts struct for AccountsV1BulkContacts
1823
type AccountsV1BulkContacts struct {
1924
// A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.

rest/accounts/v1/model_accounts_v1_credential_aws.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package openapi
1616

1717
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
1820
"time"
1921
)
2022

rest/accounts/v1/model_accounts_v1_credential_public_key.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package openapi
1616

1717
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
1820
"time"
1921
)
2022

rest/accounts/v1/model_accounts_v1_safelist.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@
1414

1515
package openapi
1616

17+
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
20+
)
21+
1722
// AccountsV1Safelist struct for AccountsV1Safelist
1823
type AccountsV1Safelist struct {
1924
// The unique string that we created to identify the SafeList resource.
2025
Sid *string `json:"sid,omitempty"`
21-
// The phone number in SafeList.
26+
// The phone number or phone number 1k prefix in SafeList.
2227
PhoneNumber *string `json:"phone_number,omitempty"`
2328
}

rest/accounts/v1/model_accounts_v1_secondary_auth_token.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package openapi
1616

1717
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
1820
"time"
1921
)
2022

rest/accounts/v1/model_list_credential_aws_response.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
package openapi
1616

17+
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
20+
)
21+
1722
// ListCredentialAwsResponse struct for ListCredentialAwsResponse
1823
type ListCredentialAwsResponse struct {
1924
Credentials []AccountsV1CredentialAws `json:"credentials,omitempty"`

rest/accounts/v1/model_list_credential_aws_response_meta.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
package openapi
1616

17+
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
20+
)
21+
1722
// ListCredentialAwsResponseMeta struct for ListCredentialAwsResponseMeta
1823
type ListCredentialAwsResponseMeta struct {
1924
FirstPageUrl string `json:"first_page_url,omitempty"`

rest/accounts/v1/model_list_credential_public_key_response.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
package openapi
1616

17+
import (
18+
"encoding/json"
19+
"github.com/twilio/twilio-go/client"
20+
)
21+
1722
// ListCredentialPublicKeyResponse struct for ListCredentialPublicKeyResponse
1823
type ListCredentialPublicKeyResponse struct {
1924
Credentials []AccountsV1CredentialPublicKey `json:"credentials,omitempty"`

rest/accounts/v1/safe_list_numbers.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ package openapi
1616

1717
import (
1818
"encoding/json"
19+
"fmt"
1920
"net/url"
21+
22+
"github.com/twilio/twilio-go/client"
2023
)
2124

2225
// Optional parameters for the method 'CreateSafelist'
2326
type CreateSafelistParams struct {
24-
// The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
27+
// The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
2528
PhoneNumber *string `json:"PhoneNumber,omitempty"`
2629
}
2730

@@ -30,7 +33,7 @@ func (params *CreateSafelistParams) SetPhoneNumber(PhoneNumber string) *CreateSa
3033
return params
3134
}
3235

33-
// Add a new phone number to SafeList.
36+
// Add a new phone number or phone number 1k prefix to SafeList.
3437
func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*AccountsV1Safelist, error) {
3538
path := "/v1/SafeList/Numbers"
3639

@@ -60,7 +63,7 @@ func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*AccountsV1Sa
6063

6164
// Optional parameters for the method 'DeleteSafelist'
6265
type DeleteSafelistParams struct {
63-
// The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
66+
// The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
6467
PhoneNumber *string `json:"PhoneNumber,omitempty"`
6568
}
6669

@@ -69,7 +72,7 @@ func (params *DeleteSafelistParams) SetPhoneNumber(PhoneNumber string) *DeleteSa
6972
return params
7073
}
7174

72-
// Remove a phone number from SafeList.
75+
// Remove a phone number or phone number 1k prefix from SafeList.
7376
func (c *ApiService) DeleteSafelist(params *DeleteSafelistParams) error {
7477
path := "/v1/SafeList/Numbers"
7578

@@ -94,7 +97,7 @@ func (c *ApiService) DeleteSafelist(params *DeleteSafelistParams) error {
9497

9598
// Optional parameters for the method 'FetchSafelist'
9699
type FetchSafelistParams struct {
97-
// The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
100+
// The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
98101
PhoneNumber *string `json:"PhoneNumber,omitempty"`
99102
}
100103

@@ -103,7 +106,7 @@ func (params *FetchSafelistParams) SetPhoneNumber(PhoneNumber string) *FetchSafe
103106
return params
104107
}
105108

106-
// Check if a phone number exists in SafeList.
109+
// Check if a phone number or phone number 1k prefix exists in SafeList.
107110
func (c *ApiService) FetchSafelist(params *FetchSafelistParams) (*AccountsV1Safelist, error) {
108111
path := "/v1/SafeList/Numbers"
109112

rest/api/v2010/accounts.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"encoding/json"
1919
"fmt"
2020
"net/url"
21-
"strings"
2221

2322
"github.com/twilio/twilio-go/client"
2423
)
@@ -129,7 +128,7 @@ func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumbe
129128
data.Set("FriendlyName", *params.FriendlyName)
130129
}
131130
if params != nil && params.Status != nil {
132-
data.Set("Status", *params.Status)
131+
data.Set("Status", fmt.Sprint(*params.Status))
133132
}
134133
if params != nil && params.PageSize != nil {
135134
data.Set("PageSize", fmt.Sprint(*params.PageSize))
@@ -274,7 +273,7 @@ func (c *ApiService) UpdateAccount(Sid string, params *UpdateAccountParams) (*Ap
274273
data.Set("FriendlyName", *params.FriendlyName)
275274
}
276275
if params != nil && params.Status != nil {
277-
data.Set("Status", *params.Status)
276+
data.Set("Status", fmt.Sprint(*params.Status))
278277
}
279278

280279
resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)

0 commit comments

Comments
 (0)