Class: BrNfe::Service::Simpliss::V1::Base
- Inherits:
-
Base
- Object
- ActiveModelBase
- Base
- Base
- BrNfe::Service::Simpliss::V1::Base
- Defined in:
- lib/br_nfe/service/simpliss/v1/base.rb
Direct Known Subclasses
CancelaNfse, ConsultaLoteRps, ConsultaNfsPorRps, ConsultaNfse, RecepcaoLoteRps
Instance Attribute Summary
Attributes inherited from Base
#ibge_code_of_issuer_city, #password, #username
Attributes inherited from Base
#certificate_pkcs12_password, #certificate_pkcs12_path, #certificate_pkcs12_value, #client_wsdl_ssl_cert_file, #client_wsdl_ssl_cert_key_file, #client_wsdl_ssl_cert_key_password, #client_wsdl_ssl_verify_mode, #env
Instance Method Summary collapse
- #canonicalization_method_algorithm ⇒ Object
-
#content_xml ⇒ Object
Método é sobrescrito para atender o padrão do órgão emissor.
- #message_namespaces ⇒ Object
- #namespace_for_signature ⇒ Object
- #namespace_for_tags ⇒ Object
- #namespace_identifier ⇒ Object
-
#soap_body_root_tag ⇒ Object
Método que deve ser sobrescrito em cada subclass.
- #soap_namespaces ⇒ Object
- #wsdl ⇒ Object
-
#xml_current_dir_path ⇒ Object
Declaro que o método ‘render_xml` irá verificar os arquivos também presentes no diretório especificado.
Methods inherited from Base
#body_xml_path, #id_attribute?, #nfse_xml_path, #request, #response_root_path, #set_response
Methods included from Helper::ValuesTs::ServiceV1
#ts_aliquota, #ts_art, #ts_bairro, #ts_cep, #ts_cnpj, #ts_codigo_cancelamento_nfse, #ts_codigo_cnae, #ts_codigo_mensagem_alerta, #ts_codigo_municipio_ibge, #ts_codigo_obra, #ts_codigo_tributacao, #ts_codigo_verificacao, #ts_complemento_endereco, #ts_cpf, #ts_date, #ts_datetime, #ts_descricao_mensagem_alerta, #ts_discriminacao, #ts_email, #ts_endereco, #ts_id_tag, #ts_indicacao_cpf_cnpj, #ts_inscricao_municipal, #ts_item_lista_servico, #ts_natureza_operacao, #ts_nome_fantasia, #ts_numero_endereco, #ts_numero_lote, #ts_numero_nfse, #ts_numero_protocolo, #ts_numero_rps, #ts_outras_informacoes, #ts_quantidade_rps, #ts_razao_social, #ts_regime_especial_tributacao, #ts_serie_rps, #ts_sim_nao, #ts_situacao_lote_rps, #ts_status_nfse, #ts_status_rps, #ts_telefone, #ts_tipo_rps, #ts_uf, #ts_valor
Methods inherited from Base
#certificado_obrigatorio?, #certificate, #certificate=, #certificate_key, #certificate_key=, #certificate_pkcs12, #certificate_pkcs12=, #client_wsdl, #env_namespace, #find_xml, #get_xml_dirs, #method_wsdl, #original_response, #render_xml, #response, #response_encoding, #sign_xml, #signature_type, #signature_type?, #soap_xml, #tag_xml, #wsdl_encoding, #xml_builder, #xml_default_dir_path, #xml_version
Methods included from Helper::HaveEmitente
Methods inherited from ActiveModelBase
#assign_attributes, #default_values, #initialize
Constructor Details
This class inherits a constructor from BrNfe::ActiveModelBase
Instance Method Details
#canonicalization_method_algorithm ⇒ Object
24 25 26 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 24 def canonicalization_method_algorithm 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315' end |
#content_xml ⇒ Object
Método é sobrescrito para atender o padrão do órgão emissor. Deve ser enviado o XML da requsiução dentro da tag CDATA seguindo a estrutura requerida.
<b><Tipo de retorno: /b> String XML
69 70 71 72 73 74 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 69 def content_xml dados = "<ns3:#{soap_body_root_tag}>" dados += xml_builder.html_safe dados += "</ns3:#{soap_body_root_tag}>" dados end |
#message_namespaces ⇒ Object
28 29 30 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 28 def {} end |
#namespace_for_signature ⇒ Object
49 50 51 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 49 def namespace_for_signature 'ns2:' end |
#namespace_for_tags ⇒ Object
45 46 47 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 45 def 'ns1:' end |
#namespace_identifier ⇒ Object
41 42 43 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 41 def namespace_identifier 'ns3:' end |
#soap_body_root_tag ⇒ Object
Método que deve ser sobrescrito em cada subclass. É utilizado para saber qual a tag root de cada requisição
<b><Tipo de retorno: /b> String
58 59 60 61 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 58 def soap_body_root_tag # 'recepcionarLoteRps' < Exemplo raise "Deve ser sobrescrito nas subclasses" end |
#soap_namespaces ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 32 def soap_namespaces super.merge({ 'xmlns:ns1' => "http://www.sistema.com.br/Nfse/arquivos/nfse_3.xsd", 'xmlns:ns2' => "http://www.w3.org/2000/09/xmldsig#", 'xmlns:ns3' => "http://www.sistema.com.br/Sistema.Ws.Nfse", 'xmlns:ns4' => "http://www.sistema.com.br/Sistema.Ws.Nfse.Cn" }) end |
#wsdl ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 7 def wsdl if env == :test 'http://wshomologacao.simplissweb.com.br/nfseservice.svc?wsdl' elsif ibge_code_of_issuer_city == '4202008' # Balneário Camboriú 'http://wsbalneariocamboriu.simplissweb.com.br/nfseservice.svc?wsdl' end end |
#xml_current_dir_path ⇒ Object
Declaro que o método ‘render_xml` irá verificar os arquivos também presentes no diretório especificado
Tipo de retorno: Array
20 21 22 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 20 def xml_current_dir_path ["#{BrNfe.root}/lib/br_nfe/service/simpliss/v1/xml"]+super end |