Class: BrNfe::Service::Response::Build::ConsultaSituacaoLoteRps
- Inherits:
-
Base
- Object
- ActiveModelBase
- Base
- BrNfe::Service::Response::Build::ConsultaSituacaoLoteRps
- Defined in:
- lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb
Instance Attribute Summary collapse
-
#lot_number_path ⇒ Object
o numero do lote.
-
#situation_key_values ⇒ Object
Returns the value of attribute situation_key_values.
-
#situation_path ⇒ Object
a situação do lote rps.
Attributes inherited from Base
#body_xml_path, #keys_root_path, #message_code_key, #message_errors_path, #message_msg_key, #message_solution_key, #savon_response, #xml_encode
Attributes inherited from ActiveModelBase
Instance Method Summary collapse
- #default_values ⇒ Object
-
#get_situation ⇒ Object
Método utilizado para pegar a situação do RPS.
-
#response ⇒ Object
FIM DA DEFINIÇÃO DOS CAMINHOS ############################.
Methods inherited from Base
#body_converted_to_xml, #find_value_for_keys, #get_lot_number, #get_message_for_hash, #get_message_for_path, #path_with_root, #savon_body
Methods inherited from ActiveModelBase
#assign_attributes, #initialize
Constructor Details
This class inherits a constructor from BrNfe::ActiveModelBase
Instance Attribute Details
#lot_number_path ⇒ Object
o numero do lote
10 11 12 |
# File 'lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb', line 10 def lot_number_path @lot_number_path end |
#situation_key_values ⇒ Object
Returns the value of attribute situation_key_values.
15 16 17 |
# File 'lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb', line 15 def situation_key_values @situation_key_values end |
#situation_path ⇒ Object
a situação do lote rps
13 14 15 |
# File 'lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb', line 13 def situation_path @situation_path end |
Instance Method Details
#default_values ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb', line 25 def default_values super.merge({ message_errors_path: [:consultar_situacao_lote_rps_resposta, :lista_mensagem_retorno, :mensagem_retorno], lot_number_path: [:consultar_situacao_lote_rps_resposta, :numero_lote], situation_path: [:consultar_situacao_lote_rps_resposta, :situacao], }) end |
#get_situation ⇒ Object
Método utilizado para pegar a situação do RPS
Tipo de retorno: Symbol
47 48 49 50 51 |
# File 'lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb', line 47 def get_situation situation_value = find_value_for_keys(savon_body, path_with_root(situation_path)) situation_value = situation_key_values[situation_value.to_s.strip] if situation_value.present? situation_value end |
#response ⇒ Object
FIM DA DEFINIÇÃO DOS CAMINHOS ############################
34 35 36 37 38 39 40 41 |
# File 'lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb', line 34 def response @response ||= BrNfe::Service::Response::ConsultaSituacaoLoteRps.new({ error_messages: (), numero_lote: get_lot_number, situation: get_situation, original_xml: savon_response.xml.force_encoding('UTF-8'), }) end |