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
Attributes inherited from Base
#certificate_pkcs12_password, #certificate_pkcs12_path, #certificate_pkcs12_value, #env, #ibge_code_of_issuer_city, #ibge_code_of_issuer_uf
Attributes inherited from ActiveModelBase
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, #nfse_xml_path, #request, #response_root_path
Methods included from Concerns::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, #env_test?, #find_xml, #get_xml_dirs, #id_attribute?, #method_wsdl, #original_response, #render_xml, #response, #response_encoding, #sign_xml, #signature_type, #signature_type?, #soap_xml, #ssl_request?, #ssl_version, #tag_xml, #wsdl_encoding, #xml_builder, #xml_default_dir_path, #xml_version
Methods included from Association::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
26 27 28 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 26 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
71 72 73 74 75 76 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 71 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
30 31 32 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 30 def {} end |
#namespace_for_signature ⇒ Object
51 52 53 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 51 def namespace_for_signature 'ns2:' end |
#namespace_for_tags ⇒ Object
47 48 49 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 47 def 'ns1:' end |
#namespace_identifier ⇒ Object
43 44 45 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 43 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
60 61 62 63 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 60 def soap_body_root_tag # 'recepcionarLoteRps' < Exemplo raise "Deve ser sobrescrito nas subclasses" end |
#soap_namespaces ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 34 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 14 15 |
# 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' else # Se não encontrar a cidade pega por padrão o WS de homologação 'http://wshomologacao.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
22 23 24 |
# File 'lib/br_nfe/service/simpliss/v1/base.rb', line 22 def xml_current_dir_path ["#{BrNfe.root}/lib/br_nfe/service/simpliss/v1/xml"]+super end |