// Update an existing End User.
Update an existing End User.
// Update an existing End User .
func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*TrusthubV1EndUser, error) {
	path := "/v1/EndUsers/{Sid}"
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Attributes != nil {
		v, err := json.Marshal(params.Attributes)
		if err != nil {
			return nil, err
		}
		data.Set("Attributes", string(v))
	}
	if params != nil && params.FriendlyName != nil {
		data.Set("FriendlyName", *params.FriendlyName)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &TrusthubV1EndUser{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) UpdateEndUser ( Sid string , params * UpdateEndUserParams ) ( * TrusthubV1EndUser , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , Sid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . Attributes != nil { v , err := json . Marshal ( params . Attributes ) if err != nil { return nil , err } data . Set ( " " , string ( v ) ) } if params != nil && params . FriendlyName != nil { data . Set ( " " , * params . FriendlyName ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & TrusthubV1EndUser { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Update an existing End User.
Update an existing End User .