Class: SnapDeploy::Provider::Heroku::API::OrganizationMember

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.rb

Overview

An organization member is an individual with access to an organization.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationMember

Returns a new instance of OrganizationMember.



1227
1228
1229
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1227

def initialize(client)
  @client = client
end

Instance Method Details

#create_or_update(organization_name, body) ⇒ Object

Create a new organization member, or update their role.

Parameters:

  • organization_name:

    unique name of organization

  • body:

    the object to pass as the request payload



1235
1236
1237
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1235

def create_or_update(organization_name, body)
  @client.organization_member.create_or_update(organization_name, body)
end

#delete(organization_name, organization_member_email) ⇒ Object

Remove a member from the organization.

Parameters:

  • organization_name:

    unique name of organization

  • organization_member_email:

    email address of the organization member



1243
1244
1245
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1243

def delete(organization_name, organization_member_email)
  @client.organization_member.delete(organization_name, organization_member_email)
end

#list(organization_name) ⇒ Object

List members of the organization.

Parameters:

  • organization_name:

    unique name of organization



1250
1251
1252
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1250

def list(organization_name)
  @client.organization_member.list(organization_name)
end