func (c *DefaultApiService) CreateTrustProductEntityAssignment(TrustProductSid string, params *CreateTrustProductEntityAssignmentParams) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) {
	path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments"
	path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1)

	data := url.Values{}
	headers := make(map[string]interface{})

	if params != nil && params.ObjectSid != nil {
		data.Set("ObjectSid", *params.ObjectSid)
	}

	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}

	defer resp.Body.Close()

	ps := &TrusthubV1TrustProductTrustProductEntityAssignment{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}

	return ps, err
}
// Create a new Assigned Item.
Create a new Assigned Item.
// Create a new Assigned Item .
func (c *DefaultApiService) CreateTrustProductEntityAssignment(TrustProductSid string, params *CreateTrustProductEntityAssignmentParams) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) {
	path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments"
	path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.ObjectSid != nil {
		data.Set("ObjectSid", *params.ObjectSid)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &TrusthubV1TrustProductTrustProductEntityAssignment{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) CreateTrustProductEntityAssignment ( TrustProductSid string , params * CreateTrustProductEntityAssignmentParams ) ( * TrusthubV1TrustProductTrustProductEntityAssignment , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , TrustProductSid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . ObjectSid != nil { data . Set ( " " , * params . ObjectSid ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & TrusthubV1TrustProductTrustProductEntityAssignment { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Create a new Assigned Item.
Create a new Assigned Item .