// Add a Short Code to the Proxy Number Pool for the Service.
Add a Short Code to the Proxy Number Pool for the Service.
// Add a Short Code to the Proxy Number Pool for the Service .
func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*ProxyV1ServiceShortCode, error) {
	path := "/v1/Services/{ServiceSid}/ShortCodes"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	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 := &ProxyV1ServiceShortCode{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) CreateShortCode ( ServiceSid string , params * CreateShortCodeParams ) ( * ProxyV1ServiceShortCode , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , ServiceSid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) 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 := & ProxyV1ServiceShortCode { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Add a Short Code to the Proxy Number Pool for the Service.
Add a Short Code to the Proxy Number Pool for the Service .