// Update a specific Session.
Update a specific Session.
// Update a specific Session .
func (c *DefaultApiService) UpdateSession(ServiceSid string, Sid string, params *UpdateSessionParams) (*ProxyV1ServiceSession, error) {
	path := "/v1/Services/{ServiceSid}/Sessions/{Sid}"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.DateExpiry != nil {
		data.Set("DateExpiry", fmt.Sprint((*params.DateExpiry).Format(time.RFC3339)))
	}
	if params != nil && params.FailOnParticipantConflict != nil {
		data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict))
	}
	if params != nil && params.Status != nil {
		data.Set("Status", *params.Status)
	}
	if params != nil && params.Ttl != nil {
		data.Set("Ttl", fmt.Sprint(*params.Ttl))
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ProxyV1ServiceSession{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) UpdateSession ( ServiceSid string , Sid string , params * UpdateSessionParams ) ( * ProxyV1ServiceSession , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , ServiceSid , - 1 ) path = strings . Replace ( path , " " + " " + " " , Sid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . DateExpiry != nil { data . Set ( " " , fmt . Sprint ( ( * params . DateExpiry ) . Format ( time . RFC3339 ) ) ) } if params != nil && params . FailOnParticipantConflict != nil { data . Set ( " " , fmt . Sprint ( * params . FailOnParticipantConflict ) ) } if params != nil && params . Status != nil { data . Set ( " " , * params . Status ) } if params != nil && params . Ttl != nil { data . Set ( " " , fmt . Sprint ( * params . Ttl ) ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & ProxyV1ServiceSession { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Update a specific Session.
Update a specific Session .