Class: IssueCentre::ContractConnection

Inherits:
GenericConnection show all
Defined in:
lib/issue_centre/contract_connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(customer_url, session_key, options = {}) ⇒ CustomerConnection

Connection client for authenticating and retrieving contract information from IssueCentre

Parameters:



16
17
18
19
# File 'lib/issue_centre/contract_connection.rb', line 16

def initialize( customer_url, session_key, options = {})
  #      @session_key = session_key
  super( customer_url, options)
end

Instance Method Details

#get_agents(session_key, agent_id) ⇒ Array

Return all agents from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

  • agent_id (Integer)

    Agent ID for the contract (0 returns all)

Returns:

  • (Array)

    An array of events and details as hashes



30
31
32
33
34
35
36
# File 'lib/issue_centre/contract_connection.rb', line 30

def get_agents( session_key, agent_id)
  response_xml = self.call( :get_agents, message: {
                              arg0: session_key,
                              arg1: agent_id
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_error_types(session_key) ⇒ Array

Return all error types from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of error types and details as hashes



45
46
47
48
49
50
# File 'lib/issue_centre/contract_connection.rb', line 45

def get_error_types( session_key)
  response_xml = self.call( :get_error_types, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_event_types(session_key) ⇒ Array

Return all event types from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of events and details as hashes



59
60
61
62
63
64
# File 'lib/issue_centre/contract_connection.rb', line 59

def get_event_types( session_key)
  response_xml = self.call( :get_event_types, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_priorities(session_key) ⇒ Array

Return all priorities from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of priorities and details as hashes



73
74
75
76
77
78
# File 'lib/issue_centre/contract_connection.rb', line 73

def get_priorities( session_key)
  response_xml = self.call( :get_error_types, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_products(session_key) ⇒ Array

Return all products from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of products and details as hashes



87
88
89
90
91
92
# File 'lib/issue_centre/contract_connection.rb', line 87

def get_products( session_key)
  response_xml = self.call( :get_products, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_received_bymethods(session_key) ⇒ Array

Return all ‘received by’ methods from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of ‘received by’ methods and details as hashes



129
130
131
132
133
134
# File 'lib/issue_centre/contract_connection.rb', line 129

def get_received_bymethods( session_key)
  response_xml = self.call( :get_received_bymethods, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_status_types(session_key) ⇒ Array

Return all status types from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of statuses and details as hashes



115
116
117
118
119
120
# File 'lib/issue_centre/contract_connection.rb', line 115

def get_status_types( session_key)
  response_xml = self.call( :get_status_types, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_summary_details(session_key) ⇒ Array

Return ticket summary details from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of summary details as hashes



143
144
145
146
147
148
# File 'lib/issue_centre/contract_connection.rb', line 143

def get_summary_details( session_key)
  response_xml = self.call( :get_summary_details, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end

#get_vendors(session_key) ⇒ Array

Return all vendors from IssueCentre for this contract

Parameters:

  • session_key (String)

    SessionKey object

Returns:

  • (Array)

    An array of vendors and details as hashes



101
102
103
104
105
106
# File 'lib/issue_centre/contract_connection.rb', line 101

def get_vendors( session_key)
  response_xml = self.call( :get_vendors, message: {
                              arg0: session_key
                            })
  response = IssueCentre::Response.parse( response_xml)
end