Class: TFSO::Client

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/tfso/client.rb

Constant Summary collapse

URL =
'https://api.24sevenoffice.com/Client/V001/ClientService.asmx?WSDL'

Instance Method Summary collapse

Methods included from Helpers

#ensure_authenticated, #intialize_savon_client, #savon_client, #session_id, #session_id=

Constructor Details

#initialize(auth) ⇒ Client

Returns a new instance of Client.



8
9
10
11
12
# File 'lib/tfso/client.rb', line 8

def initialize(auth)
  ensure_authenticated(auth)
  self.session_id = auth.session_id
  intialize_savon_client
end

Instance Method Details

#type_groups(module_type) ⇒ Object



14
15
16
17
# File 'lib/tfso/client.rb', line 14

def type_groups(module_type)
  response = savon_client.call(:get_type_group_list, message: {module_type: module_type}, cookies: @cookies)
  response.body[:get_type_group_list_response][:get_type_group_list_result]
end