// Updates a Customer-Profile in an account.
Updates a Customer-Profile in an account.
// Updates a Customer - Profile in an account .
func (c *DefaultApiService) UpdateCustomerProfile(Sid string, params *UpdateCustomerProfileParams) (*TrusthubV1CustomerProfile, error) {
	path := "/v1/CustomerProfiles/{Sid}"
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Email != nil {
		data.Set("Email", *params.Email)
	}
	if params != nil && params.FriendlyName != nil {
		data.Set("FriendlyName", *params.FriendlyName)
	}
	if params != nil && params.Status != nil {
		data.Set("Status", *params.Status)
	}
	if params != nil && params.StatusCallback != nil {
		data.Set("StatusCallback", *params.StatusCallback)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &TrusthubV1CustomerProfile{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) UpdateCustomerProfile ( Sid string , params * UpdateCustomerProfileParams ) ( * TrusthubV1CustomerProfile , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , Sid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . Email != nil { data . Set ( " " , * params . Email ) } if params != nil && params . FriendlyName != nil { data . Set ( " " , * params . FriendlyName ) } if params != nil && params . Status != nil { data . Set ( " " , * params . Status ) } if params != nil && params . StatusCallback != nil { data . Set ( " " , * params . StatusCallback ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & TrusthubV1CustomerProfile { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Updates a Customer-Profile in an account.
Updates a Customer - Profile in an account .