func (i *InvitesClient) List(ctx context.Context, orgID *identity.ID, states []string) ([]InviteResult, error) {
	v := &url.Values{}
	v.Set("org_id", orgID.String())

	for _, state := range states {
		v.Add("state", state)
	}

	req, _, err := i.client.NewRequest("GET", "/org-invites", v, nil, true)
	if err != nil {
		return nil, err
	}

	invites := []InviteResult{}
	_, err = i.client.Do(ctx, req, &invites, nil, nil)
	return invites, err
}
// List all invites for a given org
List all invites for a given org
// List all invites for a given org
func (i *InvitesClient) List(ctx context.Context, orgID *identity.ID, states []string) ([]InviteResult, error) {
	v := &url.Values{}
	v.Set("org_id", orgID.String())
	for _, state := range states {
		v.Add("state", state)
	}
	req, _, err := i.client.NewRequest("GET", "/org-invites", v, nil, true)
	if err != nil {
		return nil, err
	}
	invites := []InviteResult{}
	_, err = i.client.Do(ctx, req, &invites, nil, nil)
	return invites, err
}
func ( i * InvitesClient ) List ( ctx context . Context , orgID * identity . ID , states [ ] string ) ( [ ] InviteResult , error ) { v := & url . Values { } v . Set ( " " , orgID . String ( ) ) for _ , state := range states { v . Add ( " " , state ) } req , _ , err := i . client . NewRequest ( " " , " " , v , nil , true ) if err != nil { return nil , err } invites := [ ] InviteResult { } _ , err = i . client . Do ( ctx , req , & invites , nil , nil ) return invites , err }
List all invites for a given org
List all invites for a given org