Skip to content

Commit

Permalink
chore: corrected model names
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Apr 4, 2024
1 parent 2a35800 commit d5b6a40
Show file tree
Hide file tree
Showing 376 changed files with 2,524 additions and 1,087 deletions.
184 changes: 61 additions & 123 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) (*ListAccount200Response, error) {
func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumber string) (*ListAccountResponse, 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 := &ListAccount200Response{}
ps := &ListAccountResponse{}
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 *ListAccount200Response, params *ListAccountParams, recordChannel chan ApiV2010Account, errorChannel chan error) {
func (c *ApiService) streamAccount(response *ListAccountResponse, params *ListAccountParams, recordChannel chan ApiV2010Account, errorChannel chan error) {
curRecord := 1

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

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

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

close(recordChannel)
close(errorChannel)
}

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

defer resp.Body.Close()

ps := &ListAccount200Response{}
ps := &ListAccountResponse{}
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_addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,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) (*ListAddress200Response, error) {
func (c *ApiService) PageAddress(params *ListAddressParams, pageToken, pageNumber string) (*ListAddressResponse, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json"

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

defer resp.Body.Close()

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

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

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

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

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

close(recordChannel)
close(errorChannel)
}

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

defer resp.Body.Close()

ps := &ListAddress200Response{}
ps := &ListAddressResponse{}
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_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) (*ListDependentPhoneNumber200Response, error) {
func (c *ApiService) PageDependentPhoneNumber(AddressSid string, params *ListDependentPhoneNumberParams, pageToken, pageNumber string) (*ListDependentPhoneNumberResponse, 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 := &ListDependentPhoneNumber200Response{}
ps := &ListDependentPhoneNumberResponse{}
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 *ListDependentPhoneNumber200Response, params *ListDependentPhoneNumberParams, recordChannel chan ApiV2010DependentPhoneNumber, errorChannel chan error) {
func (c *ApiService) streamDependentPhoneNumber(response *ListDependentPhoneNumberResponse, 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.getNextListDependentPhoneNumber200Response)
record, err := client.GetNext(c.baseURL, response, c.getNextListDependentPhoneNumberResponse)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

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

close(recordChannel)
close(errorChannel)
}

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

defer resp.Body.Close()

ps := &ListDependentPhoneNumber200Response{}
ps := &ListDependentPhoneNumberResponse{}
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) (*ListApplication200Response, error) {
func (c *ApiService) PageApplication(params *ListApplicationParams, pageToken, pageNumber string) (*ListApplicationResponse, 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 := &ListApplication200Response{}
ps := &ListApplicationResponse{}
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 *ListApplication200Response, params *ListApplicationParams, recordChannel chan ApiV2010Application, errorChannel chan error) {
func (c *ApiService) streamApplication(response *ListApplicationResponse, params *ListApplicationParams, recordChannel chan ApiV2010Application, errorChannel chan error) {
curRecord := 1

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

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

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

close(recordChannel)
close(errorChannel)
}

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

defer resp.Body.Close()

ps := &ListApplication200Response{}
ps := &ListApplicationResponse{}
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) (*ListAuthorizedConnectApp200Response, error) {
func (c *ApiService) PageAuthorizedConnectApp(params *ListAuthorizedConnectAppParams, pageToken, pageNumber string) (*ListAuthorizedConnectAppResponse, 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 := &ListAuthorizedConnectApp200Response{}
ps := &ListAuthorizedConnectAppResponse{}
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 *ListAuthorizedConnectApp200Response, params *ListAuthorizedConnectAppParams, recordChannel chan ApiV2010AuthorizedConnectApp, errorChannel chan error) {
func (c *ApiService) streamAuthorizedConnectApp(response *ListAuthorizedConnectAppResponse, 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.getNextListAuthorizedConnectApp200Response)
record, err := client.GetNext(c.baseURL, response, c.getNextListAuthorizedConnectAppResponse)
if err != nil {
errorChannel <- err
break
} else if record == nil {
break
}

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

close(recordChannel)
close(errorChannel)
}

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

defer resp.Body.Close()

ps := &ListAuthorizedConnectApp200Response{}
ps := &ListAuthorizedConnectAppResponse{}
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_available_phone_numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (params *ListAvailablePhoneNumberCountryParams) SetLimit(Limit int) *ListAv
}

// Retrieve a single page of AvailablePhoneNumberCountry records from the API. Request is executed immediately.
func (c *ApiService) PageAvailablePhoneNumberCountry(params *ListAvailablePhoneNumberCountryParams, pageToken, pageNumber string) (*ListAvailablePhoneNumberCountry200Response, error) {
func (c *ApiService) PageAvailablePhoneNumberCountry(params *ListAvailablePhoneNumberCountryParams, pageToken, pageNumber string) (*ListAvailablePhoneNumberCountryResponse, error) {
path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json"

if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -115,7 +115,7 @@ func (c *ApiService) PageAvailablePhoneNumberCountry(params *ListAvailablePhoneN

defer resp.Body.Close()

ps := &ListAvailablePhoneNumberCountry200Response{}
ps := &ListAvailablePhoneNumberCountryResponse{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
Expand Down Expand Up @@ -161,7 +161,7 @@ func (c *ApiService) StreamAvailablePhoneNumberCountry(params *ListAvailablePhon
return recordChannel, errorChannel
}

func (c *ApiService) streamAvailablePhoneNumberCountry(response *ListAvailablePhoneNumberCountry200Response, params *ListAvailablePhoneNumberCountryParams, recordChannel chan ApiV2010AvailablePhoneNumberCountry, errorChannel chan error) {
func (c *ApiService) streamAvailablePhoneNumberCountry(response *ListAvailablePhoneNumberCountryResponse, params *ListAvailablePhoneNumberCountryParams, recordChannel chan ApiV2010AvailablePhoneNumberCountry, errorChannel chan error) {
curRecord := 1

for response != nil {
Expand All @@ -176,22 +176,22 @@ func (c *ApiService) streamAvailablePhoneNumberCountry(response *ListAvailablePh
}
}

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

response = record.(*ListAvailablePhoneNumberCountry200Response)
response = record.(*ListAvailablePhoneNumberCountryResponse)
}

close(recordChannel)
close(errorChannel)
}

func (c *ApiService) getNextListAvailablePhoneNumberCountry200Response(nextPageUrl string) (interface{}, error) {
func (c *ApiService) getNextListAvailablePhoneNumberCountryResponse(nextPageUrl string) (interface{}, error) {
if nextPageUrl == "" {
return nil, nil
}
Expand All @@ -202,7 +202,7 @@ func (c *ApiService) getNextListAvailablePhoneNumberCountry200Response(nextPageU

defer resp.Body.Close()

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

0 comments on commit d5b6a40

Please sign in to comment.