Class: WsCee::Client
- Inherits:
-
Object
- Object
- WsCee::Client
- Defined in:
- lib/ws_cee_client.rb
Constant Summary collapse
- WS_CEE_TESTING_URL =
'https://source.bisnode.cz/services/cee_fix/v001/soap?wsdl'- WS_CEE_PRODUCTION_URL =
'https://source.bisnode.cz/services/cee/v001/soap?wsdl'
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#savon ⇒ Object
readonly
Returns the value of attribute savon.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #cause_detail(options) ⇒ Object
- #find_by_company(company_details) ⇒ Object
- #find_by_person(person_details) ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ws_cee_client.rb', line 20 def initialize(={}) @username = [:username] @password = [:password] @proxy = [:proxy].to_s = { wsdl: ([:testing] ? WS_CEE_TESTING_URL : WS_CEE_PRODUCTION_URL) } .merge!({ proxy: @proxy }) if !@proxy.nil? && !@proxy.empty? @savon = Savon.client rescue *SAVON_ERRORS => e raise WsCee::ConnectionError, e. end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
16 17 18 |
# File 'lib/ws_cee_client.rb', line 16 def password @password end |
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
17 18 19 |
# File 'lib/ws_cee_client.rb', line 17 def proxy @proxy end |
#savon ⇒ Object (readonly)
Returns the value of attribute savon.
18 19 20 |
# File 'lib/ws_cee_client.rb', line 18 def savon @savon end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
15 16 17 |
# File 'lib/ws_cee_client.rb', line 15 def username @username end |
Instance Method Details
#cause_detail(options) ⇒ Object
41 42 43 |
# File 'lib/ws_cee_client.rb', line 41 def cause_detail() detail [:cause_code] end |
#find_by_company(company_details) ⇒ Object
33 34 35 |
# File 'lib/ws_cee_client.rb', line 33 def find_by_company(company_details) company_indication company_details end |
#find_by_person(person_details) ⇒ Object
37 38 39 |
# File 'lib/ws_cee_client.rb', line 37 def find_by_person(person_details) person_indication person_details end |