func (p *PoliciesClient) Create(ctx context.Context, policy *primitive.Policy) (*PoliciesResult, error) {

	ID, err := identity.NewMutable(policy)
	if err != nil {
		return nil, err
	}

	env := envelope.Unsigned{
		ID:      &ID,
		Version: 1,
		Body:    policy,
	}

	req, _, err := p.client.NewRequest("POST", "/policies", nil, env, true)
	if err != nil {
		return nil, err
	}

	res := PoliciesResult{}
	_, err = p.client.Do(ctx, req, &res, nil, nil)
	return &res, err
}
// Create creates a new policy
Create creates a new policy
// Create creates a new policy
func (p *PoliciesClient) Create(ctx context.Context, policy *primitive.Policy) (*PoliciesResult, error) {
	ID, err := identity.NewMutable(policy)
	if err != nil {
		return nil, err
	}
	env := envelope.Unsigned{
		ID:      &ID,
		Version: 1,
		Body:    policy,
	}
	req, _, err := p.client.NewRequest("POST", "/policies", nil, env, true)
	if err != nil {
		return nil, err
	}
	res := PoliciesResult{}
	_, err = p.client.Do(ctx, req, &res, nil, nil)
	return &res, err
}
func ( p * PoliciesClient ) Create ( ctx context . Context , policy * primitive . Policy ) ( * PoliciesResult , error ) { ID , err := identity . NewMutable ( policy ) if err != nil { return nil , err } env := envelope . Unsigned { ID : & ID , Version : 1 , Body : policy , } req , _ , err := p . client . NewRequest ( " " , " " , nil , env , true ) if err != nil { return nil , err } res := PoliciesResult { } _ , err = p . client . Do ( ctx , req , & res , nil , nil ) return & res , err }
Create creates a new policy
Create creates a new policy