diff --git a/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go b/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go index 3ff4089c9..11d39a2da 100644 --- a/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go +++ b/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go @@ -173,8 +173,9 @@ func getAllPhonesFn(ctx context.Context, p *phoneProxy) (*[]platformclientv2.Pho var allPhones []platformclientv2.Phone const pageSize = 100 const sortBy = "id" + expand := []string{"lines", "properties"} - phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", nil, nil) + phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", expand, nil) if err != nil || (response != nil && response.StatusCode != http.StatusOK) { log.Printf("getAllPhonesFn:: error encountered while trying to get first page of phone data #%v statusCode: %d", err, response.StatusCode) return nil, response, err @@ -194,7 +195,7 @@ func getAllPhonesFn(ctx context.Context, p *phoneProxy) (*[]platformclientv2.Pho } for pageNum := 2; pageNum <= *phones.PageCount; pageNum++ { - phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(pageNum, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", nil, nil) + phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(pageNum, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", expand, nil) if err != nil || (response != nil && response.StatusCode != http.StatusOK) { return nil, response, err } @@ -245,7 +246,8 @@ func getPhoneByIdFn(ctx context.Context, p *phoneProxy, phoneId string) (*platfo // getPhoneByNameFn is an implementation function for retrieving a Genesys Cloud Phone by name func getPhoneByNameFn(ctx context.Context, p *phoneProxy, phoneName string) (phone *platformclientv2.Phone, retryable bool, resp *platformclientv2.APIResponse, err error) { const pageSize = 100 - phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", nil, nil) + expand := []string{"lines", "properties"} + phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", expand, nil) if err != nil { return nil, false, resp, err } @@ -260,7 +262,7 @@ func getPhoneByNameFn(ctx context.Context, p *phoneProxy, phoneName string) (pho } for pageNum := 2; pageNum <= *phones.PageCount; pageNum++ { - phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(pageNum, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", nil, nil) + phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(pageNum, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", expand, nil) if err != nil { return nil, false, resp, err }