Class: GpWebpay::Ws::Echo
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #call ⇒ Object
- #client ⇒ Object
-
#initialize ⇒ Echo
constructor
A new instance of Echo.
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
16 17 18 |
# File 'lib/gp_webpay/ws/echo.rb', line 16 def config @config end |
Instance Method Details
#call ⇒ Object
23 24 25 26 27 28 |
# File 'lib/gp_webpay/ws/echo.rb', line 23 def call res = client.call(:echo) res.body && res.body[:echo_response].present? rescue Savon::HTTPError, Savon::SOAPFault false end |
#client ⇒ Object
30 31 32 |
# File 'lib/gp_webpay/ws/echo.rb', line 30 def client @client ||= Savon.client(wsdl: config.wsdl_file, endpoint: config.ws_url, pretty_print_xml: true) end |