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 11d39a2da..12c92bd4d 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 @@ -174,8 +174,9 @@ func getAllPhonesFn(ctx context.Context, p *phoneProxy) (*[]platformclientv2.Pho const pageSize = 100 const sortBy = "id" expand := []string{"lines", "properties"} + fields := []string{"webRtcUser"} - phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", expand, nil) + phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", expand, fields) 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 @@ -195,7 +196,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, "", "", "", "", "", "", "", "", "", "", "", "", expand, nil) + phones, response, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(pageNum, pageSize, sortBy, "", "", "", "", "", "", "", "", "", "", "", "", expand, fields) if err != nil || (response != nil && response.StatusCode != http.StatusOK) { return nil, response, err } @@ -247,7 +248,9 @@ func getPhoneByIdFn(ctx context.Context, p *phoneProxy, phoneId string) (*platfo func getPhoneByNameFn(ctx context.Context, p *phoneProxy, phoneName string) (phone *platformclientv2.Phone, retryable bool, resp *platformclientv2.APIResponse, err error) { const pageSize = 100 expand := []string{"lines", "properties"} - phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", expand, nil) + fields := []string{"webRtcUser"} + + phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(1, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", expand, fields) if err != nil { return nil, false, resp, err } @@ -262,7 +265,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, "", "", expand, nil) + phones, resp, err := p.edgesApi.GetTelephonyProvidersEdgesPhones(pageNum, pageSize, "", "", "", "", "", "", "", "", "", "", phoneName, "", "", expand, fields) if err != nil { return nil, false, resp, err } diff --git a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go index 7caff939d..61cf4609f 100644 --- a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go +++ b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go @@ -185,7 +185,6 @@ func PhoneExporter() *resourceExporter.ResourceExporter { return &resourceExporter.ResourceExporter{ GetResourcesFunc: provider.GetAllWithPooledClient(getAllPhones), RefAttrs: map[string]*resourceExporter.RefAttrSettings{ - "web_rtc_user_id": {RefType: "genesyscloud_user"}, "site_id": {RefType: "genesyscloud_telephony_providers_edges_site"}, "phone_base_settings_id": {RefType: "genesyscloud_telephony_providers_edges_phonebasesettings"}, },