Class: Flexipass::Company

Inherits:
Object
  • Object
show all
Defined in:
lib/flexipass/company.rb

Overview

Represents a company in the Flexipass system.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Company

Initializes a new instance of the Company class.

Parameters:

  • client (Object)

    The client object used to communicate with the Flexipass API.



7
8
9
# File 'lib/flexipass/company.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#detailsHash

Retrieves the details of the company.

Returns:

  • (Hash)

    The company details.



14
15
16
# File 'lib/flexipass/company.rb', line 14

def details
  @client.send_request('GET', '/Flexipass/rest/webapi/getCompanyDetails')
end

#permissionsArray

Retrieves the permissions list for the company.

Returns:

  • (Array)

    The list of permissions.



21
22
23
# File 'lib/flexipass/company.rb', line 21

def permissions
  @client.send_request('GET', '/Flexipass/rest/webapi/getPermissionList')
end