Class: IssueCentre::CustomerConnection
- Inherits:
-
GenericConnection
- Object
- Savon::Client
- GenericConnection
- IssueCentre::CustomerConnection
- Defined in:
- lib/issue_centre/customer_connection.rb
Instance Method Summary collapse
-
#get_companies(session_key, wildcard = '') ⇒ Array
Return companies from IssueCentre for this contract.
-
#get_contacts(session_key, company_id = 0, wildcard = '') ⇒ Array
Return contacts from IssueCentre for this contract.
-
#get_countries(session_key) ⇒ Array
Return countries from IssueCentre for this contract.
-
#initialize(customer_url, session_key, options = {}) ⇒ CustomerConnection
constructor
Connection client for authenticating and retrieving customer information from IssueCentre.
Constructor Details
#initialize(customer_url, session_key, options = {}) ⇒ CustomerConnection
Connection client for authenticating and retrieving customer information from IssueCentre
14 15 16 17 |
# File 'lib/issue_centre/customer_connection.rb', line 14 def initialize( customer_url, session_key, = {}) # @session_key = session_key super( customer_url, ) end |
Instance Method Details
#get_companies(session_key, wildcard = '') ⇒ Array
Return companies from IssueCentre for this contract
30 31 32 33 34 35 36 |
# File 'lib/issue_centre/customer_connection.rb', line 30 def get_companies( session_key, wildcard = '') response_xml = self.call( :get_companies, message: { arg0: session_key, arg1: wildcard }) response = IssueCentre::Response.parse( response_xml) end |
#get_contacts(session_key, company_id = 0, wildcard = '') ⇒ Array
Return contacts from IssueCentre for this contract
53 54 55 56 57 58 59 60 |
# File 'lib/issue_centre/customer_connection.rb', line 53 def get_contacts( session_key, company_id = 0, wildcard = '') response_xml = self.call( :get_contacts, message: { arg0: session_key, arg1: company_id, arg2: wildcard }) response = IssueCentre::Response.parse( response_xml) end |
#get_countries(session_key) ⇒ Array
Return countries from IssueCentre for this contract
69 70 71 72 73 74 75 |
# File 'lib/issue_centre/customer_connection.rb', line 69 def get_countries( session_key) response_xml = self.call( :get_countries, message: { arg0: session_key, arg1: '' }) response = IssueCentre::Response.parse( response_xml) end |