github.com/twilio/twilio-go@v1.20.1/rest/numbers/v1/porting_port_in_phone_number.go (about)

     1  /*
     2   * This code was generated by
     3   * ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
     4   *  |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
     5   *  |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
     6   *
     7   * Twilio - Numbers
     8   * This is the public Twilio REST API.
     9   *
    10   * NOTE: This class is auto generated by OpenAPI Generator.
    11   * https://openapi-generator.tech
    12   * Do not edit the class manually.
    13   */
    14  
    15  package openapi
    16  
    17  import (
    18  	"net/url"
    19  	"strings"
    20  )
    21  
    22  // Allows to cancel a port in request phone number by SID
    23  func (c *ApiService) DeletePortingPortInPhoneNumber(PortInRequestSid string, PhoneNumberSid string) error {
    24  	path := "/v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}"
    25  	path = strings.Replace(path, "{"+"PortInRequestSid"+"}", PortInRequestSid, -1)
    26  	path = strings.Replace(path, "{"+"PhoneNumberSid"+"}", PhoneNumberSid, -1)
    27  
    28  	data := url.Values{}
    29  	headers := make(map[string]interface{})
    30  
    31  	resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
    32  	if err != nil {
    33  		return err
    34  	}
    35  
    36  	defer resp.Body.Close()
    37  
    38  	return nil
    39  }