// Add a Phone Number to a Service&#39;s Proxy Number Pool.
Add a Phone Number to a Service's Proxy Number Pool.
// Add a Phone Number to a Service&#39 ; s Proxy Number Pool .
func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) {
	path := "/v1/Services/{ServiceSid}/PhoneNumbers"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.IsReserved != nil {
		data.Set("IsReserved", fmt.Sprint(*params.IsReserved))
	}
	if params != nil && params.PhoneNumber != nil {
		data.Set("PhoneNumber", *params.PhoneNumber)
	}
	if params != nil && params.Sid != nil {
		data.Set("Sid", *params.Sid)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ProxyV1ServicePhoneNumber{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) CreatePhoneNumber ( ServiceSid string , params * CreatePhoneNumberParams ) ( * ProxyV1ServicePhoneNumber , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , ServiceSid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . IsReserved != nil { data . Set ( " " , fmt . Sprint ( * params . IsReserved ) ) } if params != nil && params . PhoneNumber != nil { data . Set ( " " , * params . PhoneNumber ) } if params != nil && params . Sid != nil { data . Set ( " " , * params . Sid ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & ProxyV1ServicePhoneNumber { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Add a Phone Number to a Service's Proxy Number Pool.
Add a Phone Number to a Service ' s Proxy Number Pool .