Class: Braintrust::Resources::Organizations::Members

Inherits:
Object
  • Object
show all
Defined in:
lib/braintrust/resources/organizations/members.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Members

Returns a new instance of Members.



7
8
9
# File 'lib/braintrust/resources/organizations/members.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#update(params = {}, opts = {}) ⇒ Braintrust::Models::PatchOrganizationMembersOutput

Modify organization membership

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :invite_users (InviteUsers)

    Users to invite to the organization

  • :org_id (String)

    For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, or in case you want to explicitly assert the organization you are modifying, you may specify the id of the organization.

  • :org_name (String)

    For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, or in case you want to explicitly assert the organization you are modifying, you may specify the name of the organization.

  • :remove_users (RemoveUsers)

    Users to remove from the organization

Returns:



28
29
30
31
32
33
34
35
# File 'lib/braintrust/resources/organizations/members.rb', line 28

def update(params = {}, opts = {})
  req = {}
  req[:method] = :patch
  req[:path] = "/v1/organization/members"
  req[:body] = params
  req[:model] = Braintrust::Models::PatchOrganizationMembersOutput
  @client.request(req, opts)
end