Class: SigepWeb::RequestLabels
- Inherits:
-
WebServiceInterfaceApi
- Object
- WebServiceInterfaceApi
- SigepWeb::RequestLabels
- Defined in:
- lib/sigep_web/request_labels.rb
Instance Method Summary collapse
-
#initialize(receiver_type:, identifier:, id_service:, qt_labels:) ⇒ RequestLabels
constructor
A new instance of RequestLabels.
- #request ⇒ Object
Methods inherited from WebServiceInterfaceApi
Constructor Details
#initialize(receiver_type:, identifier:, id_service:, qt_labels:) ⇒ RequestLabels
Returns a new instance of RequestLabels.
5 6 7 8 9 10 11 12 |
# File 'lib/sigep_web/request_labels.rb', line 5 def initialize(receiver_type:, identifier:, id_service:, qt_labels:) @receiver_type = receiver_type @identifier = identifier @id_service = id_service @qt_labels = qt_labels super() end |
Instance Method Details
#request ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/sigep_web/request_labels.rb', line 14 def request authenticate = SigepWeb.configuration.authenticate response = process( :solicita_etiquetas, tipoDestinatario: receiver_type, identificador: identifier, idServico: id_service, qtdEtiquetas: qt_labels, usuario: authenticate.user, senha: authenticate.password ).to_hash[:solicita_etiquetas_response][:return] {success: true, response: build_label_array(response)} rescue Savon::SOAPFault => e {success: false, error: e.} end |