Class: SigepWeb::RequestLabels
- Inherits:
-
WebServiceInterfaceApi
- Object
- WebServiceInterfaceApi
- SigepWeb::RequestLabels
- Defined in:
- lib/sigep_web/request_labels.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RequestLabels
constructor
A new instance of RequestLabels.
- #request ⇒ Object
Methods inherited from WebServiceInterfaceApi
Constructor Details
#initialize(options = {}) ⇒ RequestLabels
Returns a new instance of RequestLabels.
3 4 5 6 7 8 9 |
# File 'lib/sigep_web/request_labels.rb', line 3 def initialize( = {}) @receiver_type = [:receiver_type] @identifier = [:identifier] @id_service = [:id_service] @qt_labels = [:qt_labels] super() end |
Instance Method Details
#request ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/sigep_web/request_labels.rb', line 11 def request authenticate = SigepWeb.configuration.authenticate begin 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] build_label_array(response) rescue Savon::SOAPFault => msg msg end end |