Class: TinyErpApi::Address
- Inherits:
-
Object
- Object
- TinyErpApi::Address
- Defined in:
- lib/tiny_erp_api/address.rb
Instance Attribute Summary collapse
-
#bairro ⇒ Object
readonly
Returns the value of attribute bairro.
-
#cep ⇒ Object
readonly
Returns the value of attribute cep.
-
#complemento ⇒ Object
readonly
Returns the value of attribute complemento.
-
#cpf_cnpj ⇒ Object
readonly
Returns the value of attribute cpf_cnpj.
-
#endereco ⇒ Object
readonly
Returns the value of attribute endereco.
-
#endereco_numero ⇒ Object
readonly
Returns the value of attribute endereco_numero.
-
#fone ⇒ Object
readonly
Returns the value of attribute fone.
-
#ie ⇒ Object
readonly
Returns the value of attribute ie.
-
#municipio ⇒ Object
readonly
Returns the value of attribute municipio.
-
#nome_destinatario ⇒ Object
readonly
Returns the value of attribute nome_destinatario.
-
#tipo_pessoa ⇒ Object
readonly
Returns the value of attribute tipo_pessoa.
-
#uf ⇒ Object
readonly
Returns the value of attribute uf.
Instance Method Summary collapse
-
#initialize(endereco:, uf:, endereco_numero: nil, complemento: nil, bairro: nil, municipio: nil, cep: nil, fone: nil, nome_destinatario: nil, cpf_cnpj: nil, tipo_pessoa: nil, ie: nil) ⇒ Address
constructor
A new instance of Address.
- #to_api_hash ⇒ Object
Constructor Details
#initialize(endereco:, uf:, endereco_numero: nil, complemento: nil, bairro: nil, municipio: nil, cep: nil, fone: nil, nome_destinatario: nil, cpf_cnpj: nil, tipo_pessoa: nil, ie: nil) ⇒ Address
Returns a new instance of Address.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tiny_erp_api/address.rb', line 5 def initialize(endereco:, uf:, endereco_numero: nil, complemento: nil, bairro: nil, municipio: nil, cep: nil, fone: nil, nome_destinatario: nil, cpf_cnpj: nil, tipo_pessoa: nil, ie: nil) @endereco = endereco @endereco_numero = endereco_numero @complemento = complemento @bairro = bairro @municipio = municipio @cep = cep @uf = uf @fone = fone @nome_destinatario = nome_destinatario @cpf_cnpj = cpf_cnpj @tipo_pessoa = tipo_pessoa @ie = ie end |
Instance Attribute Details
#bairro ⇒ Object (readonly)
Returns the value of attribute bairro.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def bairro @bairro end |
#cep ⇒ Object (readonly)
Returns the value of attribute cep.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def cep @cep end |
#complemento ⇒ Object (readonly)
Returns the value of attribute complemento.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def complemento @complemento end |
#cpf_cnpj ⇒ Object (readonly)
Returns the value of attribute cpf_cnpj.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def cpf_cnpj @cpf_cnpj end |
#endereco ⇒ Object (readonly)
Returns the value of attribute endereco.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def endereco @endereco end |
#endereco_numero ⇒ Object (readonly)
Returns the value of attribute endereco_numero.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def endereco_numero @endereco_numero end |
#fone ⇒ Object (readonly)
Returns the value of attribute fone.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def fone @fone end |
#ie ⇒ Object (readonly)
Returns the value of attribute ie.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def ie @ie end |
#municipio ⇒ Object (readonly)
Returns the value of attribute municipio.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def municipio @municipio end |
#nome_destinatario ⇒ Object (readonly)
Returns the value of attribute nome_destinatario.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def nome_destinatario @nome_destinatario end |
#tipo_pessoa ⇒ Object (readonly)
Returns the value of attribute tipo_pessoa.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def tipo_pessoa @tipo_pessoa end |
#uf ⇒ Object (readonly)
Returns the value of attribute uf.
4 5 6 |
# File 'lib/tiny_erp_api/address.rb', line 4 def uf @uf end |
Instance Method Details
#to_api_hash ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/tiny_erp_api/address.rb', line 20 def to_api_hash { endereco: endereco, enderecoNro: endereco_numero, complemento: complemento, bairro: bairro, municipio: municipio, cep: cep, uf: uf, fone: fone, nomeDestinatario: nome_destinatario, cpfCnpj: cpf_cnpj, tipoPessoa: tipo_pessoa, ie: ie } end |