Skip to content

Commit

Permalink
feat!: Rest api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Mar 11, 2024
1 parent eddfc50 commit ed17b11
Show file tree
Hide file tree
Showing 690 changed files with 9,042 additions and 2,150 deletions.
2 changes: 1 addition & 1 deletion rest/accounts/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is the public Twilio REST API.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 1.55.0
- API version: 1.0.0
- Package version: 1.0.0
- Build package: com.twilio.oai.TwilioGoGenerator
For more information, please visit [https://support.twilio.com](https://support.twilio.com)
Expand Down
2 changes: 1 addition & 1 deletion rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**FirstPageUrl** | **string** | |[optional]
**Key** | **string** | |[optional]
**NextPageUrl** | Pointer to **string** | |
**Page** | **int** | |[optional]
**PageSize** | **int** | |[optional]
**PreviousPageUrl** | Pointer to **string** | |
**Url** | **string** | |[optional]
**Key** | **string** | |[optional]

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ package openapi
// ListCredentialAwsResponseMeta struct for ListCredentialAwsResponseMeta
type ListCredentialAwsResponseMeta struct {
FirstPageUrl string `json:"first_page_url,omitempty"`
Key string `json:"key,omitempty"`
NextPageUrl *string `json:"next_page_url,omitempty"`
Page int `json:"page,omitempty"`
PageSize int `json:"page_size,omitempty"`
PreviousPageUrl *string `json:"previous_page_url,omitempty"`
Url string `json:"url,omitempty"`
Key string `json:"key,omitempty"`
}
187 changes: 124 additions & 63 deletions rest/api/v2010/README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions rest/api/v2010/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (params *ListAccountParams) SetLimit(Limit int) *ListAccountParams {
}

// Retrieve a single page of Account records from the API. Request is executed immediately.
func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumber string) (*ListAccountResponse, error) {
func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumber string) (*ListAccount200Response, error) {
path := "/2010-04-01/Accounts.json"

data := url.Values{}
Expand Down Expand Up @@ -143,7 +143,7 @@ func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumbe

defer resp.Body.Close()

ps := &ListAccountResponse{}
ps := &ListAccount200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -189,7 +189,7 @@ func (c *ApiService) StreamAccount(params *ListAccountParams) (chan ApiV2010Acco
return recordChannel, errorChannel
}

func (c *ApiService) streamAccount(response *ListAccountResponse, params *ListAccountParams, recordChannel chan ApiV2010Account, errorChannel chan error) {
func (c *ApiService) streamAccount(response *ListAccount200Response, params *ListAccountParams, recordChannel chan ApiV2010Account, errorChannel chan error) {
curRecord := 1

for response != nil {
Expand All @@ -204,22 +204,22 @@ func (c *ApiService) streamAccount(response *ListAccountResponse, params *ListAc
}
}

record, err := client.GetNext(c.baseURL, response, c.getNextListAccountResponse)
record, err := client.GetNext(c.baseURL, response, c.getNextListAccount200Response)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

response = record.(*ListAccountResponse)
response = record.(*ListAccount200Response)
}

close(recordChannel)
close(errorChannel)
}

func (c *ApiService) getNextListAccountResponse(nextPageUrl string) (interface{}, error) {
func (c *ApiService) getNextListAccount200Response(nextPageUrl string) (interface{}, error) {
if nextPageUrl == "" {
return nil, nil
}
Expand All @@ -230,7 +230,7 @@ func (c *ApiService) getNextListAccountResponse(nextPageUrl string) (interface{}

defer resp.Body.Close()

ps := &ListAccountResponse{}
ps := &ListAccount200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down
18 changes: 7 additions & 11 deletions rest/api/v2010/accounts_addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ func (params *CreateAddressParams) SetStreetSecondary(StreetSecondary string) *C
return params
}

//
func (c *ApiService) CreateAddress(params *CreateAddressParams) (*ApiV2010Address, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -163,7 +162,6 @@ func (params *DeleteAddressParams) SetPathAccountSid(PathAccountSid string) *Del
return params
}

//
func (c *ApiService) DeleteAddress(Sid string, params *DeleteAddressParams) error {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -197,7 +195,6 @@ func (params *FetchAddressParams) SetPathAccountSid(PathAccountSid string) *Fetc
return params
}

//
func (c *ApiService) FetchAddress(Sid string, params *FetchAddressParams) (*ApiV2010Address, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -267,7 +264,7 @@ func (params *ListAddressParams) SetLimit(Limit int) *ListAddressParams {
}

// Retrieve a single page of Address records from the API. Request is executed immediately.
func (c *ApiService) PageAddress(params *ListAddressParams, pageToken, pageNumber string) (*ListAddressResponse, error) {
func (c *ApiService) PageAddress(params *ListAddressParams, pageToken, pageNumber string) (*ListAddress200Response, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json"

if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -306,7 +303,7 @@ func (c *ApiService) PageAddress(params *ListAddressParams, pageToken, pageNumbe

defer resp.Body.Close()

ps := &ListAddressResponse{}
ps := &ListAddress200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -352,7 +349,7 @@ func (c *ApiService) StreamAddress(params *ListAddressParams) (chan ApiV2010Addr
return recordChannel, errorChannel
}

func (c *ApiService) streamAddress(response *ListAddressResponse, params *ListAddressParams, recordChannel chan ApiV2010Address, errorChannel chan error) {
func (c *ApiService) streamAddress(response *ListAddress200Response, params *ListAddressParams, recordChannel chan ApiV2010Address, errorChannel chan error) {
curRecord := 1

for response != nil {
Expand All @@ -367,22 +364,22 @@ func (c *ApiService) streamAddress(response *ListAddressResponse, params *ListAd
}
}

record, err := client.GetNext(c.baseURL, response, c.getNextListAddressResponse)
record, err := client.GetNext(c.baseURL, response, c.getNextListAddress200Response)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

response = record.(*ListAddressResponse)
response = record.(*ListAddress200Response)
}

close(recordChannel)
close(errorChannel)
}

func (c *ApiService) getNextListAddressResponse(nextPageUrl string) (interface{}, error) {
func (c *ApiService) getNextListAddress200Response(nextPageUrl string) (interface{}, error) {
if nextPageUrl == "" {
return nil, nil
}
Expand All @@ -393,7 +390,7 @@ func (c *ApiService) getNextListAddressResponse(nextPageUrl string) (interface{}

defer resp.Body.Close()

ps := &ListAddressResponse{}
ps := &ListAddress200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -465,7 +462,6 @@ func (params *UpdateAddressParams) SetStreetSecondary(StreetSecondary string) *U
return params
}

//
func (c *ApiService) UpdateAddress(Sid string, params *UpdateAddressParams) (*ApiV2010Address, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
14 changes: 7 additions & 7 deletions rest/api/v2010/accounts_addresses_dependent_phone_numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (params *ListDependentPhoneNumberParams) SetLimit(Limit int) *ListDependent
}

// Retrieve a single page of DependentPhoneNumber records from the API. Request is executed immediately.
func (c *ApiService) PageDependentPhoneNumber(AddressSid string, params *ListDependentPhoneNumberParams, pageToken, pageNumber string) (*ListDependentPhoneNumberResponse, error) {
func (c *ApiService) PageDependentPhoneNumber(AddressSid string, params *ListDependentPhoneNumberParams, pageToken, pageNumber string) (*ListDependentPhoneNumber200Response, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json"

if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -78,7 +78,7 @@ func (c *ApiService) PageDependentPhoneNumber(AddressSid string, params *ListDep

defer resp.Body.Close()

ps := &ListDependentPhoneNumberResponse{}
ps := &ListDependentPhoneNumber200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -124,7 +124,7 @@ func (c *ApiService) StreamDependentPhoneNumber(AddressSid string, params *ListD
return recordChannel, errorChannel
}

func (c *ApiService) streamDependentPhoneNumber(response *ListDependentPhoneNumberResponse, params *ListDependentPhoneNumberParams, recordChannel chan ApiV2010DependentPhoneNumber, errorChannel chan error) {
func (c *ApiService) streamDependentPhoneNumber(response *ListDependentPhoneNumber200Response, params *ListDependentPhoneNumberParams, recordChannel chan ApiV2010DependentPhoneNumber, errorChannel chan error) {
curRecord := 1

for response != nil {
Expand All @@ -139,22 +139,22 @@ func (c *ApiService) streamDependentPhoneNumber(response *ListDependentPhoneNumb
}
}

record, err := client.GetNext(c.baseURL, response, c.getNextListDependentPhoneNumberResponse)
record, err := client.GetNext(c.baseURL, response, c.getNextListDependentPhoneNumber200Response)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

response = record.(*ListDependentPhoneNumberResponse)
response = record.(*ListDependentPhoneNumber200Response)
}

close(recordChannel)
close(errorChannel)
}

func (c *ApiService) getNextListDependentPhoneNumberResponse(nextPageUrl string) (interface{}, error) {
func (c *ApiService) getNextListDependentPhoneNumber200Response(nextPageUrl string) (interface{}, error) {
if nextPageUrl == "" {
return nil, nil
}
Expand All @@ -165,7 +165,7 @@ func (c *ApiService) getNextListDependentPhoneNumberResponse(nextPageUrl string)

defer resp.Body.Close()

ps := &ListDependentPhoneNumberResponse{}
ps := &ListDependentPhoneNumber200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down
14 changes: 7 additions & 7 deletions rest/api/v2010/accounts_applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (params *ListApplicationParams) SetLimit(Limit int) *ListApplicationParams
}

// Retrieve a single page of Application records from the API. Request is executed immediately.
func (c *ApiService) PageApplication(params *ListApplicationParams, pageToken, pageNumber string) (*ListApplicationResponse, error) {
func (c *ApiService) PageApplication(params *ListApplicationParams, pageToken, pageNumber string) (*ListApplication200Response, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Applications.json"

if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -342,7 +342,7 @@ func (c *ApiService) PageApplication(params *ListApplicationParams, pageToken, p

defer resp.Body.Close()

ps := &ListApplicationResponse{}
ps := &ListApplication200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -388,7 +388,7 @@ func (c *ApiService) StreamApplication(params *ListApplicationParams) (chan ApiV
return recordChannel, errorChannel
}

func (c *ApiService) streamApplication(response *ListApplicationResponse, params *ListApplicationParams, recordChannel chan ApiV2010Application, errorChannel chan error) {
func (c *ApiService) streamApplication(response *ListApplication200Response, params *ListApplicationParams, recordChannel chan ApiV2010Application, errorChannel chan error) {
curRecord := 1

for response != nil {
Expand All @@ -403,22 +403,22 @@ func (c *ApiService) streamApplication(response *ListApplicationResponse, params
}
}

record, err := client.GetNext(c.baseURL, response, c.getNextListApplicationResponse)
record, err := client.GetNext(c.baseURL, response, c.getNextListApplication200Response)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

response = record.(*ListApplicationResponse)
response = record.(*ListApplication200Response)
}

close(recordChannel)
close(errorChannel)
}

func (c *ApiService) getNextListApplicationResponse(nextPageUrl string) (interface{}, error) {
func (c *ApiService) getNextListApplication200Response(nextPageUrl string) (interface{}, error) {
if nextPageUrl == "" {
return nil, nil
}
Expand All @@ -429,7 +429,7 @@ func (c *ApiService) getNextListApplicationResponse(nextPageUrl string) (interfa

defer resp.Body.Close()

ps := &ListApplicationResponse{}
ps := &ListApplication200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down
14 changes: 7 additions & 7 deletions rest/api/v2010/accounts_authorized_connect_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (params *ListAuthorizedConnectAppParams) SetLimit(Limit int) *ListAuthorize
}

// Retrieve a single page of AuthorizedConnectApp records from the API. Request is executed immediately.
func (c *ApiService) PageAuthorizedConnectApp(params *ListAuthorizedConnectAppParams, pageToken, pageNumber string) (*ListAuthorizedConnectAppResponse, error) {
func (c *ApiService) PageAuthorizedConnectApp(params *ListAuthorizedConnectAppParams, pageToken, pageNumber string) (*ListAuthorizedConnectApp200Response, error) {
path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json"

if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -116,7 +116,7 @@ func (c *ApiService) PageAuthorizedConnectApp(params *ListAuthorizedConnectAppPa

defer resp.Body.Close()

ps := &ListAuthorizedConnectAppResponse{}
ps := &ListAuthorizedConnectApp200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -162,7 +162,7 @@ func (c *ApiService) StreamAuthorizedConnectApp(params *ListAuthorizedConnectApp
return recordChannel, errorChannel
}

func (c *ApiService) streamAuthorizedConnectApp(response *ListAuthorizedConnectAppResponse, params *ListAuthorizedConnectAppParams, recordChannel chan ApiV2010AuthorizedConnectApp, errorChannel chan error) {
func (c *ApiService) streamAuthorizedConnectApp(response *ListAuthorizedConnectApp200Response, params *ListAuthorizedConnectAppParams, recordChannel chan ApiV2010AuthorizedConnectApp, errorChannel chan error) {
curRecord := 1

for response != nil {
Expand All @@ -177,22 +177,22 @@ func (c *ApiService) streamAuthorizedConnectApp(response *ListAuthorizedConnectA
}
}

record, err := client.GetNext(c.baseURL, response, c.getNextListAuthorizedConnectAppResponse)
record, err := client.GetNext(c.baseURL, response, c.getNextListAuthorizedConnectApp200Response)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

response = record.(*ListAuthorizedConnectAppResponse)
response = record.(*ListAuthorizedConnectApp200Response)
}

close(recordChannel)
close(errorChannel)
}

func (c *ApiService) getNextListAuthorizedConnectAppResponse(nextPageUrl string) (interface{}, error) {
func (c *ApiService) getNextListAuthorizedConnectApp200Response(nextPageUrl string) (interface{}, error) {
if nextPageUrl == "" {
return nil, nil
}
Expand All @@ -203,7 +203,7 @@ func (c *ApiService) getNextListAuthorizedConnectAppResponse(nextPageUrl string)

defer resp.Body.Close()

ps := &ListAuthorizedConnectAppResponse{}
ps := &ListAuthorizedConnectApp200Response{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit ed17b11

Please sign in to comment.