Class: SigepWeb::RequestXmlPlp
- Inherits:
-
WebServiceInterfaceApi
- Object
- WebServiceInterfaceApi
- SigepWeb::RequestXmlPlp
- Defined in:
- lib/sigep_web/request_xml_plp.rb
Instance Method Summary collapse
-
#initialize(id_plp:) ⇒ RequestXmlPlp
constructor
A new instance of RequestXmlPlp.
- #request ⇒ Object
Methods inherited from WebServiceInterfaceApi
Constructor Details
#initialize(id_plp:) ⇒ RequestXmlPlp
Returns a new instance of RequestXmlPlp.
5 6 7 8 9 |
# File 'lib/sigep_web/request_xml_plp.rb', line 5 def initialize(id_plp:) @id_plp = id_plp super() end |
Instance Method Details
#request ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/sigep_web/request_xml_plp.rb', line 11 def request authenticate = SigepWeb.configuration.authenticate response = process(:solicita_xml_plp, idPlpMaster: id_plp, usuario: authenticate.user, senha: authenticate.password ).to_hash[:solicita_xml_plp_response][:return] { success: true, response: response } rescue Savon::SOAPFault => e { success: false, error: e. } end |