module Ruconomic::API

Public Class Methods

connect(agreement, username, password) click to toggle source

Connects to the server.

@see api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=Connect @param agreement [String] The agreement number for the subscription. @param username [String] The user name of the subscription. @param password [String] The password for the user name. @return [String] The token for this connection

# File lib/ruconomic/api.rb, line 72
def self.connect(agreement, username, password)
  response = invoke('Connect') do |message|
    message.add 'agreementNumber', agreement
    message.add 'userName', username
    message.add 'password', password
  end

  response.to_hash[:connect_response][:connect_result]
end
connect_as_administrator() click to toggle source

Connects to the server. Parameters: agreementNumber: The agreement number for the subscription. userName: The user name of the subscription. password: The password for the user name.

@note TODO: This method was autogenerated from the WSDL - see github.com/coherify/ruconomic#contributing“ @see api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=ConnectAsAdministrator @return [Hash] The body content of the SOAP response.

# File lib/ruconomic/api.rb, line 88
def self.connect_as_administrator
  response = invoke('ConnectAsAdministrator') do |message|
    raise "TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
  end
end
connect_as_administrator_with_customer_number() click to toggle source

Connects to the server. Parameters: agreementNumber: The agreement number for the subscription. userName: The user name of the subscription. password: The password for the user name. customerNumber: the internal adminCustomerNumber

@note TODO: This method was autogenerated from the WSDL - see github.com/coherify/ruconomic#contributing“ @see api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=ConnectAsAdministratorWithCustomerNumber @return [Hash] The body content of the SOAP response.

# File lib/ruconomic/api.rb, line 100
def self.connect_as_administrator_with_customer_number
  response = invoke('ConnectAsAdministratorWithCustomerNumber') do |message|
    raise "TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
  end
end
connect_with_token(token, app_token) click to toggle source

Connects to the server. @params token [String]: The agreement grant token provided Parameters: app_token [String]: The application secret token provided.

@see api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=ConnectWithToken @return [Hash] The body content of the SOAP response.

# File lib/ruconomic/api.rb, line 112
def self.connect_with_token(token, app_token)
  response = invoke('ConnectWithToken') do |message|
    message.add 'token', token
    message.add 'appToken', app_token
  end

  response.to_hash[:connect_with_token_response][:connect_with_token_result]
end
disconnect() click to toggle source

Disconnects from the server.

@see api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=Disconnect @return [String] The result of the disconnect operation

# File lib/ruconomic/api.rb, line 125
def self.disconnect
  response = invoke('Disconnect')
  response.to_hash[:disconnect_response][:disconnect_result]
end
get_api_information() click to toggle source

Gets information about the e-conomic API.

@see api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=GetApiInformation @return [String] The API version

# File lib/ruconomic/api.rb, line 134
def self.get_api_information
  response = invoke('GetApiInformation')

  response.to_hash[:get_api_information_response][:get_api_information_result]
end