Class: BrNfe::Endereco
- Inherits:
-
ActiveModelBase
- Object
- ActiveModelBase
- BrNfe::Endereco
- Defined in:
- lib/br_nfe/endereco.rb
Instance Attribute Summary collapse
-
#bairro ⇒ Object
Returns the value of attribute bairro.
-
#cep ⇒ Object
Returns the value of attribute cep.
-
#codigo_municipio ⇒ Object
IBGE.
-
#codigo_pais ⇒ Object
defaul: 1058 (Brasil).
-
#complemento ⇒ Object
Returns the value of attribute complemento.
-
#logradouro ⇒ Object
Returns the value of attribute logradouro.
-
#nome_municipio ⇒ Object
Returns the value of attribute nome_municipio.
-
#nome_pais ⇒ Object
defaul: BRASIL.
-
#numero ⇒ Object
Returns the value of attribute numero.
-
#uf ⇒ Object
Returns the value of attribute uf.
Instance Method Summary collapse
Methods inherited from ActiveModelBase
#assign_attributes, #initialize
Constructor Details
This class inherits a constructor from BrNfe::ActiveModelBase
Instance Attribute Details
#bairro ⇒ Object
Returns the value of attribute bairro.
14 15 16 |
# File 'lib/br_nfe/endereco.rb', line 14 def bairro @bairro end |
#cep ⇒ Object
Returns the value of attribute cep.
18 19 20 |
# File 'lib/br_nfe/endereco.rb', line 18 def cep @cep end |
#codigo_municipio ⇒ Object
IBGE
16 17 18 |
# File 'lib/br_nfe/endereco.rb', line 16 def codigo_municipio @codigo_municipio end |
#codigo_pais ⇒ Object
defaul: 1058 (Brasil)
19 20 21 |
# File 'lib/br_nfe/endereco.rb', line 19 def codigo_pais @codigo_pais end |
#complemento ⇒ Object
Returns the value of attribute complemento.
13 14 15 |
# File 'lib/br_nfe/endereco.rb', line 13 def complemento @complemento end |
#logradouro ⇒ Object
Returns the value of attribute logradouro.
11 12 13 |
# File 'lib/br_nfe/endereco.rb', line 11 def logradouro @logradouro end |
#nome_municipio ⇒ Object
Returns the value of attribute nome_municipio.
15 16 17 |
# File 'lib/br_nfe/endereco.rb', line 15 def nome_municipio @nome_municipio end |
#nome_pais ⇒ Object
defaul: BRASIL
20 21 22 |
# File 'lib/br_nfe/endereco.rb', line 20 def nome_pais @nome_pais end |
#numero ⇒ Object
Returns the value of attribute numero.
12 13 14 |
# File 'lib/br_nfe/endereco.rb', line 12 def numero @numero end |
#uf ⇒ Object
Returns the value of attribute uf.
17 18 19 |
# File 'lib/br_nfe/endereco.rb', line 17 def uf @uf end |
Instance Method Details
#default_values ⇒ Object
4 5 6 7 8 9 |
# File 'lib/br_nfe/endereco.rb', line 4 def default_values { codigo_pais: '1058', nome_pais: 'BRASIL' } end |
#is_present? ⇒ Boolean
24 25 26 27 28 |
# File 'lib/br_nfe/endereco.rb', line 24 def is_present? logradouro.present? || numero.present? || complemento.present? || bairro.present? || nome_municipio.present? || codigo_municipio.present? || cep.present? end |